display_list, add_display views (wip)

[skip ci]
This commit is contained in:
Aleksander
2025-12-15 21:08:59 +01:00
parent 7118cea810
commit 9aea733452
21 changed files with 574 additions and 153 deletions

View File

@@ -63,7 +63,7 @@ impl Default for Params<'_> {
}
pub struct ButtonClickEvent {}
pub type ButtonClickCallback = Box<dyn Fn(&mut CallbackDataCommon, ButtonClickEvent) -> anyhow::Result<()>>;
pub type ButtonClickCallback = Box<dyn FnMut(&mut CallbackDataCommon, ButtonClickEvent) -> anyhow::Result<()>>;
pub struct Colors {
pub color: drawing::Color,
@@ -351,7 +351,7 @@ fn register_event_mouse_release(
state.down = false;
if state.hovered
&& let Some(on_click) = &state.on_click
&& let Some(on_click) = &mut state.on_click
{
anim_hover(
rect,