|
@@ -0,0 +1,32 @@
|
|
|
|
+use bevy::prelude::*;
|
|
|
|
+
|
|
|
|
+pub struct MainMenuPlugin;
|
|
|
|
+
|
|
|
|
+#[derive(Bundle, Default)]
|
|
|
|
+struct MenuItemBundle {
|
|
|
|
+ #[bundle]
|
|
|
|
+ text_bundle: TextBundle,
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+impl Plugin for MainMenuPlugin {
|
|
|
|
+ fn build(&self, app: &mut App) {
|
|
|
|
+ app.add_startup_system(setup_menu_items);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ fn name(&self) -> &str {
|
|
|
|
+ "Main Menu"
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+fn setup_menu_items(_: Commands) {
|
|
|
|
+ /*
|
|
|
|
+ commands.spawn()
|
|
|
|
+ .insert(Position(Vec2::new(10.0, 10.0)))
|
|
|
|
+ .insert(Label("New game".to_owned()))
|
|
|
|
+ .insert(Activated);
|
|
|
|
+
|
|
|
|
+ commands.spawn()
|
|
|
|
+ .insert(Position(Vec2::new(10.0, 30.0)))
|
|
|
|
+ .insert(Label("Quit".to_owned()));
|
|
|
|
+ */
|
|
|
|
+}
|