custom panels

This commit is contained in:
galister
2025-12-17 15:54:43 +09:00
parent 9dbd35e8f7
commit ea90853e56
18 changed files with 181 additions and 61 deletions

View File

@@ -8,7 +8,6 @@ use std::{
use glam::vec2;
use slotmap::Key;
use smallvec::smallvec;
use wgui::{
components::{button::ComponentButton, checkbox::ComponentCheckbox, slider::ComponentSlider},
event::{CallbackDataCommon, EventAlterables, EventCallback},
@@ -107,9 +106,13 @@ impl EditWrapperManager {
Ok(())
}
pub fn unwrap_edit_mode(&mut self, owc: &mut OverlayWindowConfig) {
pub fn unwrap_edit_mode(
&mut self,
owc: &mut OverlayWindowConfig,
app: &mut AppState,
) -> anyhow::Result<()> {
if !owc.editing {
return;
return Ok(());
}
log::debug!("EditMode unwrap on {}", owc.name);
@@ -126,6 +129,8 @@ impl EditWrapperManager {
owc.backend = inner;
owc.editing = false;
owc.backend.resume(app)
// wrapper is destroyed with nothing left inside
}
}