From 645dc8d01764be2d3bdf6a7d0471d3de5a8251ac Mon Sep 17 00:00:00 2001 From: hodasemi Date: Sun, 6 Apr 2025 09:47:32 +0200 Subject: [PATCH] Make States a Resource --- src/states.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/states.rs b/src/states.rs index e7ab6fe..bd56bb6 100644 --- a/src/states.rs +++ b/src/states.rs @@ -2,7 +2,6 @@ use crate::prelude::*; use anyhow::Result; use assetpath::AssetPath; use ecs::*; - use std::any::Any; use std::collections::HashMap; @@ -118,6 +117,7 @@ impl<'a, T: TopLevelGui + 'static> From for CreationType<'a> { } /// Collection and handler for your UI (basically a state machine) +#[derive(Resource)] pub struct States { states: HashMap>, current_state: Arc>>>,