 |

04-09-2005, 11:37 AM
|
 |
Steward of the Faithful
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 580
|
|
IFs and Frame/Title defined window states
A while back I tried to set up my 3/4 size bag mod to have three different states: none/vertical, frame only/horizontal, frame & titlebar/square. I ran into some serious issues with switching back and forth from frame & titlebar to none, so I scrapped the idea. With Deathbane27's recent discovery of working IF statements I figured I'd give it another shot, using chaned IF buttons to determine whether the user was changing from none to frame only or frame & tilebar and whether the user was switching from frame & titlebar to frame only or none. The problem I'm running into is that the buttons don't actually seem to be triggering. That is, I'm not seeing any change in the bag layout/dimensions where I would expect to if the buttons were being auto-clicked as they should.
Attaching it here in the hopes that one of y'all can figure out what I missed.
P.S. No, StayPut (tm) still doesn't work quite right on this version. Bags will retain their horizontal position, but not the vertical, and I think they only retain horizontal because the horizontal size in my tests was the same as that defined in the XML.
__________________
|

04-09-2005, 01:10 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
Ger, values and events used by the UI, not exposed in the XML are often inaccessable to scripting. They can often change stuff without updating the XML values.
When working with the ColorPicker, I tried to capture the click event using every known OnBlah handler and never could extract or ovreride the script. Its quite possible visibility set by WindowOptions can't be tested or set via XML.
It for sure over-rides XML settings. Forgot about this recently and had some WC_XXXbuttons set to invisible in XML showing up in-game due to the Option settings.
If you haven't already, I suggest running a little test. Set Slot 0's OnHover="LocalTooltip='parent.WC_Titlebar.visibile'"
Login, then check the tooltip value of Slot 0 with various WindowOption settings. If its doesn't change when you change WindowOptions, you're never gonna get a proper IF test.
|

04-09-2005, 01:12 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
BTW, you could acheave the same result with a single button that cycles through several configs, regardless of the WindowSettings 
|

04-09-2005, 03:25 PM
|
 |
Steward of the Faithful
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 580
|
|
Quote:
|
Originally Posted by Zonx
BTW, you could acheave the same result with a single button that cycles through several configs, regardless of the WindowSettings 
|
No, I couldn't. A single button that cycled through the settings wouldn't save its state across logouts. Thanks for the tips, I'll give them a try.
Duh, just realized—I already know that OnHide/OnShow works for frame/titlebar settings. The last time I tried it it worked fine with the huge command list in the frame/title onhide/shows, but only if you changed things 1 step at a time. For some reason it just doesn't seem to be passing the Press=true thing now.
__________________
Last edited by ger : 04-09-2005 at 03:28 PM.
|

04-09-2005, 04:10 PM
|
 |
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Apparently "Press=false" triggers OnPress. "Press=dasouifh234" and "Press=YourMomIsUglyButNotAsUglyAsMe" also trigger OnPress it looks like. The problem is not that it isn't triggering, the problem is that it's triggering BOTH.
Should work if changed to Activated=true/false, and change the triggered buttons from OnPress to OnActivate.
__________________
If it ain't broke, it needs more features!
Last edited by Deathbane27 : 04-20-2005 at 05:13 AM.
|

04-09-2005, 05:13 PM
|
 |
Steward of the Faithful
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 580
|
|
Okay, changed everything over to the Activated/OnActivate model. Running into the same problem I did before the IF statements were discovered. When changing from Frame & Titlebar to None or None to Frame & Titlebar two state-change buttons are being pressed. But that shouldn't be possible if the visibilities are set at the same instant as would be suggested by previous information. *sigh* Attaching version with error-checking text objects for the curious to peruse. If you spot something I missed please let me know.
__________________
|

04-10-2005, 04:24 AM
|
 |
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Found one/the problem: All of your scripts say
Parent.'Slot 1'.Location=... (or .OnShow or .Visible)
It should be
'Parent.Slot 1.Location'=...
__________________
If it ain't broke, it needs more features!
Last edited by Deathbane27 : 04-10-2005 at 04:40 AM.
|

04-10-2005, 04:38 AM
|
 |
aka Mook
|
|
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
|
|
Everything is now working as you describe it should. I think the misplaced single quotes was the issue.
(I changed some of the scripting around to be more to my tastes, as I have trouble wrapping my head around most other people's logic, and I had to change it to where I understood each step. Basically added Activated=false to the end of all the OnActivate scripts and removed it from the scripts triggering the activation. There might be other changes in there that I don't remember, though.  If it annoys you then just fix the quote problem on your version.)
__________________
If it ain't broke, it needs more features!
|

04-10-2005, 08:29 AM
|
 |
Steward of the Faithful
|
|
Join Date: Nov 2004
Server: Antonia Bayle
Posts: 580
|
|
Annoys me? It works! *dances like a fool* Thank you so much. 
__________________
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:51 PM.
|
 |