Other crap i added months ago

This commit is contained in:
2025-03-11 21:35:12 +02:00
parent ad89b0c64d
commit 67a948bb66
10 changed files with 197 additions and 56 deletions

View File

@@ -67,13 +67,13 @@ impl Windows {
WINDOWS.lock().unwrap().insert(WT::id(), Box::<WT>::default());
}
pub fn draw_all(&mut self, ctx: &egui::Context, state: &mut GuiState) {
pub fn draw_all(ctx: &egui::Context, state: &mut GuiState) {
let theme = handle_error_ui!(xmpd_settings::Settings::get()).theme.clone();
for (win_id, (vp_id, builder)) in &self.windows {
if self.is_open(&win_id) {
for (win_id, (vp_id, builder)) in state.windows.windows.clone().into_iter() {
if state.windows.is_open(&win_id) {
ctx.show_viewport_immediate(vp_id.clone(), builder.clone(), |ctx, _vp_class| {
ctx.input(|inp| {
self.toggle(win_id, !inp.viewport().close_requested());
state.windows.toggle(&win_id, !inp.viewport().close_requested());
});
egui::CentralPanel::default()
.frame(