generated from tipragot/rust
Add the main menu #31
|
@ -11,7 +11,7 @@ pub enum GameState {
|
||||||
#[default]
|
#[default]
|
||||||
Menu,
|
Menu,
|
||||||
|
|
||||||
/// When we are in the lobby waiting for players.
|
/// When we are in the lobby waiting for players to join the game.
|
||||||
Lobby,
|
Lobby,
|
||||||
|
|
||||||
/// When we play this wonderful game.
|
/// When we play this wonderful game.
|
||||||
|
|
|
@ -34,6 +34,7 @@ fn menu_ui(
|
||||||
|
|
||||||
if ui.button("Join").clicked() {
|
if ui.button("Join").clicked() {
|
||||||
next_state.set(GameState::Game);
|
next_state.set(GameState::Game);
|
||||||
|
// TODO: connect to the game
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -41,6 +42,7 @@ fn menu_ui(
|
||||||
|
|
||||||
if ui.button("Create new game").clicked() {
|
if ui.button("Create new game").clicked() {
|
||||||
next_state.set(GameState::Lobby);
|
next_state.set(GameState::Lobby);
|
||||||
|
// TODO: create a new game
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue