Change of file structure for scenes #38

Merged
tipragot merged 11 commits from restruct-menus into main 2024-02-10 17:26:09 +00:00
Owner
No description provided.
CoCo_Sol added this to the Gameplay milestone 2024-02-10 16:11:40 +00:00
CoCo_Sol added the
Kind/Enhancement
label 2024-02-10 16:11:40 +00:00
CoCo_Sol self-assigned this 2024-02-10 16:11:40 +00:00
CoCo_Sol added 1 commit 2024-02-10 16:11:41 +00:00
Change structure of files
Some checks failed
Rust Checks / checks (push) Failing after 9s
Rust Checks / checks (pull_request) Failing after 6s
b69672356a
CoCo_Sol requested review from tipragot 2024-02-10 16:12:05 +00:00
CoCo_Sol added 1 commit 2024-02-10 16:14:06 +00:00
change doc
Some checks failed
Rust Checks / checks (push) Failing after 5s
Rust Checks / checks (pull_request) Failing after 5s
2b6e96c3d3
CoCo_Sol added 1 commit 2024-02-10 16:18:53 +00:00
Fix fmt
All checks were successful
Rust Checks / checks (push) Successful in 1m7s
Rust Checks / checks (pull_request) Successful in 1m3s
c0bcf1ad70
tipragot requested changes 2024-02-10 16:48:08 +00:00
@ -3,3 +3,3 @@
use bevy::prelude::*;
pub mod menu;
pub mod menus;
Contributor

I think we should call them scenes.

I think we should call them scenes.
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 16:54:28 +00:00
Change naming menus to scenes
All checks were successful
Rust Checks / checks (push) Successful in 1m3s
Rust Checks / checks (pull_request) Successful in 1m2s
54bd32b266
tipragot changed title from Change of file structure for menus to Change of file structure for scenes 2024-02-10 16:55:20 +00:00
tipragot requested changes 2024-02-10 16:56:32 +00:00
@ -0,0 +6,4 @@
pub mod menu;
/// The plugin for all menus.
pub struct MenusPlugin;
Contributor

Rename this to ScenePlugin

Rename this to ScenePlugin
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 16:58:10 +00:00
Change name of plugin
All checks were successful
Rust Checks / checks (push) Successful in 1m4s
Rust Checks / checks (pull_request) Successful in 1m3s
c8a1902d4c
CoCo_Sol requested review from tipragot 2024-02-10 17:00:32 +00:00
tipragot requested changes 2024-02-10 17:03:18 +00:00
@ -0,0 +12,4 @@
fn build(&self, app: &mut App) {
app.add_systems(
Update,
menu_ui.run_if(state_exists_and_equals(GameState::Menu)),
Contributor

Change GameState to CurrentScene or Scene

Change GameState to CurrentScene or Scene
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 17:04:31 +00:00
Change naming of state enum
All checks were successful
Rust Checks / checks (push) Successful in 1m2s
Rust Checks / checks (pull_request) Successful in 1m3s
e31a420bab
CoCo_Sol requested review from tipragot 2024-02-10 17:05:53 +00:00
tipragot requested changes 2024-02-10 17:07:37 +00:00
@ -0,0 +1,15 @@
//! The file containing all menu programs.
Contributor

scenes not menu

scenes not menu
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 17:08:34 +00:00
change doc
All checks were successful
Rust Checks / checks (push) Successful in 1m2s
Rust Checks / checks (pull_request) Successful in 1m2s
17119af643
CoCo_Sol requested review from tipragot 2024-02-10 17:08:41 +00:00
tipragot requested changes 2024-02-10 17:09:03 +00:00
@ -5,3 +5,3 @@
pub mod menu;
pub mod scenes;
/// The state of the game.
Contributor

Rename

Rename
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 17:10:31 +00:00
Change naming
All checks were successful
Rust Checks / checks (push) Successful in 1m2s
Rust Checks / checks (pull_request) Successful in 1m3s
55440c9700
CoCo_Sol requested review from tipragot 2024-02-10 17:10:34 +00:00
tipragot requested changes 2024-02-10 17:13:25 +00:00
@ -9,3 +9,2 @@
.add_plugins(DefaultPlugins)
.add_state::<GameState>()
.add_plugins(MenuPlugin)
.add_state::<CurrentScene>()
Contributor

Add it in the ScenesPlugin instead.

Add it in the ScenesPlugin instead.
CoCo_Sol marked this conversation as resolved
Contributor

If the resource is always initialized, there is no need to check for existence. Use in_state instead.

If the resource is always initialized, there is no need to check for existence. Use in_state instead.
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 17:17:35 +00:00
Change init of state ressource
All checks were successful
Rust Checks / checks (push) Successful in 1m1s
Rust Checks / checks (pull_request) Successful in 1m0s
b025b6d9d3
CoCo_Sol requested review from tipragot 2024-02-10 17:17:57 +00:00
tipragot requested changes 2024-02-10 17:20:03 +00:00
@ -0,0 +17,4 @@
fn menu_ui(
mut ctx: EguiContexts,
mut connection_string: Local<String>,
mut next_state: ResMut<NextState<CurrentScene>>,
Contributor

next_scene

next_scene
CoCo_Sol marked this conversation as resolved
CoCo_Sol added 1 commit 2024-02-10 17:21:23 +00:00
Change name
All checks were successful
Rust Checks / checks (push) Successful in 1m3s
Rust Checks / checks (pull_request) Successful in 1m1s
601490023b
CoCo_Sol requested review from tipragot 2024-02-10 17:21:25 +00:00
CoCo_Sol added 1 commit 2024-02-10 17:23:27 +00:00
change doc
All checks were successful
Rust Checks / checks (push) Successful in 1m0s
Rust Checks / checks (pull_request) Successful in 1m2s
d7d4473298
tipragot approved these changes 2024-02-10 17:24:29 +00:00
tipragot approved these changes 2024-02-10 17:25:29 +00:00
tipragot merged commit 12ada59b8c into main 2024-02-10 17:26:09 +00:00
tipragot deleted branch restruct-menus 2024-02-10 17:26:15 +00:00
Sign in to join this conversation.
No description provided.