bevy_ui_builders/scroll_view/
plugin.rs

1//! ScrollView plugin for handling mouse wheel scrolling and visual feedback
2
3use bevy_plugin_builder::define_plugin;
4use super::systems::*;
5
6// Plugin that provides scrolling functionality
7define_plugin!(ScrollViewPlugin {
8    update: [
9        handle_mouse_wheel_scroll,         // Mouse wheel scrolling
10        update_scrollbar_visibility,       // Scrollbar auto-hide/fade
11        handle_scrollbar_thumb_drag,       // Drag scrollbar thumb to scroll (BEFORE position update)
12        handle_keyboard_scroll,            // Keyboard navigation (Page/Home/Arrows)
13        handle_drag_scroll,                // Drag-to-scroll with mouse
14        apply_kinetic_scrolling,           // Momentum/kinetic scrolling
15        auto_scroll_to_focused_input,      // Auto-scroll to focused text inputs
16        clamp_scroll_bounds,               // Clamp scroll position to valid range
17        update_scrollbar_thumb_position,   // Update thumb position/size based on scroll (AFTER all scroll updates)
18    ]
19});