DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

b530d5c4c1d7f66b0ca64e3556dd72174cdbda10 — skye 1 year, 7 months ago e13eb35
feat(client): show game state in game details
2 files changed, 8 insertions(+), 2 deletions(-)

M client/src/api/game/mod.rs
M client/src/plugins/game/ui/mod.rs
M client/src/api/game/mod.rs => client/src/api/game/mod.rs +1 -1
@@ 50,7 50,7 @@ pub struct Action {
    pub command: Command,
}

#[derive(Deserialize_repr, Clone, PartialEq)]
#[derive(Debug, Deserialize_repr, Clone, PartialEq)]
#[repr(u8)]
pub enum GameState {
    Forming = 0,

M client/src/plugins/game/ui/mod.rs => client/src/plugins/game/ui/mod.rs +7 -1
@@ 34,11 34,17 @@ pub fn ui(

            ui.separator();

            egui::CollapsingHeader::new("Details")
            egui::CollapsingHeader::new("Users")
                .default_open(true)
                .show(ui, |ui| {
                    ui.label(format!("Host: {}", game.host.as_ref().unwrap().username));
                    ui.label(format!("Guest: {}", game.guest.as_ref().unwrap().username));
                });

            egui::CollapsingHeader::new("State")
                .default_open(true)
                .show(ui, |ui| {
                    ui.label(format!("Game: {:?}", game.state));
                });
        });
}