Replies: 3 comments
-
Nothing prevents you from using those controls in games 🙂 Also, it might be possible to use the base PopupMenu class directly (especially in 4.0 where abstract classes can be extended from script). |
Beta Was this translation helpful? Give feedback.
-
Its true that Godot Control nodes haven't a way to lock the invoker Control when a Popup gets invoked easily. Still you can do it manually disabling one by one Controls, but its not practical. It would be pretty handy. It would be nice to have a About your first statements on that there's no way to have another "window", you can do it by using multiple Canvas either in separate scenes or in the same (?). And with popups. But having such a thing would speed up GUI prototyping, which in certain cases can become tedious. What I really find that Godot needs, is a way to "better edit GUI visually" by drag-n-drop, selecting Controls from a sort of pallet, in a similar way that you would find in a game/app UI. |
Beta Was this translation helpful? Give feedback.
-
I've tried using the bare Popup as a base and it seems to fix the control issues I've been having. However, I agree having a GUI system more similar to the ones you find in most programming IDEs to be very helpful. |
Beta Was this translation helpful? Give feedback.
-
Lately I've been delving into building menus again in Godot and finding it frustrating. Godot has some nice tools for building a single menu screen, but makes it difficult to create more than one menu and to switch between them.
As someone who has done a lot of work creating windowed applications using typical AWT toolkits (Qt, Java Swing, wxWidgets, etc), I'm used to the idea of being able to place the controls inside of windows that separate them from other controls. For example, in many windows applications color pickers and file browsers usually pop up in their own window. Some are modal, meaning they block access to any other window your app has open until they're dismissed. Keyboard navigation will typically only occur withing this subwindow as well.
It would be very helpful if Godot had this behavior as well. I would like to be able to pick a Control, declare it to be 'modal' and then have all input events be exclusive to it as long as it is active.
For example, say I'm writing a JRPG style fighting game. I want the game to first pop up a menu with a list of actions the player can choose. If they choose to attack, this popups up a second menu that lets them choose their target. But then say they then decide to cancel - the target select menu should close and they go back to the action menu. Next they browse to the 'use item' action in the action menu. This then opens a new menu showing them a selection of items.
This would be fairly straight forward to do using a typical C++ windowing API, but I'm finding it very difficult to do in Godot because Godot doesn't really have the concept of a menu. While I can design multiple controls for my three menus, if more than one is onscreen at once, the user can click buttons in all of them - even ones that should be disabled because they've popped up a sub menu. Keyboard navigation also ignores that these are different menus and lets me cross from one menu right into the other. There's no real way to say "don't accept input to this menu until it's submenu is closed".
It would be very helpful to create a new sort of control that could act like it's the root of a modal window. When active it would confine input to its own children and would keep track of focus so that when a submenu closed it would restore it to the child that was focused before the submenu opened.
(I did see that Godot has window controls, but these seem intended to be used for editor tools rather than games.).
Beta Was this translation helpful? Give feedback.
All reactions