![]() |
Concatenating?
Is there anyway to do this?
Code:
<Button Name="reset" OnPress="Temp=Parent.Input.Localtext |
I too was trying to do something like this in the past. It's possible to do what you want, but you have to go about it in a different way.
In other words, you can't directly navigate the tree like that (with a variable). I'm not sure exactly what you're trying to do. But the way around is to make a second button, and then set the "tree location" as the OnPress of another button, and then trigger that button. We'll call that button "ButtonTrigger" Code:
Temp=Parent.Input.LocalTextYou can also do If statements, but that could get long if you had a lot of windows. Maybe if you wanted to hide some, when showing others. Just for example: Code:
sString=Parent.Input.LocalText |
Couldn't you also just use the OnHover to set the variables, and then use the OnPress to do it?
IE, Code:
OnHover="Temp=Parent.Input.LocalText |
OnHoverIn, yeah, that could work, too. Seems more prone to unintentional variable setting though. /shrug :rolleyes:
|
Code:
OnHover="Temp=Parent.Input.LocalTextBtw the non-OnHoverIn type concatenation to push variables to OnPress events is used all over ProfitUI, e.g. for the macro buttons on group/raid windows. |
Thanks a lot guys for all the advice I'm fairly new to making more complex UI mods but its turning out really well so far. At the moment Im using it as a custom window though, can those not store location in your ui settings file? every time I Load up its hidden and pops up in the same location so I then have to move it. Is this something I'm doing wrong or just a side effect of custom windows?
|
Add this to the topmost <Page> node of your window:
eq2usescomwndcontrols="true" |
Weird I thought I tried that, though it did fix my problems. Is there anyway to make it visible so I don't have to show window every time though? And secondly would this statement be correct?
sString=5 Parent.WindowA.visible=(5==sString) Setting the windows visibility to true? |
I've been wondering about window visibility as well... and from the research i've done over the last few days it seems like they (SOE) have never added in a convenient way to do this.
the work around is to put a show.window command in to another window that the client does automatically open in the OnShow object. The other caveat is that you must put it in to a window that receives dynamic data updates. for example, I chose the player window, since it is almost always receiving constant data updates, so when that window is "shown" by the client, then the OnShow event triggers and it will then open up the window you want. I really don't understand why Sony hasn't added in a simple property that allows us to make new windows and allow them to be visible by default. it wouldn't be that hard IMO. |
Thanks a lot sounds annoying but an easy fix :D Still not understanding if statements though. Well at least I cant get them to work :/
I'm trying to compare a local text that stores a number to another value. so temp_a=parent.1.localtext (lets say this is -1) temp_b=Parent.2.localtext (lets say this is 2) Btemp=(temp_a!=temp_b) parent.window.visible=Btemp |
Just because I like to, I use "s" for Strings, and "b" for Booleans, and "i" for integers.
Code with comments: This sets the variable (obviously): Code:
sTemp_a=2Compare two strings: Code:
bShowTemp_a=(2==sTemp_a)Set the window to what it should be: Code:
Parent.WindowName.visible=(bShowTemp_a ? true : false)So just replace "2" with your input variable, and the WindowName with the correct variable. |
Keep in mind that if the window has never been initialized, setting the visible properties to true will not make the window visible. You have to initialize the window 1st by issuing the Show_Window command first. This is mostly only needed on custom window as the game initializes most of default windows.
|
| All times are GMT -5. The time now is 12:52 PM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI