How to I create a top level ui element that will disable player input when visible?
I want to stop the player from being able to run around and cast spells while interacting with my UI
This is the behavior in menus. I also noticed the error frame behaves this way. I can't figure out what makes it special. Edit: Just noticed the typo in the title, no idea how to change it xD |
The keywords, you are looking for, are "scene" and "fragment".
You create a new scene there your top level window (as part of a fragment) is shown. If you add additional built-in fragments, you get the behavior like the menus. Or you register a new "dialog" (ZO_Dialogs_RegisterCustomDialog) and call ZO_Dialogs_ShowDialog |
Maybe th modal underlay at dialogs is also what you are looking for:
https://github.com/esoui/esoui/blob/...dialog.xml#L72 It creates something like a black transparent overlay below the modal and you cannot click anything except the shown dialog. The code is an animation and maybe you can use it as well (self = the dialog int his case, so it could be your TopLevelControl or fragment control here): Lua Code:
|
Thanks for the tips!
Quote:
Quote:
|
After looking at the scene/fragment model, I see that fragments wrap around your control. So, I don't necessarily need a custom fragment.
|
Quote:
To stop all movement you can re-use STOP_MOVEMENT_FRAGMENT instance. |
Thanks for the help! I've been trying to add the ability to press a button while a redial menu is open to quickly set the selected entry. Adding some of the standard UI fragments got me the behavior I wanted :D
Lua Code:
|
All times are GMT -6. The time now is 08:07 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI