diff --git a/src/widgets/mod.rs b/src/widgets/mod.rs index 7cc33b7..dc14924 100644 --- a/src/widgets/mod.rs +++ b/src/widgets/mod.rs @@ -28,6 +28,14 @@ impl Plugin for GameUiPlugin { } } +/// Anything that can spawn a themed UI should impl this trait. +/// +/// This exists mainly so that I can write generic functions and have the *compiler* +/// expand the code for me, instead of doing it by hand. +pub trait SpawnUi { + fn spawn_ui(commands: Commands, theme: Res); +} + /// The base panel for the machines that manipulate the room cards. /// /// This function is not a valid Bevy System because of how the Commands struct