Mercurial > wow > buffalo2
annotate ObjectiveTracker/SecureButton.xml @ 37:e84d645c8ab8
- revised the tracker update function to build its complete data list up front and use the values as points of comparison for determining possible out of place blocks, which will be iterated over afterward to remove what wasn't re-used
- also entailed revising the exact role of global event handlers and function hooks, limiting their directions of communication so one doesn't end up calling the other multiple or inifinity times
- schema handling polish
author | Nenue |
---|---|
date | Mon, 18 Apr 2016 07:56:23 -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> |