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
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:52 AM.


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