Automatically showing windows...
Ok I searched the forums and I could not get a clear cut answer on this so I am asking here. If this has been resolved elsewhere please direct me, I hate to clutter up the forums. I have created a new page called titan and within that page is an image. The only way I can get it to show is by /show_window MainHUD.titan. I have tried the following and they do not work.
onHide: Visible=True onHide: show_window=MainHUD.titan onHide: (show_window=MainHUD.titan) onHide: show_window=MainHUD.titan show_window=MainHUD.titan onHide: /show_window MainHUD.titan onHide: (show_window=MainHUD.titan, show_window=MainHUD.titan) Ok now after all that I am about to go crazy. Am I missing something? I will be forever gratefull if someone can help me out with this one. TyeJae |
A custom window can't show itself. You need another window to call "show_window=(MainHUD.titan) show_window=(MainHUD.titan)" from an OnEvent.
Quib |
Quote:
onShow: show_window=(MainHUD.titan) show_window=(MainHUD.titan) Will that work? TyeJae |
Yes, as long as you set Visible="false" in your group window (EQ2 should automatically open the window, even if you set it to Visible="false").
Quib |
Quote:
TyeJae |
Question:
Can you have it open more than 1 window? like 2 OnShow events or, 2 in 1? For example, open up 2 different custom UI's from loading of a default one? |
You could open up theorhetically an infinite amount.
show_window=x has to be called once to initialize that objects show_window property. Any show_window call thereafter will open the window with that name. Remember that scripts run right to left on the same line, top to bottom using line returns. So, if you wanted to open 2 custom windows using a normal window, you'd use something like: Code:
show_window=(MainHUD.Custom1) show_window=(MainHUD.Custom1) Code:
show_window=(MainHUD.Custom3) show_window=(MainHUD.Custom2) show_window=(MainHUD.Custom1) show_window=(MainHUD.Custom1) Code:
show_window=(MainHUD.Custom1) Custom1 is getting called twice to make sure that object's show_window property is getting initialized. Quib |
Thanx Quib, you da man! ;)
|
OK hmmm. It doesn't seem to be working for me:
I'm using this code: Code:
OnHide="visible=true show_window=(MainHud.Clock) show_window=(MainHud.Clock) show_window=(MainHUD.Inventory)" |
OnEvents are processed from right to left, so show_window=(MainHUD.Inventory) is initializing the show_window value but not displaying it. Also, show_window=(MainHUD.Clock) is unnecessary for the clock window; OnHide="visible=true" is all the clock window needs to display. The code you'll want to use is:
Code:
OnHide="visible=true show_window=(MainHUD.Inventory) show_window=(MainHUD.Inventory)" |
Ahhh right to left.. that's... odd :confused:
Yeah, alright got it now. I saw you posted right to left above... but in my mind it registed left to right.. whoopsie :o |
Actually, the "once to initialize" theory is incorrect. The script only executes as a command if the object's property is already set to what you're trying to execute.
Edit: Or maybe OnPress scripts are different from OnHide scripts? These were tested with a button. As demonstrated by these scripts: The following results in no output: Code:
say='Initialize' Code:
say='This is test 1, quotes only' The following two scripts only output You say, "This is test 1, quotes only" Code:
say='This is test 1, quotes only' say='This is test 1, quotes only' say=('This is test 2, order 1') say='(This is test 3, order 2)' Code:
say=('This is test 2, order 1') say='(This is test 3, order 2)' say='This is test 1, quotes only' say='This is test 1, quotes only' The following outputs each line once: Code:
say='This is test 1, quotes only' say='This is test 1, quotes only' Code:
show_window=(Inventory.Inventory) Code:
show_window=(Inventory.Inventory) Edit: Conclusion first. |
Well wierd...
|
Whoa, thanks for the comprehensive testing Deathbane27. All the OnEvents parse scripts the same, so my assumption was completely wrong; I had simply regurgitated what I read elsewhere.
So there you have it folks; every show_window=(*) command must be run twice in a row to make a window show. As a side note, Zonx sorta got around this by setting the show_window property of an object directly then only had to call show_window=(*) once in the OnEvent to make that window show. Quib |
All times are GMT -5. The time now is 03:40 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI