Skip to content

Commit

Permalink
fix: immediatly apply simple mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrix126 committed Nov 20, 2024
1 parent 0ea492d commit 4558b66
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/app/panels/middle/xvb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,17 @@ impl crate::disk::state::Xvb {
ui.style_mut().spacing.icon_spacing = space_h;

// --------------------------- XVB Simple -------------------------------------------
if self.simple && ui.checkbox(&mut self.simple_hero_mode, "Hero Mode").on_hover_text(XVB_HERO_SELECT).clicked() {
// change rutime mode immediately.
if self.simple {
ui.checkbox(&mut self.simple_hero_mode, "Hero Mode").on_hover_text(XVB_HERO_SELECT);
// set runtime mode immediately if we are on simple mode.
if self.simple_hero_mode {
api.lock().unwrap().stats_priv.runtime_mode = RuntimeMode::Hero;
} else {
api.lock().unwrap().stats_priv.runtime_mode = RuntimeMode::Auto;
}
}
});


ui.add_space(space_h);

// --------------------------- XVB Advanced -----------------------------------------
if !self.simple {

Expand Down

0 comments on commit 4558b66

Please sign in to comment.