src/global/structs/status.rs
25 lines · 412 bytes
1use typemap::Key;
2
3/// a struct for storing different info, currently only stores one info
4#[derive(Clone)]
5pub struct Status {
6 pub popup_opened: bool,
7}
8
9impl Key for Status {
10 type Value = Self;
11}
12
13impl Default for Status {
14 fn default() -> Self {
15 Self {
16 popup_opened: false,
17 }
18 }
19}
20
21impl Status {
22 pub fn reset(&mut self) {
23 *self = Self::default();
24 }
25}