mod button;
mod checkbox;
mod list;
mod menu;
mod observe;
pub mod popover;
mod radio;
mod scrollarea;
mod scrollbar;
mod slider;
mod text_input;
pub use button::*;
pub use checkbox::*;
pub use list::*;
pub use menu::*;
pub use observe::*;
pub use radio::*;
pub use scrollarea::*;
pub use scrollbar::*;
pub use slider::*;
pub use text_input::*;
use bevy_app::{PluginGroup, PluginGroupBuilder};
use bevy_ecs::{entity::Entity, event::EntityEvent, reflect::ReflectEvent};
use bevy_reflect::Reflect;
use crate::popover::PopoverPlugin;
#[derive(Default)]
pub struct UiWidgetsPlugins;
impl PluginGroup for UiWidgetsPlugins {
fn build(self) -> PluginGroupBuilder {
PluginGroupBuilder::start::<Self>()
.add(PopoverPlugin)
.add(ButtonPlugin)
.add(CheckboxPlugin)
.add(ListBoxPlugin)
.add(MenuPlugin)
.add(RadioGroupPlugin)
.add(ScrollAreaPlugin)
.add(ScrollbarPlugin)
.add(SliderPlugin)
.add(EditableTextInputPlugin)
}
}
#[derive(Copy, Clone, Debug, PartialEq, EntityEvent, Reflect)]
#[reflect(Event)]
pub struct Activate {
pub entity: Entity,
}
#[derive(Copy, Clone, Debug, PartialEq, EntityEvent, Reflect)]
#[reflect(Event)]
pub struct ValueChange<T> {
#[event_target]
pub source: Entity,
pub value: T,
pub is_final: bool,
}