I am experiencing something of a strange issue with a textbox in a custom window and I'm not sure if I'm doing something wrong or if there is something else behind the scenes causing the issue. If anyone would care to take a look at the window code (attached) and/or offer any insight it would save what little hair I haven't already pulled out.
The history of this is; I'm having some issues with another, unrelated, mod and I wanted to be able to get some in-game debugging information so I created a "debug window" of sorts and set it up so that I could output text and other info from UI code so that I could see what is happening in "real time".
The way it works is that you can set a property of a button in the debug window and then "press" the button to print out the (text) value of the property set on the button.
This all works fine initially while the debug window is not visible (its not shown by default). I can run the commands from any bit of code and the output is logged into the textbox as it should be.
The problem comes when I show the window so that I can see/use it. After the (debug) window has been shown it stops accepting any commands/input from any window outside of the "Custom" node. However, any commands coming from within the debug window or any other window under the Custom node continue to work as they should.
This can be tested by using the "property inspector" box included in the debug window. How this box works is; You type in the path (relative to the Root node) to a UI element property and hit the "GO" button. It then logs the value of the property (if it exists) into the textbox (or just shows the command text if the property doesn't exist).
If anyone is interested in testing this (and Thank You in advance) you can use the attached file and include it in the custom file as such:
Code:
<include>llama_debug_window.xml</include>
Then, from any place in the code (for any window), you can use the following two commands:
Code:
<path to Custom>.LlamaDebug.log.logtext = <whatever you want to log>
<path to Custom>.LlamaDebug.log.Press = true
where "path to Custom" is the path to the Custom window relative to the object on which the code is being run.
If you place those commands into any script code on a object (e.g. a button) and then "execute" that code (i.e. click the button) while the debug window is hidden it will/should print out the text into the debug window. Then show the debug window using
Code:
show_window Custom.LlamaDebug
and execute the code again it won't/shouldn't show any additional text in the debug window (if the command is coming from a window outside of the Custom node but will still work fine if the command is coming from a window under the Custom node). For example:
- Place the code into the "OnPress" of the EQII button
- Load up the game and click the EQII button a couple times
- Show the debug window (your debug text should be there)
- Click the EQII button again (nothing new shows up)
- Type "MainHUD.Player.Name.LocalText" into the smaller input box and click the GO button (it should show your character name).
I have been looking at this for 2 days and cannot figure out why it stops accepting input from windows outside the Custom node after it (the debug window) has been shown. Its almost as if there is some hidden barrier between the Custom windows and the rest of the UI elements.