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