view ObjectiveSecure.xml @ 14:ed642234f017

ObjectiveFrame - implement proper tracker name text - expanded tracker prototypes to cover "objective lines" formatting and accommodation of widget variables - implement the progress bars for bonus objectives ObjectiveStyle - moved `UpdateWrapperStyle` over and renamed it to fit semantics - change the formula for block.`height` to measure non-widget content only - allows widgets to position relative to text - size FontString `status` to match block.`height` - full block height is acquired by adding block.`height` and block.`attachmentHeight` which is calculated during objective parsing ObjectiveWidgets - use string keys for generated widgets to deal with multiple objectives under the same questID, and maybe dungeon objectives - wrapper buttons use a common code path - specialized handlers for wheel scrolling moved over to fit semantics
author Nenue
date Mon, 04 Apr 2016 03:16:22 -0400
parents b0447b382f36
children
line wrap: on
line source
<Ui>
  <!--
   The following was lifted from QuestKing, mainly to spare the horrors of writing a global space frame script
  -->
  <Button name="VeneerItemButtonTemplate" inherits="SecureActionButtonTemplate" virtual="true">
    <Attributes>
      <Attribute name="type" value="item" />
    </Attributes>
    <Layers>
      <Layer level="ARTWORK">
        <FontString parentKey="HotKey" inherits="NumberFontNormalSmallGray" justifyH="LEFT" text="RANGE_INDICATOR">
          <Size x="29" y="10"/>
          <Anchors>
            <Anchor point="TOPRIGHT" x="16" y="-2"/>
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="BORDER">
        <Texture parentKey="icon"/>
        <FontString parentKey="Count" inherits="NumberFontNormal" justifyH="RIGHT" hidden="true">
          <Anchors>
            <Anchor point="BOTTOMRIGHT" x="-3" y="2"/>
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
    <Frames>
      <Cooldown parentKey="Cooldown" inherits="CooldownFrameTemplate"/>
    </Frames>
    <Scripts>
      <OnLoad>
        self:RegisterForClicks("AnyUp");
      </OnLoad>
      <OnEvent>
        if (event == "PLAYER_TARGET_CHANGED") then
          self.rangeTimer = -1;
        elseif (event == "BAG_UPDATE_COOLDOWN") then
          Veneer_QuestObjectiveItem_UpdateCooldown(self)
        end
      </OnEvent>
      <OnUpdate function="Veneer_QuestObjectiveItem_OnUpdate" />
      <OnShow>
        self:RegisterEvent("PLAYER_TARGET_CHANGED");
        self:RegisterEvent("BAG_UPDATE_COOLDOWN");
      </OnShow>
      <OnHide>
        self:UnregisterEvent("PLAYER_TARGET_CHANGED");
        self:UnregisterEvent("BAG_UPDATE_COOLDOWN");
      </OnHide>
      <OnEnter>
        GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
        GameTooltip:SetQuestLogSpecialItem(self.questLogIndex);
      </OnEnter>
      <OnLeave>
        GameTooltip:Hide();
      </OnLeave>
    </Scripts>
    <NormalTexture parentKey="NormalTexture" file="Interface\Buttons\UI-Quickslot2">
      <Anchors>
        <Anchor point="CENTER"/>
      </Anchors>
    </NormalTexture>
    <PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
    <HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD"/>
  </Button>
</Ui>