1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! This crate implements handling of user input.

use bevy::{app::PluginGroupBuilder, prelude::*};
use commands::CommandsPlugin;
use draft::DraftPlugin;
use hud::HudPlugin;
use mouse::MousePlugin;
use selection::SelectionPlugin;

mod commands;
mod draft;
mod frustum;
mod hud;
mod mouse;
mod ray;
mod selection;

const SELECTION_BAR_ID: u32 = 0;
const POINTER_BAR_ID: u32 = 1;

pub struct ControllerPluginGroup;

impl PluginGroup for ControllerPluginGroup {
    fn build(self) -> PluginGroupBuilder {
        PluginGroupBuilder::start::<Self>()
            .add(MousePlugin)
            .add(CommandsPlugin)
            .add(SelectionPlugin)
            .add(DraftPlugin)
            .add(HudPlugin)
    }
}