EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   XML Modification Help & Info (https://www.eq2interface.com/forums/forumdisplay.php?f=22)
-   -   Anyone know about Event Properties: OnActivate, OnDisable, ...? (https://www.eq2interface.com/forums/showthread.php?t=845)

Talyns 01-03-2005 03:44 AM

Quote:

Originally Posted by Talyns
I was able to create a chat window that Has Minimize and Restore Buttons..
Also added a button to toggle the input area on and off..
None of it saves when you log out though.. When you log in all chat windows will look normal again.. If you had a minimized window it will be minimum size..

I think it's a good idea NOT to remove the input bar or minimize your mainchat window (IE 1st chat window).. You will no longer be able to bring up the chat input with enter, or '/' , etc..

When the input bar is missin; to resize the window from the bottom you have to grab where the bottom frame would be on the input bar..

this is what the code looks like (Will only work in my window though)

ChatInputToggle:
Code:

Parent.Parent.InputVisible.Visible=(!Parent.Parent.InputVisible.Visible)
Parent.Parent.ChatInput.Visible=Parent.Parent.InputVisible.Visible
Parent.Parent.WC_Frame.WC_ChatInputFrame.Visible=Parent.Parent.InputVisible.Visible
Parent.Parent.WC_Frame.NewImage.Visible=Parent.Parent.InputVisible.Visible
Parent.Parent.WC_Backdrop.InputBack.Visible=Parent.Parent.InputVisible.Visible
Parent.Parent.DefaultChannelButton.Visible=Parent.Parent.InputVisible.Visible

MinimizeButton:
Code:

Visible=false
Parent.Restore.Visible=true
Parent.Hide.Visible=false
Parent.Parent.DefaultChannelButton.Visible=false
Parent.Parent.ChatDisplay.Visible=false
Parent.Parent.ChatInput.Visible=false
Parent.Parent.WC_Frame.Visible=false
Parent.Parent.WC_Backdrop.Visible=false
Parent.MinBorder.Visible=true
Parent.MaxBorder.Visible=false
Parent.Parent.InputVisible.Size=Parent.Parent.Size
Parent.Parent.MinimumSize=160,20
Parent.Parent.Size=160,20
Parent.Parent.UserResizable=false

Restore:
Code:

Visible=false
Parent.Minimize.Visible=true
Parent.Parent.DefaultChannelButton.Visible=true
Parent.Parent.ChatDisplay.Visible=true
Parent.Parent.ChatInput.Visible=Parent.Parent.InputVisible.Visible
Parent.Parent.WC_Frame.Visible=true
Parent.Parent.WC_Backdrop.Visible=true
Parent.MinBorder.Visible=false
Parent.MaxBorder.Visible=false
Parent.Parent.MinimumSize=256,160
Parent.Parent.Size=Parent.Parent.InputVisible.Size
Parent.Parent.UserResizable=true
Parent.Hide.Visible=true

If you want to check it out look here:
http://www.eq2interface.com/forums/s...&postcount=117
You'll need TabletsII_Beta_5..

edit: Hmm can't figure out what that odd spacing is.. Doesn't look that way in the edit messageBox ..

Eloa 01-03-2005 04:29 AM

Not a property:
OnResize :mad:

insomniac 01-03-2005 04:34 AM

I somehow totally missed this thread till deathbane pointed it out to me on chat (chat btw, is very cool and more people should come play..anyway). OnHide="visible=true" is in my clock window and it rocks (thanks death!) I am still stuck on practial applications for this stuff, and a recap would be nice, its alot of stuff to go through.

when you do something like OnPress="Parent.HealthBar.Opacity=0.250" what says "healthbar" will do anything? is it the name= of the object? is there any shot of mapping this to a keyboard press instead of a button?

Eloa 01-03-2005 04:53 AM

Your recap is on the first post.

Eloa 01-03-2005 05:08 AM

I doubt that it'll be doable with a keyboard button with what we know now. I honestly doubt it'll be doable at all.

Found any way to get plain text to react to a click or onpress? That'd be pretty helpful

Deathbane27 01-03-2005 09:45 AM

Quote:

Originally Posted by insomniac
I somehow totally missed this thread till deathbane pointed it out to me on chat (chat btw, is very cool and more people should come play..anyway).

Update your sig with the correct server address. ( irc://mesra.dal.net:7000/eq2interface ) And make a sticky. :p

Quote:

when you do something like OnPress="Parent.HealthBar.Opacity=0.250" what says "healthbar" will do anything? is it the name= of the object?
Yes, it's the Name= portion.

Quote:

is there any shot of mapping this to a keyboard press instead of a button?
Tried, no luck. It doesn't seem to want to do anything that's not already in that file.


Quote:

Originally Posted by Talyns
I was able to create a chat window that Has Minimize and Restore Buttons.
Also added a button to toggle the input area on and off...

Sweet, you beat me to it. :D That's the kind of useful stuff I was hoping for, glad it's already begun.

Talyns 01-03-2005 09:48 AM

Check out my beta thread I added a 4 way switch.. Although I kinda broke the restore and minimize buttons :)

Deathbane27 01-03-2005 10:20 AM

By the way, it's perfectly acceptable to have an event change its own action.

OnPress="parent.size=100,100 OnPress='parent.size=200,200'"

First time you press that button, it'll go half size. Second press it will restore. Problem is it won't reset the second time. To get around that? DUMMY VALUES!

OnPress="parent.size=500,400 onpress=press2"
press1="parent.size=500,400 onpress=press2"
press2="parent.size=147,280 onpress=press1"


That button will toggle the parent page between the two sizes every time you press it for all eternity. :D (Or until your mouse breaks.)

That auto-showing clock I figured out for Insomniac? Problem is you can never close it with /hide_window. :p

OnHide="visible=true" OnHoverIn="OnHide=' ' "

THAT version has the clock show up on initial load, then has it ignore future OnHide events when you put the mouse over it so you can close it with /hide_window if you wish. (I tried blocking the OnHide in OnShow or OnHide, but it appears to call that two or three times during load. Clock window is extra stubborn. :mad: )

Deathbane27 01-03-2005 10:33 AM

Talyns: Thanks for finding out that you can put newlines within the script quotes. Putting them between elements causes the ui to break. :p

Talyns 01-03-2005 10:38 AM

In case you didn't know:
If you double click say, OnPress in UIBuilder.. Not the value the label.. A box will open that will let you edit in it :D
(A value must be present for it to work)

Eloa 01-03-2005 11:06 AM

So what you did having that button change back and forth is basically creating variables right? or no?

Talyns 01-03-2005 11:14 AM

That's what I would call it :)
I used something similar to rearrange the chat window..
I made my varibles to hold different sizes out of pages, that way all sizes change when window is sized..

Deathbane27 01-03-2005 11:22 AM

Quote:

Originally Posted by Eloa
So what you did having that button change back and forth is basically creating variables right? or no?

Talyns used 4 seperate buttons in the same place, each one hiding itself and making the next one visible. (But as you can see he did use variables to save the current sizes... need to take a look at this.)

But you can do variables just fine too to do it all with one button if you want.

Edit: Bah.

insomniac 01-03-2005 03:31 PM

cool eloa, thanks for the recap.
as for parenting up to the root.. has anyone tried it dynamicdata style?
inventory.inventory.buttonthingy.size?

Agathorn 01-09-2005 10:19 PM

How far "back out" can I go?

If I have a button that exists in say Root.MainHud.StartButton can I adjust properties in say Root.MainHud.Hotkey -- not really what I want to do but just examples.. IE Can I reference and modify the properites of a different window within the same overall page, in this case MainHud.

Something like this in the startbutton window: Parent.Parent.Hotkey.Property=Value?

Deathbane27 01-09-2005 10:30 PM

Quote:

Originally Posted by Agathorn
How far "back out" can I go?

If I have a button that exists in say Root.MainHud.StartButton can I adjust properties in say Root.MainHud.Hotkey -- not really what I want to do but just examples.. IE Can I reference and modify the properites of a different window within the same overall page, in this case MainHud.

Something like this in the startbutton window: Parent.Parent.Hotkey.Property=Value?

Yes, you can do references between windows within MainHUD, Inventory, Etc. all you want, just be sure not to go all the way back to root.

Agathorn 01-09-2005 10:42 PM

Thank You.

wpgreywolf 02-06-2005 06:00 PM

Found a decent use for this
 
I added a Character Button onto my Persona Page, that toggles MainHUD.Character on/off

Here is the code i added

<Button LocalText="Character" Location="0,132" Name="CharacterButton" OnPress="parent.parent.parent.parent.Character.visible=(!parent.parent.parent.pa rent.Character.visible)" ScrollExtent="73,27" Size="73,27" Style="/t_Styles.DefaultButton">Character</Button>

I added this code right before

<Button LocalText="Cancel"......

this was done on the TabletsII UI so your spacing may be different

Quib 02-06-2005 06:26 PM

I'm happy to see ! reverses boolean values. Nice discovery!

Quib

Deathbane27 02-06-2005 07:04 PM

Quote:

Originally Posted by Quib
I'm happy to see ! reverses boolean values. Nice discovery!

Quib

That's the problem with these chaotic discovery threads... that was on top of page 2.

Quib 02-06-2005 08:01 PM

Quote:

Originally Posted by Deathbane27
That's the problem with these chaotic discovery threads... that was on top of page 2.

Bah! Figures, very nice to know though. Will try and keep ! in mind when working on stuff.

Quib

Drumstix42 02-06-2005 11:36 PM

Quote:

Originally Posted by Deathbane27
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.

I haven't read through all of this thread but it just came to my attention this post... I was just thinking... heh (amazing I know)

There's another way to do IF statements in coding. Maybe there's some variation that'll work with the EQ2 XML...

Code:

OnPress="parent.Test.visible==true?visible=false:visible:true"
I don't have anything to test it out... but maybe someone could try it.

Or maybe:

Code:

OnPress="(parent.Test.visible==true)?(visible=false):(visible:true)"
(I don't really have a grasp on where to use parenthasis in the EQ2 XML coding) *note* I dunno what's up with the random spaces, they're just showing that way /shrug

Quib 02-07-2005 12:20 AM

I'm pretty sure the spaces are a flaw in the [CODE} tag, every X number of characters on one line, it adds a space.

I haven't found EQ2 to use parenthesis in any rational or logical way. Half the time I can leave them out and they won't matter, and using them doesn't seem to change the order math calculations occur; an example:
value=((2+3)*4)
results in value being 14 (3 times 4 plus 2) instead of 20 (5 times 4).

At least this is what I encountered when I was making my Relative DPS Calculator.

Quib

Deathbane27 02-07-2005 01:16 AM

I've only found parenthesis useful for letting the game know you mean a "variable" instead of the text that represents it.

Example: The text of the object Foo is "Your Mom"

parent.label.text=parent.Foo.text makes the label say "parent.Foo.text"

parent.label.text=(parent.Foo.text) makes the label say "Your Mom"

Or at least that's how I think it goes. I've always used the parenthesis after something didn't work without them, and I forget what.

Quib 02-07-2005 01:23 AM

I use (basically) parent.label.text=parent.Foo.text and my label text would always read Your Mom. If I wanted the label to show "parent.label.text=parent.Foo.text" I'd have to do parent.label.text='parent.Foo.text'

This is assuming this code is used in an OnEvent.

Quib


All times are GMT -5. The time now is 12:13 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI