DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

e835f579b3754d164684fb17867f5a71b2c1d19a — Jonni Liljamo 1 year, 10 months ago 71059e9
feat(sdbclient): change play menu title with menu
2 files changed, 15 insertions(+), 1 deletions(-)

M sdbclient/src/plugins/menu/play/ui.rs
M sdbclient/src/runtime/menu/mod.rs
M sdbclient/src/plugins/menu/play/ui.rs => sdbclient/src/plugins/menu/play/ui.rs +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 sdbclient/src/runtime/menu/mod.rs => sdbclient/src/runtime/menu/mod.rs +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),"
        }
    }
}