bevy_codex/widgets/list/
mod.rs1use bevy::prelude::*;
2use bevy_lunex::{UiDebugPlugin, UiGenericPlugin, UiSystems};
3use components::ListUi;
4use systems::build_list;
5
6use crate::resources::CodexSettings;
7
8pub mod components;
9pub mod systems;
10
11#[derive(Clone)]
12pub struct ListPlugin;
13
14impl Plugin for ListPlugin {
15 fn build(&self, app: &mut App) {
16 app.add_plugins((UiGenericPlugin::<ListUi>::new(),));
17 if app.world().resource::<CodexSettings>().debug {
18 app.add_plugins(UiDebugPlugin::<ListUi>::new());
19 }
20 app.add_systems(Update, build_list.before(UiSystems::Compute));
21 }
22}