Trait SpawnUi for things that can spawn a UI
I don't want to copy-paste a bunch of code, so I'm going to get the compiler to do it for me.
This commit is contained in:
@@ -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<UiTheme>);
|
||||||
|
}
|
||||||
|
|
||||||
/// The base panel for the machines that manipulate the room cards.
|
/// 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
|
/// This function is not a valid Bevy System because of how the Commands struct
|
||||||
|
|||||||
Reference in New Issue
Block a user