Target quick button
Greetings,
Ok my target window has 4 quick buttons on it: invite, follow, mentor and friend. These buttons parse the targets name in the command so its invite target, ect. Now my question is I would like to add a group chat text to say the autofollow button, so whne you press the auto-follow button, you auto-follow your target and it tells the group "I am auto-following George" (if George was your target) I can get it to do this correctly, sometimes I get a 0 infront of the following, and the Parent.Target.Name.text is parsed as normal text. Here is my AutoFollow button code: Code:
<Button Location="23,0" Name="AutoFollow" OnPress="follow Parent.Parent.Parent.Target.v1.Name.text" PressSound="ui_pressed" RStyleActivated="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowPressedRect" RStyleDefault="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowNormalRect" RStyleMouseOver="/HighFantasyElements.MainHUD.Target.QuickButtons.AutoFollowMouseoverRect" ScrollExtent="20,20" Size="20,20" Tooltip="Auto-follow target" TooltipStyle="/TooltipStyles.TooltipTargetQuickButtons" /> Thanks, Draven |
Try this :
OnPress="follow Parent.Parent.Parent.Target.v1.Name.text gsay I am auto-following Parent.Parent.Parent.Target.v1.Name.text" don't forget to press "ENTER" before add the gsay line gsay line must be on new line |
Greetings,
Thanks for the solution. I assume this is done in an xml program since hitting enter doesn't work in the ui builder? Is there another solution in the UI builder? Thanks, Draven |
Quote:
|
Greetings,
Oh awsome!! I thank both of you for the help. This part of my window is a request so I was trying to get it to work :) Thanks, Draven |
Greetings,
That fix "kinda" worked. The problem now is here is my code for the OnPress: Code:
follow Parent.Parent.Parent.Target.v1.Name.text It seems to take the auto- or auto (if i remove the dash) part of the code and replace it with 0 for some reason. Any ideas? Thanks, Draven |
Quote:
Code:
OnPress=" |
Quote:
So single quotes are escape characters I take it than? Thanks, Draven |
Single quotes are string delimiters, just like double quotes can be. Since it's already inside of a double quote, you have to use a single quote to indicate that "I am auto-following" is a string.
|
You can use either within UIBuilder, as it will get saved as ' or " allowing it to parse correctly.
|
Greetings,
Thanks everyone for being so helpful. I got 3 of 4 of the buttons working but the 4th button is just a quick invite so no text is needed. Another window down!! Thanks, Draven |
All times are GMT -5. The time now is 02:35 PM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI