Add new method to menu::State

This commit is contained in:
Héctor Ramón Jiménez 2020-07-23 03:27:21 +02:00
parent 3d91926a74
commit d4ef470b4f

View file

@ -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