Tabbed settings (Closes #355)

This commit is contained in:
Aleksander
2026-01-11 14:41:09 +01:00
parent b48320c7bc
commit 84d4fb7cc2
27 changed files with 578 additions and 217 deletions

View File

@@ -9,6 +9,7 @@ use slotmap::{DenseSlotMap, new_key_type};
use crate::{
animation::{self, Animation},
components::Component,
i18n::I18n,
layout::{LayoutState, LayoutTask, WidgetID},
sound::WguiSoundType,
@@ -145,6 +146,10 @@ impl EventAlterables {
pub fn play_sound(&mut self, sound_type: WguiSoundType) {
self.tasks.push(LayoutTask::PlaySound(sound_type));
}
pub fn dispatch(&mut self, func: Box<dyn FnOnce(&mut CallbackDataCommon) -> anyhow::Result<()>>) {
self.tasks.push(LayoutTask::Dispatch(func))
}
}
pub struct CallbackDataCommon<'a> {