generated from tipragot/rust
Change of file structure for scenes #38
|
@ -17,7 +17,7 @@ impl Plugin for MenuPlugin {
|
|||
fn menu_ui(
|
||||
mut ctx: EguiContexts,
|
||||
mut connection_string: Local<String>,
|
||||
mut next_state: ResMut<NextState<CurrentScene>>,
|
||||
mut next_scene: ResMut<NextState<CurrentScene>>,
|
||||
CoCo_Sol marked this conversation as resolved
Outdated
|
||||
) {
|
||||
egui::CentralPanel::default().show(ctx.ctx_mut(), |ui| {
|
||||
ui.heading("Border Wars");
|
||||
|
@ -30,7 +30,7 @@ fn menu_ui(
|
|||
ui.text_edit_singleline(&mut *connection_string);
|
||||
|
||||
if ui.button("Join").clicked() {
|
||||
next_state.set(CurrentScene::Game);
|
||||
next_scene.set(CurrentScene::Game);
|
||||
// TODO: connect to the game
|
||||
}
|
||||
});
|
||||
|
@ -38,7 +38,7 @@ fn menu_ui(
|
|||
ui.separator();
|
||||
|
||||
if ui.button("Create new game").clicked() {
|
||||
next_state.set(CurrentScene::Lobby);
|
||||
next_scene.set(CurrentScene::Lobby);
|
||||
// TODO: create a new game
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue
next_scene