Maaack / Godot-Game-Template

Godot template with a main menu, options menus, pause menu, credits, scene loader, extra tools, and an example game scene.
MIT License
283 stars 17 forks source link

Menu navigation is possible via directional input during title/sub-title fade animation, causing other buttons than Play to be focused when buttons appear #72

Closed hsandt closed 1 month ago

hsandt commented 1 month ago

Setting Game Scene Path allows to show Play button, but sometimes the Options button is still the one focused on start, instead of the expected Play button at the top.

EDIT: found cause: ghost navigation, see comment below

Btw nice addon, it goes farther than EasyMenus and already has Credits and above all, remappable controls! I'll use it from now on for my jams, and maybe even my other games!

hsandt commented 1 month ago

Sorry, wrong bug description. In fact, Play is really focused on start, but I can ghost select other buttons by pressing directional input during the title animation. Pressing down once during title fade in will select Options just below. Twice, Credits.

So the issue is that navigation is allowed while buttons are invisible.

hsandt commented 1 month ago

Similarly, it's possible to ui_accept a button and directly enter e.g. the Options during the title fade in, by pressing Enter.

Maaack commented 1 month ago

That's unintended behavior. I think player's would probably be more accustomed to the selection occurring after the buttons are fully faded-in. Being able to navigate to the options during the fade is also outright silly.

Thanks for reporting and the update :slightly_smiling_face:

hsandt commented 1 month ago

A side effect of this is that when entering Options this way, user is unable to click on the buttons except Back, at which point user can reenter Options to properly interact with the sub-menu.

It may be related to some canvas layer or interaction flag not set properly as the animation was interrupted.

However, it should be fixed along this bug. Forcing fade animation end by pressing Space or Enter, just as when you click, should solve the issue.

hsandt commented 1 month ago

Thx, looks like Godot Asset Library still shows 0.7.0 so I'll have to install the release from GitHub manually.

EDIT: Ah, this is for the whole Game Template, so I'll have to extract the Menu parts manually.

EDIT 2: and revert changes that change the path from res://addons/maaacks_menus_template/ to res://addons/maaacks_game_template/ ...

EDIT 3: and also copy changes from the example scenes over my customized copies (in this case I just had to copy the AnimationPlayer + AnimationTree from MainMenuWithAnimations.tscn to benefit from the new animated lock flag)

So I tested and fix confirmed! Pressing Enter now skips the title animation as it should instead of directly Starting the game.

Maaack commented 1 month ago

Thanks for confirming the fix. Sorry for the trouble with the menu's template being on an older version. I finished a jam and should have more time to sync the templates. Eventually I hope to find some way to automate that.