-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added level loading screen (reference issue #190) #191
base: main
Are you sure you want to change the base?
Conversation
Created a MasterLevelLoadingMenu class and scene, with added logic to the Master MainMenu. It borrows from the Continue game logic as well as the SceneLister logic. Levels are propagated into an ItemList, with their file names cleaned. Whatever Level is activated, will update the GameStates.current_level to match the level selected. A signal emits which triggers the load action from the main menu. It tried to keep it minimal, and imitate the style of logic already established.
This morning testing more. I referenced GameState to set the current level, but with testing in other example projects, that reference becomes unavailable, but GameStateExample works. |
Thanks for opening the pull request. I'll have time to test and review in a few days. Short of a critical bug, I'll merge this into The |
The various locations of examples scenes and the nuance of some of it I still don't think I grasp. For example, i'm uncertain why when i used GameState it stopped working on my other project, while GameStateExample did. There is just enough going on under the hood on your project that I expect you'll tryout my PR, look it over, and find several things needing to be adjusted. In my continued testing I also found it handy to grab focus to the ItemList, but that isn't part of this PR. I can drop and resubmit and updated PR if you like, or just hold off until you've had a chance to try this version first. I don't collaborate with other's projects on GitHub enough to know what's best for you. |
Totally understand. The copying process is a little unconventional. To grab focus, there is a |
Focus is now grabbed by the auto-capture container. Also the GameState.set_current_level(index) has been changed to "GameStateExample.set_current_level(index)".
... to allow for longer level names.
Made the changes, so the scene now uses the capture_focus container node. The LevelSelect screen now uses the GameStateExample to set the new current level before loading it instead of GameState. |
I found on repeat loads-- returning to the main menu and opening the level select scree -- the focus wouldn't grab and options weren't selectable. I replaced it with a simple manual solution to at input detect if visible and lacking focus. I found this worked more consitently with Mouse/Gamepad too.
#190
Created a MasterLevelLoadingMenu class and scene, with added logic to the Master MainMenu. It borrows from the Continue game logic as well as the SceneLister logic.
Levels are propagated into an ItemList, with their file names cleaned. Whatever level is activated, will update the GameStates.current_level to match the level selected. A signal emits which triggers the load action from the main menu.
It tried to keep it minimal, and imitate the style of logic already established.