annotate ObjectiveTracker/SecureButton.xml @ 39:92534dc793f2

- restore the previous QuestLogSelection after pulling for selection-restricted quest data; fixes icon mixups while quest map is open - moved progressbar builders into the schema environment, with all the other Frame.lua functions; prep for configuration access - relegate the various removal events to a framescript in their corresponding blocks; this takes care of resolving dead frames
author Nenue
date Thu, 21 Apr 2016 16:43:37 -0400
parents 9856ebc63fa4
children
rev   line source
Nenue@1 1 <Ui>
Nenue@1 2 <!--
Nenue@1 3 The following was lifted from QuestKing, mainly to spare the horrors of writing a global space frame script
Nenue@1 4 -->
Nenue@1 5 <Button name="VeneerItemButtonTemplate" inherits="SecureActionButtonTemplate" virtual="true">
Nenue@1 6 <Attributes>
Nenue@1 7 <Attribute name="type" value="item" />
Nenue@1 8 </Attributes>
Nenue@1 9 <Layers>
Nenue@1 10 <Layer level="ARTWORK">
Nenue@1 11 <FontString parentKey="HotKey" inherits="NumberFontNormalSmallGray" justifyH="LEFT" text="RANGE_INDICATOR">
Nenue@1 12 <Size x="29" y="10"/>
Nenue@1 13 <Anchors>
Nenue@1 14 <Anchor point="TOPRIGHT" x="16" y="-2"/>
Nenue@1 15 </Anchors>
Nenue@1 16 </FontString>
Nenue@1 17 </Layer>
Nenue@1 18 <Layer level="BORDER">
Nenue@1 19 <Texture parentKey="icon"/>
Nenue@1 20 <FontString parentKey="Count" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
Nenue@1 21 <Anchors>
Nenue@1 22 <Anchor point="BOTTOMRIGHT" x="-3" y="2"/>
Nenue@1 23 </Anchors>
Nenue@1 24 </FontString>
Nenue@1 25 </Layer>
Nenue@1 26 </Layers>
Nenue@1 27 <Frames>
Nenue@1 28 <Cooldown parentKey="Cooldown" inherits="CooldownFrameTemplate"/>
Nenue@1 29 </Frames>
Nenue@1 30 <Scripts>
Nenue@1 31 <OnLoad>
Nenue@1 32 self:RegisterForClicks("AnyUp");
Nenue@1 33 </OnLoad>
Nenue@1 34 <OnEvent>
Nenue@1 35 if (event == "PLAYER_TARGET_CHANGED") then
Nenue@1 36 self.rangeTimer = -1;
Nenue@1 37 elseif (event == "BAG_UPDATE_COOLDOWN") then
Nenue@1 38 Veneer_QuestObjectiveItem_UpdateCooldown(self)
Nenue@1 39 end
Nenue@1 40 </OnEvent>
Nenue@1 41 <OnUpdate function="Veneer_QuestObjectiveItem_OnUpdate" />
Nenue@1 42 <OnShow>
Nenue@1 43 self:RegisterEvent("PLAYER_TARGET_CHANGED");
Nenue@1 44 self:RegisterEvent("BAG_UPDATE_COOLDOWN");
Nenue@1 45 </OnShow>
Nenue@1 46 <OnHide>
Nenue@1 47 self:UnregisterEvent("PLAYER_TARGET_CHANGED");
Nenue@1 48 self:UnregisterEvent("BAG_UPDATE_COOLDOWN");
Nenue@1 49 </OnHide>
Nenue@1 50 <OnEnter>
Nenue@1 51 GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
Nenue@34 52 GameTooltip:SetQuestLogSpecialItem(self.logIndex);
Nenue@1 53 </OnEnter>
Nenue@1 54 <OnLeave>
Nenue@1 55 GameTooltip:Hide();
Nenue@1 56 </OnLeave>
Nenue@1 57 </Scripts>
Nenue@1 58 <NormalTexture parentKey="NormalTexture" file="Interface\Buttons\UI-Quickslot2">
Nenue@1 59 <Anchors>
Nenue@1 60 <Anchor point="CENTER"/>
Nenue@1 61 </Anchors>
Nenue@1 62 </NormalTexture>
Nenue@1 63 <PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
Nenue@1 64 <HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
Nenue@1 65 </Button>
Nenue@1 66 </Ui>