28 lines
753 B
Rust
28 lines
753 B
Rust
use crate::prelude::*;
|
|
|
|
pub mod context_menu;
|
|
|
|
/// Plugin for Pom-related UI (context menu).
|
|
pub struct PomUiPlugin;
|
|
|
|
impl Plugin for PomUiPlugin {
|
|
fn build(&self, app: &mut App) {
|
|
app.add_systems(
|
|
Update,
|
|
context_menu::open_context_menu.run_if(in_state(AppState::GameScreen)),
|
|
);
|
|
app.add_systems(
|
|
Update,
|
|
context_menu::click_outside_context_menu.run_if(in_state(AppState::GameScreen)),
|
|
);
|
|
app.add_systems(
|
|
Update,
|
|
context_menu::buttons.run_if(in_state(AppState::GameScreen)),
|
|
);
|
|
app.add_systems(
|
|
Update,
|
|
context_menu::close_context_menu.run_if(in_state(AppState::GameScreen)),
|
|
);
|
|
}
|
|
}
|