Quote:
|
Originally Posted by Solf
Oh, OnShow _is_ fired, I know for sure. In my code it does many things, not only windows showing. And everything else works.
Setting Visible=true on custom windows appears to do nothing. Or, more correctly, it doesn't show them UNLESS you've already activated them once with show_window command (which doesn't need to be issued twice, btw, if you issue it as you would from in-game prompt (OnActivate="show_window MainHUD.Compass.Solf.ShowWindows") and not using that fancy = syntax).
So, basically, my experience thus far is:
- If you want for window to be shown (_any_ non default hud window including such things as ZoneReuse window), you HAVE to issue show_window command. Setting Visible=True has no effect prior to show_window.
- After show_window has been successfully issued, you can manipulate window using Visible=true/false.
- show_window appears to do NOT work when issued from OnShow handler of the standard windows that are automatically-shown (i.e. it doesn't work for Compass window, but it does work for Target window that is not shown immediatelly).
I've ran quite a few tests of all this.. and I'm reasonably sure that it is how it works.. unfortunately.
Of course, it still doesn't preclude me being wrong  If someone has a working code sample to share that would auto-show custom windows on startup -- I'd greatly appreciate that 
|
- If you want for window to be shown (_any_ non default hud window including such things as ZoneReuse window), you HAVE to issue show_window command. Setting Visible=True has no effect prior to show_window.
Not true, you have to back out far enuff to get a handle on the window you want to be visible by calling its parent node. Yes you can use show_winodw command like you do but you are causing the game to execute the show_window code where if you do Parent.blah.visible=True you bypass that step freeing up clock cycles. All the show_window command does is set visible to true, it works kind of like an API call.
- After show_window has been successfully issued, you can manipulate window using Visible=true/false.
show_window never has to be used to make a window visible
- show_window appears to do NOT work when issued from OnShow handler of the standard windows that are automatically-shown (i.e. it doesn't work for Compass window, but it does work for Target window that is not shown immediatelly).
Correct, and thats because when it first proccesses the file its visible property is already set to true. If you go into the file and add visible=False it will fire when its proccessed.