Make States a Resource
This commit is contained in:
parent
956122549e
commit
645dc8d017
1 changed files with 1 additions and 1 deletions
|
@ -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<T> for CreationType<'a> {
|
|||
}
|
||||
|
||||
/// Collection and handler for your UI (basically a state machine)
|
||||
#[derive(Resource)]
|
||||
pub struct States {
|
||||
states: HashMap<String, Arc<State>>,
|
||||
current_state: Arc<Mutex<Option<Arc<State>>>>,
|
||||
|
|
Loading…
Reference in a new issue