Open
Description
Describe the bug
- It does not seem to be possible to set the parent of a GUI element to
guiRoot
. Also tested onroot
,resourceRoot
andgetResourceDynamicElementRoot(resource)
. - It does not seem to reset the position relative to the new parent when set (from window to another, for example). Repositioning does not reload the position.
To reproduce
- Create a GUI element and optionally another GUI element as the parent.
setElementParent(guiElement, guiRoot)
-> doesn't do anythingsetElementParent(guiElement, guiSecondWindow)
-> sets, but doesn't reposition relative to the new parent
Expected behavior
Set parent as requested and reset position relative to the new parent.
MTA Client:
Multi Theft Auto v1.5.5-release-13968
Additional context
- Discovered by Equis#9283 on Discord. Thank you.
- Related forum topic from 2012: https://forum.mtasa.com/topic/40855-setting-parent-element-for-gui/
- I'm carrying this information forward here from Equis, so I haven't yet personally tested this issue. If someone has a working solution, let's hear it.