Fix diary toggling when escape menu is open.

This commit is contained in:
mdx97 2021-04-11 18:53:45 -05:00
parent db8c167797
commit 03abe234ee

View File

@ -569,8 +569,6 @@ impl Show {
}
}
fn toggle_bag(&mut self) { self.bag(!self.bag); }
fn trade(&mut self, open: bool) {
if !self.esc_menu {
self.bag = open;
@ -580,8 +578,6 @@ impl Show {
}
}
fn toggle_trade(&mut self) { self.trade(!self.trade); }
fn map(&mut self, open: bool) {
if !self.esc_menu {
self.map = open;
@ -629,8 +625,6 @@ impl Show {
}
}
fn toggle_map(&mut self) { self.map(!self.map) }
fn settings(&mut self, open: bool) {
if !self.esc_menu {
self.open_windows = if open {
@ -646,6 +640,20 @@ impl Show {
}
}
fn toggle_bag(&mut self) { self.bag(!self.bag); }
fn toggle_trade(&mut self) { self.trade(!self.trade); }
fn toggle_map(&mut self) { self.map(!self.map) }
fn toggle_social(&mut self) { self.social(!self.social); }
fn toggle_crafting(&mut self) { self.crafting(!self.crafting) }
fn toggle_spell(&mut self) { self.diary(!self.diary) }
fn toggle_ui(&mut self) { self.ui = !self.ui; }
fn toggle_settings(&mut self, global_state: &GlobalState) {
match self.open_windows {
Windows::Settings => {
@ -668,8 +676,6 @@ impl Show {
// TODO: Add self updating key-bindings element
//fn toggle_help(&mut self) { self.help = !self.help }
fn toggle_ui(&mut self) { self.ui = !self.ui; }
fn toggle_windows(&mut self, global_state: &mut GlobalState) {
if self.bag
|| self.trade
@ -717,22 +723,6 @@ impl Show {
self.want_grab = false;
}
fn toggle_social(&mut self) {
self.social(!self.social);
self.diary = false;
}
fn toggle_crafting(&mut self) { self.crafting(!self.crafting) }
fn toggle_spell(&mut self) {
self.diary = !self.diary;
self.bag = false;
self.crafting = false;
self.social = false;
self.map = false;
self.want_grab = !self.diary;
}
fn open_skill_tree(&mut self, tree_sel: SelectedSkillTree) {
self.skilltreetab = tree_sel;
self.social = false;