Chnage name fonction
All checks were successful
Rust Checks / checks (push) Successful in 1m3s
Rust Checks / checks (pull_request) Successful in 1m52s

This commit is contained in:
CoCo_Sol 2024-02-09 21:53:41 +01:00
parent 4bce642f17
commit cb33e5c3f4

View file

@ -11,13 +11,13 @@ impl Plugin for MenuPlugin {
/// A function that is called when the plugin is added to the application. /// A function that is called when the plugin is added to the application.
fn build(&self, app: &mut App) { fn build(&self, app: &mut App) {
app.add_plugins(EguiPlugin) app.add_plugins(EguiPlugin)
.add_systems(Update, ui_connect_button) .add_systems(Update, ui_connect_window)
.add_systems(Update, ui_host_button); .add_systems(Update, ui_host_window);
} }
} }
/// Display a connect window, with a button to join a game and an input to enter /// Display a connect window, with a button to join a game and an input to enter
/// the address. /// the address.
fn ui_connect_button(mut ctx: EguiContexts, mut connection_string: Local<String>) { fn ui_connect_window(mut ctx: EguiContexts, mut connection_string: Local<String>) {
egui::Window::new("Connect") egui::Window::new("Connect")
.default_width(400.0) .default_width(400.0)
.show(ctx.ctx_mut(), |ui| { .show(ctx.ctx_mut(), |ui| {
@ -36,7 +36,7 @@ fn ui_connect_button(mut ctx: EguiContexts, mut connection_string: Local<String>
} }
/// Display an host window, with a button to create a new game. /// Display an host window, with a button to create a new game.
fn ui_host_button(mut ctx: EguiContexts) { fn ui_host_window(mut ctx: EguiContexts) {
egui::Window::new("Host") egui::Window::new("Host")
.default_width(400.0) .default_width(400.0)
.show(ctx.ctx_mut(), |ui| { .show(ctx.ctx_mut(), |ui| {