use sardonyx_audio::SourceHandle;
use sardonyx_core::ecs::prelude::{Component, DenseVecStorage};
use sardonyx_rendy::TextureHandle;
pub struct OnUiActionImage {
pub(crate) normal_image: Option<UiImage>,
pub(crate) hover_image: Option<UiImage>,
pub(crate) press_image: Option<UiImage>,
}
impl OnUiActionImage {
pub fn new(
normal_image: Option<UiImage>,
hover_image: Option<UiImage>,
press_image: Option<UiImage>,
) -> Self {
Self {
normal_image,
hover_image,
press_image,
}
}
}
impl Component for OnUiActionImage {
type Storage = DenseVecStorage<Self>;
}
pub struct OnUiActionSound {
pub(crate) hover_sound: Option<SourceHandle>,
pub(crate) press_sound: Option<SourceHandle>,
pub(crate) release_sound: Option<SourceHandle>,
}
impl OnUiActionSound {
pub fn new(
hover_sound: Option<SourceHandle>,
press_sound: Option<SourceHandle>,
release_sound: Option<SourceHandle>,
) -> Self {
Self {
hover_sound,
press_sound,
release_sound,
}
}
}
impl Component for OnUiActionSound {
type Storage = DenseVecStorage<Self>;
}