Mercurial > wow > reaction
view Button.xml @ 4:dfd829db3ad0
(none)
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 20 Mar 2007 21:19:34 +0000 |
parents | 8e0ff8ae4c08 |
children |
line wrap: on
line source
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd"> <CheckButton name="ReActionButtonTemplate" inherits="ActionButtonTemplate, SecureActionButtonTemplate" virtual="true" enableMouse="true"> <Layers> <Layer level="ARTWORK"> <FontString name="$parentActionID" inherits="NumberFontNormalSmall" hidden="true" text=""> <Anchors> <Anchor point="BOTTOMLEFT"/> </Anchors> <Color r="1.0" g="0.82" b="0.0"/> </FontString> </Layer> </Layers> <Scripts> <OnLoad> this:RegisterForDrag("LeftButton", "RightButton") this:RegisterForClicks("AnyUp") </OnLoad> <PostClick> if this.rxnBtn:ShouldPickupAction(button) then PickupAction(this.rxnBtn:GetActionID()) end this.rxnBtn:UpdateCheckedState() </PostClick> <OnDragStart> if LOCK_ACTIONBAR ~= "1" then PickupAction(this.rxnBtn:GetActionID()) this.rxnBtn:UpdateDisplay() end </OnDragStart> <OnReceiveDrag> if LOCK_ACTIONBAR ~= "1" then PlaceAction(this.rxnBtn:GetActionID()) this.rxnBtn:UpdateDisplay() end </OnReceiveDrag> <OnEnter> this.rxnBtn:SetTooltip() </OnEnter> <OnLeave> this.rxnBtn:ClearTooltip() </OnLeave> </Scripts> </CheckButton> <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/> <Frame name="ReActionKeybindFrame" frameStrata="DIALOG" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true"> <Size> <AbsDimension x="160" y="52"/> </Size> <Backdrop file="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true"> <EdgeSize> <AbsValue val="16"/> </EdgeSize> <TileSize> <AbsValue val="16"/> </TileSize> <BackgroundInsets> <AbsInset left="0" right="0" top="0" bottom="0"/> </BackgroundInsets> </Backdrop> <Layers> <Layer level="BACKGROUND"> <Texture> <Color r="0" g="0" b="0" a="0.5"/> </Texture> </Layer> <Layer level="ARTWORK"> <FontString inherits="GameFontNormal" text="Set Keybinding"> <Anchors> <Anchor point="TOP"> <Offset> <AbsDimension x="0" y="-5"/> </Offset> </Anchor> </Anchors> </FontString> </Layer> </Layers> <Frames> <Button name="$parentButton" inherits="UIPanelButtonTemplate2" enableKeyboard="true" enableMouse="true"> <Size> <AbsDimension x="120" y="22"/> </Size> <Anchors> <Anchor point="BOTTOM" relativePoint="BOTTOM"> <Offset> <AbsDimension x="-2" y="5"/> </Offset> </Anchor> </Anchors> <Scripts> <OnLoad> this:RegisterForClicks("AnyUp") </OnLoad> <OnClick> if this.selected and this.keybindTarget then this.keybindTarget:HandleKeybindAssign(this, nil, arg1) else this.selected = not(this.selected) end if this.selected and this.keybindTarget then this:LockHighlight() this:SetScript("OnKeyDown", function() this.keybindTarget:HandleKeybindAssign(this,arg1) if not this.selected then this:UnlockHighlight() this:SetScript("OnKeyDown", nil) end end ) else this:UnlockHighlight() this:SetScript("OnKeyDown", nil) end </OnClick> <OnShow> this.keybindTarget.button:SetChecked(1) this.keybindTarget:UpdateDisplay() </OnShow> <OnHide> if this.keybindTarget then this.keybindTarget.button:SetChecked(0) this.keybindTarget:UpdateDisplay() end </OnHide> </Scripts> <NormalFont inherits="GameFontHighlightSmall"/> <HighlightFont inherits="GameFontHighlightSmall"/> </Button> </Frames> <Scripts> <OnLoad> table.insert(UISpecialFrames, this:GetName()) -- auto-hide on escape </OnLoad> </Scripts> </Frame> </Ui>