generated from tipragot/rust
Add the main menu #31
No reviewers
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Fix
Kind/Security
Kind/Testing
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: fish-cannard/border-wars#31
Loading…
Reference in a new issue
No description provided.
Delete branch "main-menu"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #28
Get rid of the useless comments.
@ -2,0 +1,4 @@
//! The main entry point of the game.
use bevy::prelude::*;
mod menu;
Module creation should be after imports, not in between.
@ -0,0 +33,4 @@
/// App::new()
/// .add_plugins(DefaultPlugins)
/// .add_plugins(MenuPlugin); // .add_systems(Update, ui_connect_button)
/// ```
This example does not use the function.
@ -0,0 +35,4 @@
/// .add_plugins(MenuPlugin); // .add_systems(Update, ui_connect_button)
/// ```
fn ui_connect_button(mut address: ResMut<Address>, mut egui_ctx: EguiContexts) {
// Create the window
You should use a local resource instead.
@ -0,0 +64,4 @@
/// App::new()
/// .add_plugins(DefaultPlugins)
/// .add_plugins(MenuPlugin); // .add_systems(Update, ui_host_button)
/// ```
This example does not use the function.
@ -0,0 +71,4 @@
.default_width(400.0)
.show(egui_ctx.ctx_mut(), |ui| {
// Create the text
let button = ui.button("Create new game");
Bad comment
Add a state system to disable the menu when in another scene
Adding the main menu to the first sceneto Add the main menu