Rename PersistState -> StateInMemory
also use IdTypeMap::insert_temp instead of insert_persisted. The whole conception of using egui memory to share state is probably going to be changed to a more robust solution in the future. Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
committed by
William Casarin
parent
194f41d39c
commit
f071d59dae
@@ -3,7 +3,7 @@ use egui::{Button, Layout, SidePanel, Vec2};
|
||||
use crate::ui::global_popup::GlobalPopupType;
|
||||
|
||||
use super::{
|
||||
persist_state::{PERSISTED_GLOBAL_POPUP, PERSISTED_SIDE_PANEL},
|
||||
state_in_memory::{STATE_GLOBAL_POPUP, STATE_SIDE_PANEL},
|
||||
View,
|
||||
};
|
||||
|
||||
@@ -32,8 +32,8 @@ impl DesktopSidePanel {
|
||||
.add_sized(Vec2::new(32.0, 32.0), Button::new("A"))
|
||||
.clicked()
|
||||
{
|
||||
PERSISTED_SIDE_PANEL.set_state(ui.ctx(), Some(GlobalPopupType::AccountManagement));
|
||||
PERSISTED_GLOBAL_POPUP.set_state(ui.ctx(), true);
|
||||
STATE_SIDE_PANEL.set_state(ui.ctx(), Some(GlobalPopupType::AccountManagement));
|
||||
STATE_GLOBAL_POPUP.set_state(ui.ctx(), true);
|
||||
}
|
||||
ui.add_space(spacing_amt);
|
||||
ui.add(settings_button(dark_mode));
|
||||
|
||||
Reference in New Issue
Block a user