From 76eccccacac81814ee1c9eb61e6bcc638cfd63a6 Mon Sep 17 00:00:00 2001 From: Elijah Voigt Date: Mon, 9 Dec 2024 22:49:25 -0800 Subject: [PATCH] Stubbed out buttons and menu view states --- src/menu.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/menu.rs b/src/menu.rs index 2fa7739..5fa9392 100644 --- a/src/menu.rs +++ b/src/menu.rs @@ -1,5 +1,5 @@ use bevy::{ - color::palettes::css::{BLACK, ORANGE, PURPLE, RED, TEAL}, + color::palettes::css::{BLACK, BLUE, GREEN, ORANGE, PURPLE, RED, TEAL}, prelude::*, }; @@ -53,6 +53,18 @@ fn setup(mut commands: Commands) { parent.spawn(Text("Menu".to_string())); }) .observe(button_set_state(ViewState::Menu)); + parent + .spawn((Button, BackgroundColor(GREEN.into()), GlobalZIndex(1))) + .with_children(|parent| { + parent.spawn(Text("Deck".to_string())); + }) + .observe(button_set_state(ViewState::Deck)); + parent + .spawn((Button, BackgroundColor(BLUE.into()), GlobalZIndex(1))) + .with_children(|parent| { + parent.spawn(Text("Sets".to_string())); + }) + .observe(button_set_state(ViewState::Sets)); }); }