EQ2Interface.com
Search Downloads


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

Reply
Thread Tools Search this Thread Display Modes
  #1  
Unread 08-01-2007, 01:46 PM
stupidfly stupidfly is offline
A Young Mystail Rat
 
Join Date: Dec 2004
Server: Antonia Bayle
Posts: 7
Default Buttons - driving me crazy.

Any clue as to what would cause buttons I create to 'eat' the first click?

I have created click to cure buttons for my group. The initial click of every button does absolutely nothing. Subsequent single clicks will fire the cure as long as that person is in my group.

It's not that the buttons have to be double-clicked each time, just the first time.

I can post the XML if needed. At work right now and I thought it may be something obvious to a vet. Also, I have compared (even copied) the buttons of other UIs and cannot track this down.
Reply With Quote
  #2  
Unread 08-01-2007, 02:50 PM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Attach your xml file or just post the script that you're using. It sounds like you're using the = style script. Some scripts have to use = and some don't. If you're using the = style script the first time it fires it creates a property for that object. That's why we often just double any script that uses =. If you don't want to do that just add the property to the object so it's already created and you won't need to double the script.

Hmm, if that doesn't make any sense I can post some examples.

Since you're making click to cure buttons for a group window it's usually easiest to look at some examples to see how others have done it before. I have a Profit and Fetish folder in my UI folder to look at examples of different scripts.

Last edited by Othesus : 08-01-2007 at 02:54 PM.
Reply With Quote
  #3  
Unread 08-01-2007, 06:30 PM
stupidfly1 stupidfly1 is offline
A Young Mystail Rat
 
Join Date: Jun 2007
Server: Antonia Bayle
Posts: 5
Default

You were absolutely right about the = . That did it.

Thank you SO much!
Reply With Quote
  #4  
Unread 08-22-2007, 12:10 AM
Breyer's Avatar
Breyer Breyer is offline
A Young Mystail Rat
Interface Author - Click to view interfaces
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 3
Default

Quote:
Originally Posted by Othesus View Post
If you don't want to do that just add the property to the object so it's already created and you won't need to double the script.
Could you explain or provide an example of what you mean by this, please?

I've run into the same issue as the OP here, except I'd prefer not to have to double my script as it sends a tell and that would make it so every click after the 1st sends 2 tells.
Reply With Quote
  #5  
Unread 08-22-2007, 02:31 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

You could either discard the = (easiest) or add the tell as a property to the button you use to send it, e.g. <Button OnPress="tell=text" tell="text" />
__________________
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 08-22-2007, 10:24 AM
Breyer's Avatar
Breyer Breyer is offline
A Young Mystail Rat
Interface Author - Click to view interfaces
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 3
Default

Quote:
Originally Posted by gm9 View Post
You could either discard the = (easiest) or add the tell as a property to the button you use to send it, e.g. <Button OnPress="tell=text" tell="text" />
Could you provide an example please of an OnPress or OnActivate with proper syntax without the =? Or a link to a thread with one? Which = do you mean, anyway, all of them?

I'd prefer not to do the latter as I don't want to be spamming people with double tells.

Thanks in advance. I'm very new to this.

Edit: Nevermind! I figured it out thanks to your suggestion.

An example would be (from a raid window XML click-cast heart/shard mod FYI, credit goes to pretty much all of them as they all look very similar in the XML, though I've modified it quite a bit):
Code:
<Button Location="0,0" Name="Button1" OnActivate="
tell Parent.Member1.Name.LocalText Parent.Parent.Parent.HealSpells.HealSpell1.Text
useabilityonplayer Parent.Member1.Name.LocalText Parent.Parent.Parent.HealSpells.HealSpell1.SpellName
activated=false" ScrollExtent="20,20" Size="20,20"/>
If there were only one command you could keep it all in one line.

Last edited by Breyer : 08-22-2007 at 10:53 AM.
Reply With Quote
  #7  
Unread 08-23-2007, 06:09 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Sorry, I've been working the last couple days so I haven't been on the forums.

Pretty much any command line script like "/tell player hello" or "/show_window MainHUD.Browser" can be used but without the "/" character.

Some scripts will just work like
<Button OnPress="tell player hello"/>

Some scripts don't seem to work and require you to write
<Button OnPress="show_window=MainHUD.Browser"/>
This is the "= style notation."

If you watch closely in the UIBuilder the very first time you press a button with the "= style notation" the press will just create a new property within that button so it looks like
<Button OnPress="show_window=MainHUD.Browser" show_window="MainHUD.Browser"/>
and the button doesn't actually do anything in the game until you press it a second time.

To work around this complication UI modders started to just put the scripts in twice like
<Button OnPress="show_window=MainHUD.Browser show_window=MainHUD.Browser"/>
so the first script creates the property and the second script fires off the command.

If you don't want to put the script in twice you can preemptively put the property into the button so it's already there like
<Button OnPress="show_window=MainHUD.Browser" show_window="MainHUD.Browser"/>
so then the button will work the first time you press it.

I had to do this with my pet window so the button wouldn't spam your chat window twice.
<Button Name="PetMelee" OnActivate="pet=melee" pet="melee"/>

So, to summarize, some scripts just work and that's the first and easiest thing to try. Some require the "= style notation" which will require you to put the script in twice or preemptively add the property into the button.
__________________

Visit Othesus World!
Reply With Quote
  #8  
Unread 08-23-2007, 06:54 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

All / commands now work without the = notation, that thread is outdated. For example, pet melee or pet ranged work fine without the "=". The "=" notation can still useful for some situations where it makes nested code easier, however. And some game parameters can only be set via the "=", but I have not checked that in a long time, may no longer be necessary, either.
__________________
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
  #9  
Unread 08-23-2007, 06:59 AM
Breyer's Avatar
Breyer Breyer is offline
A Young Mystail Rat
Interface Author - Click to view interfaces
 
Join Date: Feb 2006
Server: Antonia Bayle
Posts: 3
Default

Ah I see, thanks for explaining the preemptive property thing.

I think I will stick with not using the = and having line breaks between commands as it is more elegant IMO.
Reply With Quote
  #10  
Unread 08-30-2007, 09:34 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Quote:
Originally Posted by gm9 View Post
All / commands now work without the = notation, that thread is outdated. For example, pet melee or pet ranged work fine without the "=". The "=" notation can still useful for some situations where it makes nested code easier, however. And some game parameters can only be set via the "=", but I have not checked that in a long time, may no longer be necessary, either.
I just tested out my pet window and the pet ranged and pet melee commands seem to work fine now without the "=" but I'm pretty sure they didn't when I first made it.

I know certain commands still require the "=" like target_allow_pet_self_toggle. When I was putting together a player window with click-to-cure buttons I tried everything and ended up having to use:

OnHoverIn="target_allow_pet_self_toggle=0 target_allow_pet_self_toggle=0" OnHoverOut="target_allow_pet_self_toggle=1 target_allow_pet_self_toggle=1"

So that might be one of the game parameters you mentioned.

From this thread way back in March:
http://www.eq2interface.com/forums/s...ead.php?t=8073
__________________

Visit Othesus World!
Reply With Quote
  #11  
Unread 08-30-2007, 09:48 AM
gm9 gm9 is offline
gm10-1
Premium Member
EQ2Interface Super Mod
Featured
 
Join Date: Feb 2006
Posts: 6,479
Default

I disagree, that's a command and works without the "=". I remember that thread, but I never added the "=" to my UI since it works fine without.

The only settings I remember having issues without "=" are some sound and graphics parameters. For example, if you look at _ProfitUI_InventoryColorSettings.txt in my UI, that one uses "=" notation because it would not work otherwise when I put it in. However, I have not touched that file in a year now, the "=" may no longer be necessary there, either.
__________________
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
  #12  
Unread 08-30-2007, 10:27 AM
Othesus's Avatar
Othesus Othesus is offline
A Griffon
This person is a EQ2Map developer.
Interface Author - Click to view interfaces
 
Join Date: Mar 2005
Server: Lucan DLere
Posts: 847
Default

Quote:
Originally Posted by gm9 View Post
I disagree, that's a command and works without the "=". I remember that thread, but I never added the "=" to my UI since it works fine without.
Sorry, I just tested it the other day. Hover over the button and press F1.
__________________

Visit Othesus World!
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 12:36 AM.


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