bevy_ui_builders/button/
plugin.rs

1//! Button plugin for Bevy
2
3use bevy::prelude::IntoScheduleConfigs;
4use bevy_plugin_builder::define_plugin;
5use super::systems::{handle_hover_scale, handle_hover_brightness, handle_button_interaction, animate_button_transitions};
6
7// Plugin that adds button interaction systems
8define_plugin!(ButtonPlugin {
9    update: [
10        (handle_button_interaction, animate_button_transitions).chain(), // Chain ensures interaction runs before animation
11        handle_hover_scale,         // Legacy system for explicit hover scale
12        handle_hover_brightness     // Legacy system for explicit brightness
13    ]
14});