EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > Developer Discussion > XML Modification Help & Info

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 01-01-2005, 12:56 PM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Question Anyone know about Event Properties: OnActivate, OnDisable, ...?

Since the guide is almost moot on the subject I was just wondering if anyone has any information on how to work with these. Specifically how to get them to control another object. Say my tree looks like this:


Tier1
+Tier2
++Tier3


I have figured out that I can go into Tier3 and put in on the OnActivate [opacity=0] and it will change the Tier3 opacity. Well I want to say, put in the OnActivate for Tier3, I want it to change the opacity of Tier1, or 2, any ideas on this? I've tried a few different ways with no luck at all. Thanks in advance.

RECAP: What we have figured out up until post #28
"/" commands work.
ie: Onpress: /dance (will make you dance)

"/" commands that require parameters need special formatting.
OnPress="say='this is a test' say='this is a test'"

You can control other objects from another.
ie:
root
+mainhud
++Map
+++Somemapelement
.
working with somemap_element and putting in
OnPress: Parent.Size="2,2" (will make Map size 2,2)
OnPress: Parent.Parent.Opacity="0" (will make mainhud invisible)
OnPress: Parent.Parent.Player.Healthbar.Opacity="0" (will make healthbar in Player invisible)

You cannot Parent.Parent... up to the root level
ie: In mainhud.player you cannot use Parent.Parent.Inventory.Market.Blah

Update with discovery by Zonx:
Instead simply ignore the module level. Parent.Market.Blah



You can use math commands.
You can't do math on things with multiple values (Size, for instance)
Math works on text objects (though it makes it show 3 decimal places whether you like it or not; 6+1=7.000)
If you're using math, you need to make sure you're using the full reference.
ie:
OnPress="parent.BLARG.opacity=(parent.BLARG.opacity-0.05)" works.
OnPress="parent.BLARG.opacity=(opacity-0.05)" checks the opacity of the button you're pressing, not BLARG.

You can't change the Opacity values of windows with eq2usescomwndcontrols="true", the Window Settings opacity value will instantly go back into effect.
You can use Visible to show/hide the frame/titlebar/backdrop, though.

You can use ! to reverse Boolean values... OnPress="parent.Test.visible=(!parent.Test.visible)" works great.

How to do IF statements.
OnPress="Param=((parent.Test.visible)==(true))" Sets Param to the true/false value of the statement. ==, >, and < operations are supported. !=, <=, and >= are not, but you can get around them using ! on the statement.

Various changes to bring up to date. -Deathbane

Last edited by Deathbane27 : 04-12-2005 at 09:05 AM.
Reply With Quote
  #2  
Unread 01-02-2005, 04:40 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

We were discussing this here:
http://www.eq2interface.com/forums/showthread.php?t=806

But all we could get it to do was post single-word slash commands like /toggleshowadventurexp and /showinventory...

So THAT is why = had such an interesting property...

Working with this now, I'll let you know what I find.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 05:56 AM.
Reply With Quote
  #3  
Unread 01-02-2005, 06:05 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

You can do math!

Code:
<Button Name="WEE" Opacity="0.750" OnPress="opacity=(1-opacity)" Size="100,40" Style="/ButtonStyles.text_button_default">WEE</Button>
Makes a button that switches between 75% and 25% opacity every time you click it.

Still working on referencing other UI elements. (My test window has 6 buttons so I can do 6 tests per UI reload, might want to do something similar.)

Please use this thread to discuss UI element scripts. Use the other thread for attempts to get multi-word slash commands working.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #4  
Unread 01-02-2005, 06:15 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

If you're using this to change Text/LocalTooltip attributes, you can use single quotes to put in spaces. This still doesn't help execute slash commands, though. (Tried OnPress="OnPress='/mood happy'". Clicked it second time and it did /mood then /happy, as usual.)
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #5  
Unread 01-02-2005, 06:26 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

(Buttons are in Player window. Buttons "WEE" through "WEE4" try to control button "BLARG".)

Following doesn't work: (OnPress="" implied)


BLARG.Opacity=0
/BLARG.Opacity=0
.BLARG.Opacity=0
\BLARG.Opacity=0
MainHUD.Player.BLARG.Opacity=0
root.MainHUD.Player.BLARG.Opacity=0
/MainHUD.Player.BLARG.Opacity=0
/root.MainHUD.Player.BLARG.Opacity=0
\MainHUD.Player.BLARG.Opacity=0
../BLARG
../
..

Replacing the period between BLARG and Opacity with any of the following characters also does not work:
: -


+ kills everything before it and makes it refer to itself, unless you start with /


If at first you don't succeed... blame Microsoft!



You can change multiple attributes at once. OnPress="opacity=0.75 size=200,50 text='Clicky time!' dance" does successfully change the opacity, size, and text, and make your character dance.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 06:59 AM.
Reply With Quote
  #6  
Unread 01-02-2005, 06:56 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

I myself tried many of those, but didn't document which ones as I was just in a mad frustration of throwing weird things in. This would be such a useful property if we can just figure out how to use it, that is if it is possible to do this with it. Thanks for trying and I'll keep you up to date with any discoveries.

--edit--
I do remember I tried
eq2ui.MainHUD.Player.BLARG.Opacity=0
eq2ui.xml.MainHUD.Player.BLARG.Opacity=0
Reply With Quote
  #7  
Unread 01-02-2005, 07:05 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

FOUND IT!!!!!!!!!!!!!!!!!!


Parent.Element.Property=Value

So to change the opacity of HealthBar, which is on the same page as the button you press, you use:

OnPress="Parent.HealthBar.Opacity=0.250"

WOOT!

BUWAHAHA!!! I've got a button in my Player window that changes the color of my Compass!



Edit: And you can use Parent.Parent to refer to two pages above you, etc.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 05:06 PM.
Reply With Quote
  #8  
Unread 01-02-2005, 07:20 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Hmm.

There doesn't appear to be any way to reference "root", and thus you can't reference anything in Inventory from MainHUD, for example. Still looking.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #9  
Unread 01-02-2005, 07:36 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

WOW!! What devolpments.. Too bad I'm dead tired and need sleep..

HowAbout Parent.Parent.
Reply With Quote
  #10  
Unread 01-02-2005, 07:38 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

I can't believe it, that is awesome...trying it with my app right now....
Reply With Quote
  #11  
Unread 01-02-2005, 07:40 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Tried that, if you Parent past MainHUD it doesn't do anything.

(If Parent refers to MainHUD.Player, and Parent.Parent refers to MainHUD, then Parent.Parent.Parent.Inventory should refer to Inventory, but doesn't.)

Nuts, you can't do math on things with 2 values (Size, for instance). I was hoping for a hotkey bank with scaling buttons. Nor Boolean values. (1-true isn't false, sadly.) (EDIT: Use ! to invert true/false.)

Can't change the Opacity values of windows with eq2usescomwndcontrols="true", the Window Settings opacity value will instantly go back into effect. You can use Visible to show/hide the frame/titlebar/backdrop, though.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 05:07 PM.
Reply With Quote
  #12  
Unread 01-02-2005, 07:50 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by Deathbane27
Tried that, if you Parent past MainHUD it doesn't do anything.

(If Parent refers to MainHUD.Player, and Parent.Parent refers to MainHUD, then Parent.Parent.Parent.Inventory should refer to Inventory, but doesn't.)

Nuts, you can't do math on things with 2 values (Size, for instance). I was hoping for a hotkey bank with scaling buttons. Nor Boolean values. (1-true isn't false, sadly.)

Can't change the Opacity values of windows with eq2usescomwndcontrols="true", the Window Settings opacity value will instantly go back into effect. You can use Visible to show/hide the frame/titlebar/backdrop, though.
Gah.. Now I gotta play with this stuff!! Guess I'm not going to sleep tonight
Reply With Quote
  #13  
Unread 01-02-2005, 07:57 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

My dearest Insomniac,

Add OnHide="visible=true" to the Clock window.

Your annoying sidekick-wannabe,
Deathbane





Unfortunately, this doesn't work on custom windows. I can't even get OnPress to work. Was hoping I could get Ellyanna's stat window to autoload or at least OnHoverIn on something...

We still need to get multiword slash commands working!
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 09:10 AM.
Reply With Quote
  #14  
Unread 01-02-2005, 08:03 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

Der.........

Last edited by Eloa : 01-02-2005 at 08:10 AM.
Reply With Quote
  #15  
Unread 01-02-2005, 08:11 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

You know this is likely to be one of the biggest discoveries of the UIBuilder in quite a long while...Congrats Deathbane
Reply With Quote
  #16  
Unread 01-02-2005, 08:13 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Bah, you give me too much credit. We were all poking sharp sticks into the darkness, I just hit the beast's eye first.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #17  
Unread 01-02-2005, 08:16 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

Hmmm....Just discovered a small prob, so Mr. UI man maybe you have a solution for it. I have a Tabpane with the names of all the maps that I have, when I resize the window smaller the tabs stick out the end. You messed with this at all or maybe with our newfound knowledge can think of something real quick to do it something like the UIBuilder itself does with all the tabs (make them scrollable)?
Reply With Quote
  #18  
Unread 01-02-2005, 08:25 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Hmm...

I was thinking you could make buttons with OnPress="Parent.TabPage.Location=(Locaiton-5,Location)" to scroll left or right, but I can't get math to work on coordinate data.

What I'm thinking is set up 3 location buttons and 2 sub-pages. Have the first sub-page be a thin strip, and within that a strip that's too wide to fit inside it. Have the tabs in the second sub-page. Use the buttons to alter the location of that sub-page in such a way that different tabs are visible in the window with each button.

That's the best I can come up with at the moment.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #19  
Unread 01-02-2005, 08:26 AM
Eloa Eloa is offline
EQ2MAP Webmaster
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Unkown
Posts: 496
Default

Gotcha, I think that should work just fine. Thanks
Reply With Quote
  #20  
Unread 01-02-2005, 08:34 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Quote:
Originally Posted by Deathbane27
Hmm...

I was thinking you could make buttons with OnPress="Parent.TabPage.Location=(Locaiton-5,Location)" to scroll left or right, but I can't get math to work on coordinate data.

What I'm thinking is set up 3 location buttons and 2 sub-pages. Have the first sub-page be a thin strip, and within that a strip that's too wide to fit inside it. Have the tabs in the second sub-page. Use the buttons to alter the location of that sub-page in such a way that different tabs are visible in the window with each button.

That's the best I can come up with at the moment.
Only problem is without an if statment there's no way to tell it to stop scrolling in either direction.. Plus the math thing...

I hope since theres math statements there are boolean statements like
== (equals), != (doesn't equal)...

Too tired to play around with it.. Good luck guys, have fun..

Last edited by Talyns : 01-02-2005 at 08:37 AM.
Reply With Quote
  #21  
Unread 01-02-2005, 08:40 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Quote:
Originally Posted by Talyns
Only problem is without an if statment there's no way to tell it to stop scrolling in either direction..
If the user can't figure out when to stop scrolling by the blank space that starts showing up when he clicks too many times...


Side note: If you're using math, you need to make sure you're using the full reference.

OnPress="parent.BLARG.opacity=(parent.BLARG.opacity-0.05)" works.
OnPress="parent.BLARG.opacity=(opacity-0.05)" checks the opacity of the button you're pressing, not BLARG.

Quote:
Originally Posted by Talyns
I hope since theres math statements there are boolean statements like
== (equals), != (doesn't equal)...
Yeah, you can use ! to reverse Boolean values... OnPress="parent.Test.visible=(!parent.Test.visible)" works great.

Unfortunately I don't think there's an "if" statement. OnPress="if(parent.Test.visible==true)visible=false" hides the button whether Test is visible or not.
__________________
If it ain't broke, it needs more features!

Last edited by Deathbane27 : 01-02-2005 at 09:39 AM.
Reply With Quote
  #22  
Unread 01-02-2005, 09:29 AM
Talyns's Avatar
Talyns Talyns is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Everfrost
Posts: 604
Default

Gah, this is on my mind, can't sleep.. Here's something that is nice to know.. You don't have to load eq2 to test script on buttons it works in UIBuilder (in play mode)
Reply With Quote
  #23  
Unread 01-02-2005, 09:45 AM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Math works on text objects (though it makes it show 3 decimal places whether you like it or not; 6+1=7.000) so I think I could actually make a little minigame window with a running score total if I wanted.

Just need to figure out what kind of game I can do without any if/then statements. I was thinking one of those puzzles where you press a button, and it and all the bordering buttons change states. That part would be doable, but there'd be no way to tell when to advance to the next stage...
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #24  
Unread 01-02-2005, 05:09 PM
Deathbane27's Avatar
Deathbane27 Deathbane27 is offline
aka Mook
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Jul 2004
Server: Nektulos
Posts: 1,451
Default

Nuts. I was hoping to fix the 2/3 bag size problem, but none of the events are triggered by the presence or lack thereof of the individual slots.
__________________
If it ain't broke, it needs more features!
Reply With Quote
  #25  
Unread 01-02-2005, 05:37 PM
Dolby's Avatar
Dolby Dolby is offline
Bacon Eater
Premium Member
EQ2Interface Admin
This person is a EQ2Map developer.
 
Join Date: Feb 2004
Posts: 2,452
Default

Great work guys, very interesting find. I'm stuck at work but want to get home and start playing with this. See what practical uses can come from this.
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:45 PM.


Our Network
EQInterface | EQ2Interface | WoWInterface | LoTROInterface | ESOUI | MMOUI