annotate Button.xml @ 1:c11ca1d8ed91

Version 0.1
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:03:57 +0000
parents
children 8e0ff8ae4c08
rev   line source
flickerstreak@1 1 <Ui xmlns="http://www.blizzard.com/wow/ui/"
flickerstreak@1 2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
flickerstreak@1 3 xsi:schemaLocation="http://www.blizzard.com/wow/ui/..\FrameXML\UI.xsd">
flickerstreak@1 4
flickerstreak@1 5
flickerstreak@1 6 <CheckButton name="ReActionButtonTemplate" inherits="ActionButtonTemplate, SecureActionButtonTemplate" virtual="true" enableMouse="true">
flickerstreak@1 7 <Scripts>
flickerstreak@1 8 <OnLoad>
flickerstreak@1 9 this:RegisterForDrag("LeftButton", "RightButton")
flickerstreak@1 10 this:RegisterForClicks("AnyUp")
flickerstreak@1 11 </OnLoad>
flickerstreak@1 12 <PostClick>
flickerstreak@1 13 if arg1 == "LeftButton" and IsAltKeyDown() then
flickerstreak@1 14 this.rxnBtn:ShowAssignKeybinding()
flickerstreak@1 15 end
flickerstreak@1 16 if this.rxnBtn:ShouldPickupAction(button) then
flickerstreak@1 17 PickupAction(this.rxnBtn:GetActionID())
flickerstreak@1 18 end
flickerstreak@1 19 this.rxnBtn:UpdateCheckedState()
flickerstreak@1 20 </PostClick>
flickerstreak@1 21 <OnDragStart>
flickerstreak@1 22 if LOCK_ACTIONBAR ~= "1" then
flickerstreak@1 23 PickupAction(this.rxnBtn:GetActionID())
flickerstreak@1 24 this.rxnBtn:UpdateDisplay()
flickerstreak@1 25 end
flickerstreak@1 26 </OnDragStart>
flickerstreak@1 27 <OnReceiveDrag>
flickerstreak@1 28 if LOCK_ACTIONBAR ~= "1" then
flickerstreak@1 29 PlaceAction(this.rxnBtn:GetActionID())
flickerstreak@1 30 this.rxnBtn:UpdateDisplay()
flickerstreak@1 31 end
flickerstreak@1 32 </OnReceiveDrag>
flickerstreak@1 33 <OnEnter>
flickerstreak@1 34 this.rxnBtn:SetTooltip()
flickerstreak@1 35 </OnEnter>
flickerstreak@1 36 <OnLeave>
flickerstreak@1 37 this.rxnBtn:ClearTooltip()
flickerstreak@1 38 </OnLeave>
flickerstreak@1 39 </Scripts>
flickerstreak@1 40 </CheckButton>
flickerstreak@1 41
flickerstreak@1 42 <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/>
flickerstreak@1 43
flickerstreak@1 44 <Frame name="ReActionKeybindFrame" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true">
flickerstreak@1 45 <Size>
flickerstreak@1 46 <AbsDimension x="160" y="52"/>
flickerstreak@1 47 </Size>
flickerstreak@1 48 <Backdrop file="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
flickerstreak@1 49 <EdgeSize>
flickerstreak@1 50 <AbsValue val="16"/>
flickerstreak@1 51 </EdgeSize>
flickerstreak@1 52 <TileSize>
flickerstreak@1 53 <AbsValue val="16"/>
flickerstreak@1 54 </TileSize>
flickerstreak@1 55 <BackgroundInsets>
flickerstreak@1 56 <AbsInset left="0" right="0" top="0" bottom="0"/>
flickerstreak@1 57 </BackgroundInsets>
flickerstreak@1 58 </Backdrop>
flickerstreak@1 59 <Layers>
flickerstreak@1 60 <Layer level="BACKGROUND">
flickerstreak@1 61 <Texture>
flickerstreak@1 62 <Color r="0" g="0" b="0" a="0.5"/>
flickerstreak@1 63 </Texture>
flickerstreak@1 64 </Layer>
flickerstreak@1 65 <Layer level="ARTWORK">
flickerstreak@1 66 <FontString inherits="GameFontNormal" text="Set Keybinding">
flickerstreak@1 67 <Anchors>
flickerstreak@1 68 <Anchor point="TOP">
flickerstreak@1 69 <Offset>
flickerstreak@1 70 <AbsDimension x="0" y="-5"/>
flickerstreak@1 71 </Offset>
flickerstreak@1 72 </Anchor>
flickerstreak@1 73 </Anchors>
flickerstreak@1 74 </FontString>
flickerstreak@1 75 </Layer>
flickerstreak@1 76 </Layers>
flickerstreak@1 77 <Frames>
flickerstreak@1 78 <Button name="$parentButton" inherits="UIPanelButtonTemplate2" enableKeyboard="true" enableMouse="true">
flickerstreak@1 79 <Size>
flickerstreak@1 80 <AbsDimension x="120" y="22"/>
flickerstreak@1 81 </Size>
flickerstreak@1 82 <Anchors>
flickerstreak@1 83 <Anchor point="BOTTOM" relativePoint="BOTTOM">
flickerstreak@1 84 <Offset>
flickerstreak@1 85 <AbsDimension x="-2" y="5"/>
flickerstreak@1 86 </Offset>
flickerstreak@1 87 </Anchor>
flickerstreak@1 88 </Anchors>
flickerstreak@1 89 <Scripts>
flickerstreak@1 90 <OnLoad>
flickerstreak@1 91 this:RegisterForClicks("AnyUp")
flickerstreak@1 92 </OnLoad>
flickerstreak@1 93 <OnClick>
flickerstreak@1 94 if this.selected and this.keybindTarget then
flickerstreak@1 95 this.keybindTarget:HandleKeybindAssign(this, nil, arg1)
flickerstreak@1 96 else
flickerstreak@1 97 this.selected = not(this.selected)
flickerstreak@1 98 end
flickerstreak@1 99 if this.selected and this.keybindTarget then
flickerstreak@1 100 this:LockHighlight()
flickerstreak@1 101 this:SetScript("OnKeyDown", function() this.keybindTarget:HandleKeybindAssign(this,arg1) end)
flickerstreak@1 102 else
flickerstreak@1 103 this:UnlockHighlight()
flickerstreak@1 104 this:SetScript("OnKeyDown", nil)
flickerstreak@1 105 end
flickerstreak@1 106 </OnClick>
flickerstreak@1 107 <OnShow>
flickerstreak@1 108 this.keybindTarget.button:SetChecked(1)
flickerstreak@1 109 this.keybindTarget:UpdateDisplay()
flickerstreak@1 110 </OnShow>
flickerstreak@1 111 <OnHide>
flickerstreak@1 112 if this.keybindTarget then
flickerstreak@1 113 this.keybindTarget.button:SetChecked(0)
flickerstreak@1 114 this.keybindTarget:UpdateDisplay()
flickerstreak@1 115 end
flickerstreak@1 116 </OnHide>
flickerstreak@1 117 </Scripts>
flickerstreak@1 118 <NormalFont inherits="GameFontHighlightSmall"/>
flickerstreak@1 119 <HighlightFont inherits="GameFontHighlightSmall"/>
flickerstreak@1 120 </Button>
flickerstreak@1 121 </Frames>
flickerstreak@1 122 <Scripts>
flickerstreak@1 123 <OnLoad>
flickerstreak@1 124 table.insert(UISpecialFrames, this:GetName()) -- auto-hide on escape
flickerstreak@1 125 </OnLoad>
flickerstreak@1 126 </Scripts>
flickerstreak@1 127 </Frame>
flickerstreak@1 128
flickerstreak@1 129 </Ui>