Mercurial > wow > reaction
diff Button.xml @ 2:8e0ff8ae4c08
Version 0.2
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 20 Mar 2007 21:08:31 +0000 |
parents | c11ca1d8ed91 |
children |
line wrap: on
line diff
--- a/Button.xml Tue Mar 20 21:03:57 2007 +0000 +++ b/Button.xml Tue Mar 20 21:08:31 2007 +0000 @@ -4,15 +4,22 @@ <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 arg1 == "LeftButton" and IsAltKeyDown() then - this.rxnBtn:ShowAssignKeybinding() - end if this.rxnBtn:ShouldPickupAction(button) then PickupAction(this.rxnBtn:GetActionID()) end @@ -41,7 +48,7 @@ <Frame name="ReActionButtonRecyler" parent="UIParent" hidden="true" setAllPoints="true" enableMouse="false"/> - <Frame name="ReActionKeybindFrame" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true"> + <Frame name="ReActionKeybindFrame" frameStrata="DIALOG" enableMouse="true" enableKeyboard="true" parent="UIParent" hidden="true"> <Size> <AbsDimension x="160" y="52"/> </Size> @@ -98,7 +105,14 @@ end if this.selected and this.keybindTarget then this:LockHighlight() - this:SetScript("OnKeyDown", function() this.keybindTarget:HandleKeybindAssign(this,arg1) end) + 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)