mittens_engine/engine/ecs/component/
inspect_layout.rs1use crate::engine::ecs::ComponentId;
2use crate::engine::ecs::component::Component;
3
4#[derive(Debug, Default, Clone, Copy)]
16pub struct InspectLayoutComponent {
17 component: Option<ComponentId>,
18}
19
20impl InspectLayoutComponent {
21 pub fn new() -> Self {
22 Self { component: None }
23 }
24
25 pub fn id(&self) -> Option<ComponentId> {
26 self.component
27 }
28}
29
30impl Component for InspectLayoutComponent {
31 fn set_id(&mut self, component: ComponentId) {
32 self.component = Some(component);
33 }
34
35 fn name(&self) -> &'static str {
36 "inspect_layout"
37 }
38
39 fn as_any(&self) -> &dyn std::any::Any {
40 self
41 }
42
43 fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
44 self
45 }
46}