Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(Simpler)
Tag: WoW API docs
(→‎Example: Syntaxhighlight)
Tag: WoW API docs
Line 32: Line 32:
 
== Example ==
 
== Example ==
 
Included in [[XML/Frame/Backdrop|Backdrop]]
 
Included in [[XML/Frame/Backdrop|Backdrop]]
  +
<syntaxhighlight lang="xml">
<Button name="$parentButtonClose" inherits="OptionsButtonTemplate" text="Close">
+
<Button name="$parentButtonClose" inherits="OptionsButtonTemplate" text="Close">
<Anchors>
+
<Anchors>
<Anchor point="BOTTOMRIGHT">
+
<Anchor point="BOTTOMRIGHT">
<Offset>
+
<Offset>
<AbsDimension x="-12" y="16"/>
+
<AbsDimension x="-12" y="16"/>
</Offset>
 
</Anchor>
+
</Offset>
</Anchors>
+
</Anchor>
  +
</Anchors>
<Scripts>
+
<Scripts>
<OnClick> autoInviteMainConfigFrame:Hide(); </OnClick>
+
<OnClick> autoInviteMainConfigFrame:Hide(); </OnClick>
</Scripts>
 
</Button>
+
</Scripts>
  +
</Button>
 
  +
</syntaxhighlight>
 
[[Image:Close-button.jpg]]
 
[[Image:Close-button.jpg]]
   

Revision as of 21:01, 9 August 2021

<Button> (inherits from <Frame>) defines a Button responsive to clicks.

<Button>
	<NormalTexture />
	<PushedTexture />
	<DisabledTexture />
	<HighlightTexture />
	<ButtonText />
	<NormalColor />
	<HighlightColor />
	<DisabledColor />
	<PushedTextOffset />
</Button>

Attributes

XML attribute Type Default Lua equivalent
text xs:string Button:SetText(text)
registerForClicks xs:string Button:RegisterForClicks(registerForClicks)
motionScriptsWhileDisabled xs:boolean
false
Button:SetMotionScriptsWhileDisabled(motionScriptsWhileDisabled)

Example

Included in Backdrop

<Button name="$parentButtonClose" inherits="OptionsButtonTemplate" text="Close">
	<Anchors>
		<Anchor point="BOTTOMRIGHT">
			<Offset>
				<AbsDimension x="-12" y="16"/>
			</Offset>
		</Anchor>
	</Anchors>
	<Scripts>
		<OnClick> autoInviteMainConfigFrame:Hide(); </OnClick>
	</Scripts>
</Button>

Close-button

Patch changes

References

 
  1. ^ 2009-12-08, UI.xsd, version 3.3.0.10958, near line 490, archived at Townlong-Yak
  2. ^ 2009-09-25, UI.xsd, version 3.2.2.10505, near line 483, archived at Townlong-Yak
  3. ^ 2006-06-20, UI.xsd, version 1.11.0.5428, near line 411, archived at Townlong-Yak
  4. ^ 2004-12-06, UI.xsd, version 1.1.2.4115, near line 366, archived at Townlong-Yak