From d4ef470b4f41595c15b6f69cc3387d4d1c394fc3 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 23 Jul 2020 03:27:21 +0200 Subject: Add `new` method to `menu::State` --- native/src/overlay/menu.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'native') diff --git a/native/src/overlay/menu.rs b/native/src/overlay/menu.rs index 0d4bc63c..0018a02c 100644 --- a/native/src/overlay/menu.rs +++ b/native/src/overlay/menu.rs @@ -120,6 +120,14 @@ pub struct State { } impl State { + /// Creates a new [`State`] for a [`Menu`]. + /// + /// [`State`]: struct.State.html + /// [`Menu`]: struct.Menu.html + pub fn new() -> Self { + Self::default() + } + /// Returns whether the [`Menu`] is currently open or not. /// /// [`Menu`]: struct.Menu.html -- cgit