 |

07-28-2010, 05:35 AM
|
|
A Young Mystail Rat
|
|
Join Date: Oct 2009
Server: Unkown
Posts: 5
|
|
Create a Target buttom by pressing it
Hi
I like to make a Target button with onpress funktion, if i press the button i like to target the grp-member. 1-5.
this liitle ui must have 5 buttons for each grp-member.. wich of the command down i have to use..
another question is wich of the command down i can use in a cmd line. for example Cmd="target grp-member 1-5 can i use a command like the examples down ??
Code:
OnPress="target Parent.Name.Text"
OnPress="target Parent.Parent.MemberInfo.Name.localtext"
OnPress="target Parent.Parent.T.Value"
OnPress="target Parent.Parent.MemberInfo.Name.Text"
a little example .. based of Drumstixs Code
Quote:
<?xml version="1.0" encoding="utf-8"?>
<Page eq2usescomwndcontrols="true" Location="762,211" MaximumSize="1024,130" MinimumSize="170,30" Name="Target" PackLocation="left,top" ScrollExtent="170,130" Size="170,130" UserMovable="true" UserResizable="true" version="1.1" Visible="false">
<Page BackgroundColor="#00FF00" Location="1,2" Name="GroupMember1" PackLocation="left,top" ScrollExtent="172,25" Size="172,25">
<Page BackgroundColor="#00FF00" Location="3,2" Name="MemberInfoPage" PackLocation="left,top" ScrollExtent="164,23" Size="164,23">
<Page AbsorbsInput="false" ClickThrough="False" Location="8,11" Name="CureButtons" ScrollExtent="154,10" Size="154,10">
<Button BackgroundOpacity="0.000" Location="122,0" Name="Testbutton" OnHoverIn="Parent.Parent.Parent.absorbsinput=false" OnHoverOut="Parent.Parent.Parent.absorbsinput=true" OnPress="CancelSpellcast;
 clearallqueuedabilities;
 target Parent.Name.Text;
" ScrollExtent="16,16" Size="16,16" Style="/ButtonStyles.invisible" Tooltip="Testbutton" />
</Page>
<Page AbsorbsInput="false" Location="8,11" Name="Effects" PackLocation="cfc,top" ScrollExtent="154,10" Size="154,10">
<Icon BackgroundTint="#000000" DynamicData="/GameData.Group.Group_0.Effect1" IconStyle="/IconStyles.effect" Location="122,0" MouseOverColor="#FFFF00" Name="Effect3" PackLocation="left,top" ScrollExtent="16,16" Size="16,16" TreatAsButton="true" />
</Page>
<Page Name="MemberInfo" ScrollExtent="164,35" Size="164,35">
<Text AbsorbsInput="false" Color="#F0D090" DynamicData="/GameData.Group.Group_0.Name" Font="/Fonts.FontZapf15" Location="40,7" Name="Name" PackLocation="top,left" ScrollExtent="122,16" ShadowStyle="/ShadowStylesNew.Outline.style1" Size="122,16" TextAlignmentVertical="Center">GroupMember</Text>
<Image Location="-1,10" Name="Bar1" ScrollExtent="161,10" Size="161,10" Style="ArcaneBars" />
</Page>
</Page>
</Page>
<ImageStyle Name="ArcaneFill">
<ImageFrame Name="Fill" Source="DrumsUI/images/Bars.dds" SourceRect="0,10,100,18" />
</ImageStyle>
<ImageStyle Name="ArcaneBars">
<ImageFrame Name="Bars" Source="DrumsUI/images/Bars.dds" SourceRect="0,80,161,90" />
</ImageStyle>
<ProgressbarStyle Bar.Background="ArcaneFill" Name="ArcaneProgress" />
<Page AbsorbsInput="false" Name="WindowFrame" PackSize="absolute,absolute" ScrollExtent="170,130" Size="170,130">
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Frame" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/FrameStyles.single_pixel" ScrollExtent="170,130" Size="170,130" />
<Page AbsorbsInput="false" BackgroundOpacity="1.000" Name="Bkg" PackLocation="left,top" PackSize="absolute,absolute" RStyleDefault="/WindowElements.DesktopWindo" ScrollExtent="170,130" Size="170,130" />
</Page>
</Page>
|
Problem on this code, i cant see the effect.. it shows only a gray buttom  another problem is if i click i do not target the grp member or in this example myself
( i know it shows my name and effekt because GameData.Group.Group_0 .. its for test i dont have 2 accounts )
Thx for helping
Last edited by oOTopsyOo : 07-28-2010 at 06:55 AM.
|

07-28-2010, 11:51 PM
|
 |
A Green Troll
|
|
Join Date: Dec 2004
Server: Blackburrow
Posts: 2,221
|
|
I assume you know that the group and raid windows already provides this functionality. Clicking a player's health/power bars target's them. Custom group windows often lay script buttons over other elements in the window but rarely cover the health/power bars.
Assuming you still want to build this as a separate mod, try the following
Code:
onPress="
target=Parent.Parent.GroupMembers.GroupMember1.MemberInfoPage.MemberInfo.Name.LocalText
target=Parent.Parent.GroupMembers.GroupMember1.MemberInfoPage.MemberInfo.Name.LocalText
"
This assumes the script is applied to a button at the root level of a custom window.
Note the command is issued twice to ensure it works on a single button press. Slash commands applied via script like this often don't work when first used, so need to be repeated, either in script or by pressing the button again.
There is almost certainly an alternate method using DynamicData for group member names, I'm just to lazy/tired to dig out that code.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:35 AM.
|
 |