Add the main menu #31

Merged
CoCo_Sol merged 25 commits from main-menu into main 2024-02-09 23:42:37 +00:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 1e9041e477 - Show all commits

View file

@ -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.

View file

@ -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

This example does not use the function.

This example does not use the function.
// TODO: connect to the game
}
CoCo_Sol marked this conversation as resolved Outdated

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
}
});
}