dash and wgui sounds

This commit is contained in:
Aleksander
2026-01-03 15:00:31 +01:00
parent 383bf3b11f
commit feba52c28f
34 changed files with 258 additions and 96 deletions

View File

@@ -11,6 +11,7 @@ use crate::{
animation::{self, Animation},
i18n::I18n,
layout::{LayoutState, LayoutTask, WidgetID},
sound::WguiSoundType,
stack::{ScissorStack, Transform, TransformStack},
widget::{EventResult, WidgetData, WidgetObj},
};
@@ -140,6 +141,10 @@ impl EventAlterables {
pub fn animate(&mut self, animation: Animation) {
self.animations.push(animation);
}
pub fn play_sound(&mut self, sound_type: WguiSoundType) {
self.tasks.push(LayoutTask::PlaySound(sound_type));
}
}
pub struct CallbackDataCommon<'a> {