M => +3 -1
@@ 15,12 15,14 @@ use crate::{
runtime::menu::{PlayMenuUIState, RTDMenu},
};
use super::PlayMenuState;
pub(super) fn show(
mut commands: Commands,
mut egui_context: ResMut<EguiContext>,
mut rtdmenu: ResMut<RTDMenu>,
) {
egui::Window::new("Play")
egui::Window::new(rtdmenu.play_menu_ui_state.display())
.resizable(false)
.collapsible(false)
.anchor(egui::Align2::CENTER_CENTER, egui::Vec2::ZERO)
M => +12 -0
@@ 32,3 32,15 @@ pub(crate) enum PlayMenuUIState {
InLobbyHost,
InLobbyGuest,
}
impl PlayMenuUIState {
pub fn display(&self) -> &str {
match self {
PlayMenuUIState::Main => "Main",
PlayMenuUIState::CreateGame => "Create",
PlayMenuUIState::BrowseGames => "Browse",
PlayMenuUIState::InLobbyHost => "Lobby (Host)",
PlayMenuUIState::InLobbyGuest => "Lobby (Guest),"
}
}
}