bevy_ui_builders/button/types.rs
1//! Button component types and markers
2
3use bevy::prelude::*;
4
5/// Marker component for styled buttons
6#[derive(Component)]
7pub struct StyledButton;
8
9/// Component storing button-specific state colors
10/// This is kept for compatibility with existing button code
11/// but new code should use HoverColors from systems::hover
12#[derive(Component)]
13pub struct ButtonStateColors {
14 pub normal_bg: Color,
15 pub hover_bg: Color,
16 pub pressed_bg: Color,
17 pub normal_border: Color,
18 pub hover_border: Color,
19 pub pressed_border: Color,
20}
21
22/// Component for button-specific animation state
23/// This is kept for compatibility with existing button code
24/// but new code should use HoverAnimationState from systems::hover
25#[derive(Component)]
26pub struct ButtonAnimationState {
27 /// Current scale value (animated)
28 pub current_scale: f32,
29 /// Target scale value
30 pub target_scale: f32,
31 /// Current color blend factor (0.0 = normal, 1.0 = hover/pressed)
32 pub current_color_blend: f32,
33 /// Target color blend factor
34 pub target_color_blend: f32,
35 /// Animation speed (higher = faster)
36 pub animation_speed: f32,
37}
38
39// Note: HoverScale, HoverBrightness, and OriginalColors have been moved to
40// systems::hover for universal use across all UI elements