@@ 29,28 29,38 @@ pub(super) fn show(
.show(egui_context.ctx_mut(), |ui| {
match rtdmenu.play_menu_ui_state {
PlayMenuUIState::Main => {
if ui.button("Create").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::CreateGame
}
ui.vertical_centered(|ui| {
if ui.button("Create").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::CreateGame
}
if ui.button("Browse").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::BrowseGames
}
if ui.button("Browse").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::BrowseGames
}
if ui.button("Back").clicked() {
commands.insert_resource(NextState(PlayMenuState::None));
commands.insert_resource(NextState(MenuState::Main));
}
if ui.button("Back").clicked() {
commands.insert_resource(NextState(PlayMenuState::None));
commands.insert_resource(NextState(MenuState::Main));
}
});
}
PlayMenuUIState::CreateGame => {
if ui.button("Back").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::Main
}
ui.vertical_centered(|ui| {
if ui.button("Confirm").clicked() {
todo!();
}
if ui.button("Cancel").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::Main
}
});
}
PlayMenuUIState::BrowseGames => {
if ui.button("Back").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::Main
}
ui.vertical_centered(|ui| {
if ui.button("Back").clicked() {
rtdmenu.play_menu_ui_state = PlayMenuUIState::Main
}
});
}
PlayMenuUIState::InLobbyHost => {
if ui.button("Back").clicked() {