notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

view_state.rs (396B)


      1 use std::collections::HashMap;
      2 
      3 use crate::login_manager::AcquireKeyState;
      4 
      5 /// Various state for views
      6 #[derive(Default)]
      7 pub struct ViewState {
      8     pub login: AcquireKeyState,
      9     pub id_state_map: HashMap<egui::Id, AcquireKeyState>,
     10     pub id_string_map: HashMap<egui::Id, String>,
     11 }
     12 
     13 impl ViewState {
     14     pub fn login_mut(&mut self) -> &mut AcquireKeyState {
     15         &mut self.login
     16     }
     17 }