blob: a86cb1aca5bb13fba95a3f284794ad455b2421c3 (
plain)
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
|
use crate::ecs::{declare_entity, pair};
use crate::ecs::extension::Collector as ExtensionCollector;
use crate::ecs::pair::ChildOf;
use crate::ecs::phase::Phase;
use crate::windowing::PHASE as WINDOWING_PHASE;
pub mod keyboard;
pub mod mouse;
declare_entity! {
pub PHASE: (Phase, pair!(ChildOf, { *WINDOWING_PHASE }));
}
/// Input extension.
#[derive(Debug, Default)]
pub struct Extension {}
impl crate::ecs::extension::Extension for Extension
{
fn collect(self, mut collector: ExtensionCollector<'_>)
{
collector.spawn_declared_entity(&PHASE);
// TODO: Add input mapping
}
}
|