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:
kernelkind
2024-05-22 15:25:58 -04:00
committed by William Casarin
parent 194f41d39c
commit f071d59dae
5 changed files with 24 additions and 24 deletions

View File

@@ -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));