DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

5964797986f7b7cabbaf42e929a5c170a30bb195 — Jonni Liljamo 1 year, 9 months ago ad65acb
feat(client): show title in play menu
2 files changed, 13 insertions(+), 3 deletions(-)

M client/src/plugins/menu/ui/play/mod.rs
M client/src/plugins/menu/ui/play/ui.rs
M client/src/plugins/menu/ui/play/mod.rs => client/src/plugins/menu/ui/play/mod.rs +12 -1
@@ 17,7 17,7 @@ pub struct PlayScreenData {
    pub browse_state: PlayScreenBrowseState,
}

#[derive(Default, PartialEq)]
#[derive(Default, PartialEq, Clone)]
pub enum PlayScreenState {
    #[default]
    Main,


@@ 26,6 26,17 @@ pub enum PlayScreenState {
    InLobbyGuest,
}

impl PlayScreenState {
    pub fn display(&self) -> &str {
        match self {
            PlayScreenState::Main => "Play",
            PlayScreenState::CreateGame => "Create",
            PlayScreenState::InLobbyHost => "Lobby (Host)",
            PlayScreenState::InLobbyGuest => "Lobby (Guest)",
        }
    }
}

#[derive(Default, PartialEq)]
pub enum PlayScreenBrowseState {
    #[default]

M client/src/plugins/menu/ui/play/ui.rs => client/src/plugins/menu/ui/play/ui.rs +1 -2
@@ 20,10 20,9 @@ pub fn ui(
    mut data: ResMut<PlayScreenData>,
    cfg_user: Res<CfgUser>,
) {
    // TODO: title used to be: rtdmenu.play_menu_ui_state.display()).size(32.)
    menuwindow(
        egui_context.ctx_mut(),
        "TEMP",
        data.state.clone().display(),
        &egui::Vec2::new(800., 600.),
        |ui| match data.state {
            PlayScreenState::Main => {