-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Implement 3D focusing for keyboard/joystick-based GUI #385
Comments
so I am trying to implement this and have seemingly did the 3 new focus neighbors (although I haven't tested it yet) anyways I have come across problems when trying to implement the click_instead_of_focus. basically I have realized that controls themselves don't have pressed logic and I need a universal way of reverting to the previous focus after the press is done or I guess ui_accept is released? I'm not quite sure how to go about this without having to implement it in every control that can be pressed. |
https://github.com/Shadowblitz16/godot
here is a project to test with the latest version I kinda need someone that knows the gui source better then me. |
FWIW, I noticed while researching something else that there is some existing support for remembering the previous focus item, implemented for modal dialogs: https://github.com/godotengine/godot/blob/cf8c679a23b21d6c6f29cba6a54eaa2eed88bf92/scene/main/viewport.cpp#L2716-L2730 Perhaps that might be a starting point for you? |
Describe the project you are working on:
Space ship game
Describe the problem or limitation you are having in your project:
I keep having problems with keyboard and gamepad based gui because as you may have noticed controls games have nested focus based controls.
for example say you have a button that when pressed goes to a different part of the ui and when you press back you might go back to the previous parts of the ui.
you may also have a control that when selected automatically focuses onto a part of the gui.
Describe how this feature / enhancement will help you overcome this problem or limitation:
basically it would add 3 new focus neighbors to controls.
and 4 flags to controls
Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Describe implementation detail for your proposal (in code), if possible:
just pseudo code but here is a example
If this enhancement will not be used often, can it be worked around with a few lines of script?:
this would probably be used alot for console games and might be doable with a script but it probably would require more then a few lines.
but again, it would be a really nice feature to have and would be used alot for things like menus.
(EDIT) I don't know if this is doable actually since there is no real way to simulate something like a button press
Is there a reason why this should be core and not an add-on in the asset library?:
easability with console games
The text was updated successfully, but these errors were encountered: