EQ2Interface.com
Search Downloads


Go Back   EQ2Interface > General Discussion > Help!?!?!

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 06-22-2008, 12:49 AM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default Concatenating?

Is there anyway to do this?
Code:
<Button Name="reset" OnPress="Temp=Parent.Input.Localtext
Parent. ## Temp ## .Visible=true" ScrollExtent="64,32" Size="64,32" Visible="false" />
Ideally I want to pull the number from input and show a window based on that number. I hope people understand what I'm trying to say.
Reply With Quote
  #2  
Unread 06-22-2008, 01:11 AM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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.LocalText
Parent.ButtonTrigger.OnPress=('Parent.')##(Temp)##('.visible=true')
Parent.ButtonTrigger.press=true

You 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
bShowA=(Parent.WindowA.Name==sString)
bShowB=(Parent.WindowB.Name==sString)
bShowC=(Parent.WindowC.Name==sString)
Parent.WindowA.visible=(bShowA ? true : false)
Parent.WindowB.visible=(bShowB ? true : false)
Parent.WindowC.visible=(bShowC ? true : false)
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 06-22-2008 at 04:18 PM.
Reply With Quote
  #3  
Unread 06-22-2008, 08:10 PM
lordebon lordebon is offline
Fetish Core author
This person is a EQ2Map developer.
Featured
 
Join Date: Jun 2005
Server: Crushbone
Posts: 2,667
Default

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
Actn=('Parent.')##(Temp)##('.visible=true')" OnPress="Actn"
Note the syntax of that may not be 100% right, but I remember using something like that in the past where I set the variables on hovering the button and then acted on them on press.
Reply With Quote
  #4  
Unread 06-22-2008, 08:59 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

OnHoverIn, yeah, that could work, too. Seems more prone to unintentional variable setting though. /shrug
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>
Reply With Quote
  #5  
Unread 06-23-2008, 01:44 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Code:
OnHover="Temp=Parent.Input.LocalText
OnPress=('Parent.')##(Temp)##('.visible=true')"
For OnHoverIn you'd have to do it like the above, because you can't directly execute a parameter value in the OnPress. But as Drumstix said, seems like an error prone way to do it if you use it in code where timing matters.

Btw 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.
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #6  
Unread 06-23-2008, 02:25 AM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

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?
Reply With Quote
  #7  
Unread 06-23-2008, 04:57 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

Add this to the topmost <Page> node of your window:
eq2usescomwndcontrols="true"
__________________
P R O F I T U I ∙ R E B O R N [Auto-Updater] | [Portal] | [F.A.Q.] | [Support Forums]
~ Retired ~
If it does not work, you likely installed it incorrectly. Always try a clean install before reporting bugs.
Reply With Quote
  #8  
Unread 06-23-2008, 04:46 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

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?
Reply With Quote
  #9  
Unread 06-23-2008, 05:28 PM
Wyynd Wyynd is offline
A Forest Scavenger
Interface Author - Click to view interfaces
 
Join Date: Dec 2004
Server: Guk
Posts: 16
Default

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.
Reply With Quote
  #10  
Unread 06-23-2008, 06:24 PM
samejima samejima is offline
A Griffon
Interface Author - Click to view interfaces
 
Join Date: Jul 2005
Server: Unrest
Posts: 156
Default

Thanks a lot sounds annoying but an easy fix 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
Reply With Quote
  #11  
Unread 06-23-2008, 08:16 PM
Drumstix42's Avatar
Drumstix42 Drumstix42 is offline
A Griffon
Featured
 
Join Date: Oct 2004
Server: Antonia Bayle
Posts: 3,287
Default

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=2
sTemp_a is now 2


Compare two strings:
Code:
bShowTemp_a=(2==sTemp_a)
bShowTemp_a is now set to TRUE, because 2 does infact equal sTemp_a (2)


Set the window to what it should be:
Code:
Parent.WindowName.visible=(bShowTemp_a ? true : false)
since our Boolean variable came out to be TRUE, the window visible will be set to true.

So just replace "2" with your input variable, and the WindowName with the correct variable.
__________________
"I'm afraid you're guilty of thought-crime. Don't bother getting the door, we'll let ourselves in..."
<Donate to DrumsUI> < [DrumsUI] Updater > < [DrumsUI] Full Interface> < Drumstix42 on Twitch.tv
>

Last edited by Drumstix42 : 06-23-2008 at 08:21 PM.
Reply With Quote
  #12  
Unread 06-24-2008, 11:17 AM
Landiin Landiin is offline
Slayer of clock cycles
This person is a EQ2Map developer.
Featured
 
Join Date: Nov 2004
Server: Oasis
Posts: 3,464
Default

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.
__________________
Landiin's EQ2MAP Updater Discussion Download
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 03:00 AM.


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