view Core.xml @ 9:2698173edd40

ObjectiveUI & ObjectiveEvents - securehook to API calls for compatibility with addons that work with the objective tracking interface - let the API hooks invoke ObjectiveUI functions when possible - ObjectiveUI framescript handlers should use the corresponding API call if possible, so that addon space can be fully aware of our actions - Sanity check cached data when possible during 'Remove' hooks ObjectiveInfo - Add cheevID to criteria info ObjectiveCore - Index quest tracker blocks by their watch offset, and use that to verify whether the given block frame should be released into pool ObjectiveFrame - Differentiate between visible and non-visible unused buttons, and only release when their quest has been dropped - Reset 'actualBlocks' count during full updates - Reset scroll Position when the wrapper size shrinks
author Nenue
date Fri, 01 Apr 2016 14:54:01 -0400
parents 3397aae1f44d
children ed642234f017
line wrap: on
line source
<Ui>
  <Font name="VeneerFont" />

  <Font name="VeneerFont_Small" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16" />
  <Font name="VeneerFont_Large" font="Fonts\FRIZQT__.TTF"  outline="NORMAL" height="24" />

  <Font name="VeneerFontNormal" inherits="VeneerFont_Small">
    <Color r="1" g="1" b="1" a="1" />
  </Font>

  <Font name="VeneerFontHighlight" inherits="VeneerFont_Small" outline="NORMAL">
    <Color r="0" g=".7" b="1" a="1" />
  </Font>
  <Font name="VeneerFontHighlightLarge" inherits="VeneerFont_Large">
    <Color r="0" g=".7" b="1" a="1" />
  </Font>

  <!-- Defining here so interfaces are easy to spot -->
  <Frame name="VeneerHandlerTemplate" virtual="true">
    <KeyValues>
    </KeyValues>
  </Frame>

  <!-- Buff-button underlay  -->
  <Frame name="VeneerDecorTemplate" virtual="true" enableMouse="true" movable="true" frameStrata="BACKGROUND" hidden="true">
    <Size x="30" y="30" />
    <Layers>
      <Layer level="BACKGROUND">
        <Texture name="$parentButtonArea" setAllPoints="true" parentKey="background" alphaMode="BLEND">
          <Color r="1" g="1" b="1" a="1" />
        </Texture>
        <Texture name="$parentButtonBackdrop" parentKey="backgroundFill" alphaMode="BLEND">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="1" y="1" relativeKey="$parent.background" />
            <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" x="-1" y="-1" relativeKey="$parent.background" />
          </Anchors>
          <Color r="0" g="0" b="0" a="1" />
        </Texture>
      </Layer>
    </Layers>
  </Frame>

  <!-- Buff button overlay, and positioning anchor -->
  <Frame name="VeneerGuideTemplate" virtual="true" movable="true" frameStrata="LOW">
    <Scripts>
      <OnShow>
        self.mouseover = self:IsMouseOver()
      </OnShow>
      <OnUpdate>
        if self:IsMouseOver() and not self.contains then
          self.caster:Show()
        else
          self.caster:Hide()
        end
      </OnUpdate>
    </Scripts>
    <Layers>
      <Layer level="ARTWORK">
        <Texture name="$parentLegend" parentKey="legend" parentArray="config" setAllPoints="true" hidden="true">
          <Color a="0.5" r="0" g="1" b="0" />
        </Texture>
        <Texture name="$parentCountLegend" parentKey="count" parentArray="config" hidden="true">
          <Color a="0.75" r="1" g=".5" b="0" />
        </Texture>


        <Texture name="$parentIconArea" parentKey="icon" alphaMode="ADD">
          <Color r="0" g="0" b="0" a="0" />
        </Texture>
        <Texture name="$parentTextLegend" parentKey="duration" parentArray="config" hidden="true" alphaMode="BLEND">
          <Color a="0.25" r="1" g="1" b="1" />
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString inherits="VeneerFontNormal" parentArray="config" name="$parentID" parentKey="idText" hidden="true" outline="NORMAL">
          <Anchors>
            <Anchor point="CENTER" />
          </Anchors>
        </FontString>
        <FontString inherits="VeneerFontNormal" parentKey="caster" outline="NORMAL">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.icon" />
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="HIGHLIGHT">

      </Layer>
    </Layers>
  </Frame>

  <!-- Anchor frame orientation-setting widget; click handler copies frame anchors over to buff buttons -->
  <Button name="VeneerAnchorButton" virtual="true" parentArray="anchorButton" hidden="true">
    <Scripts>
      <OnClick>
        self:GetParent():SetChildAnchors(self)
      </OnClick>
    </Scripts>
    <Size x="15" y="15" />
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Color r="0" g="0" b="0" a="1" />
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <Texture>
          <Color r="0" g="1" b="0.5" a="1" />
          <Anchors>
            <Anchor point="BOTTOMLEFT" x="1" y="1" />
            <Anchor point="TOPRIGHT" x="-1" y="-1" />
          </Anchors>
        </Texture>
      </Layer>
    </Layers>
  </Button>

  <Frame name="VeneerAnchorTemplate" virtual="true" enableMouse="false" movable="true" sizable="true" clampedToScreen="true">
    <Layers>
      <Layer level="BACKGROUND">
        <Texture name="$parentBackground" setAllPoints="true" parentArray="config" hidden="true">
          <Color r="0" g="0.2" b="1" a="0.2" />
        </Texture>
        <FontString name="$parentHeading" inherits="VeneerFontHighlight" parentArray="config" parentKey="heading" hidden="true">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" />
          </Anchors>
        </FontString>
        <FontString name="$parentDebug" inherits="VeneerFontNormal" parentArray="debug" parentKey="debug">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" />
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="OVERLAY">

        <Texture name="$parentCutJoint" parentKey="alignedJoint" hidden="true">
          <Size x="4" y="4" />
          <Color r="1" g="0" b="0" a="1" />
        </Texture>
        <Texture name="$parentCutY" parentKey="cuttingJointX" hidden="true">
          <Size x="4" y="48" />
          <Color r="1" g="1" b="0" a="1" />
        </Texture>
        <Texture name="$parentCutX" parentKey="cuttingJointY" hidden="true">
          <Size x="48" y="4" />
          <Color r="1" g="1" b="0" a="1" />
        </Texture>
        <Texture name="$parentPoppedY" parentKey="poppingJointX" hidden="true">
          <Size x="4" y="48" />
          <Color r="0" g="1" b="1" a="1" />
        </Texture>
        <Texture name="$parentPoppedX" parentKey="poppingJointY" hidden="true">
          <Size x="48" y="4" />
          <Color r="0" g="1" b="1" a="1" />
        </Texture>
        <Texture name="$parentChildSpace" parentKey="childSpace" hidden="true">
          <Color r="0" g=".5" b="1" a="0.5" />
        </Texture>
      </Layer>
      <Layer level="HIGHLIGHT">
        <Texture name="$parentHighlight" setAllPoints="true" parentArray="config" hidden="true">
          <Color r="1" g="1" b="0" a="0.2" />
        </Texture>
      </Layer>
    </Layers>
    <Frames>
      <Button name="$parentAnchorUL" inherits="VeneerAnchorButton">
        <Anchors>
          <Anchor point="TOPLEFT" />
        </Anchors>
      </Button>
      <Button name="$parentAnchorUR" inherits="VeneerAnchorButton">
        <Anchors>
          <Anchor point="TOPRIGHT" />
        </Anchors>
      </Button>
      <Button name="$parentAnchorUR" inherits="VeneerAnchorButton">
        <Anchors>
          <Anchor point="BOTTOMRIGHT" />
        </Anchors>
      </Button>
      <Button name="$parentAnchorUR" inherits="VeneerAnchorButton">
        <Anchors>
          <Anchor point="BOTTOMLEFT" />
        </Anchors>
      </Button>
    </Frames>
  </Frame>

  <Frame name="VeneerConsolidatedBuffsAnchor" inherits="VeneerAnchorTemplate" virtual="true">
    <Layers>
      <Layer level="OVERLAY">
        <!-- need to make our own number label since the original is buried under secure layer -->
        <FontString inherits="VeneerFontNormal" name="$parentLabel" parentKey="label">
          <Anchors>
            <Anchor point="TOP" relativePoint="BOTTOM" x="0" y="-2" />
          </Anchors>
        </FontString>
        <!--
        <Texture name="$parentBackdrop" parentKey="background" setAllPoints="true" alphaMode="BLEND">
          <Color r="0" g="0" b="0" a="1" />
          <Anchors>
            <Anchor point="BOTTOMLEFT" x="1" y="1" />
            <Anchor point="TOPRIGHT" x="-1" y="-1" />
          </Anchors>
        </Texture>
        <Texture name="$parentIcon" parentKey="border" setAllPoints="true" alphaMode="BLEND">
          <Color r="1" g="1" b="1" a="1" />
        </Texture>
        -->
      </Layer>
    </Layers>
  </Frame>

  <Frame name="VeneerRaidBuffTemplate" virtual="true" enableMouse="false">
    <Layers>
      <Layer level="ARTWORK">
        <Texture name="$parentLegend" parentKey="legend" parentArray="config" setAllPoints="true" hidden="true">
          <Color a="0.5" r="0" g="1" b="0" />
        </Texture>
        <Texture name="$parentCountLegend" parentKey="count" parentArray="config" hidden="true">
          <Color a="0.75" r="1" g=".5" b="0" />
        </Texture>


        <Texture name="$parentIconArea" parentKey="icon" alphaMode="ADD">
          <Color r="0" g="0" b="0" a="0" />
        </Texture>
        <Texture name="$parentTextLegend" parentKey="duration" parentArray="config" hidden="true" alphaMode="BLEND">
          <Color a="0.25" r="1" g="1" b="1" />
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString inherits="VeneerFontNormal" parentArray="config" name="$parentSymbol" parentKey="symbol">
          <Anchors>
            <Anchor point="TOP" />
          </Anchors>
        </FontString>
        <FontString inherits="VeneerFontNormal" parentArray="config" name="$parentID" parentKey="idText" hidden="true">
          <Anchors>
            <Anchor point="BOTTOM" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
  </Frame>

  <Button name="VeneerMissingBuffTemplate" virtual="true">
    <Scripts>
      <OnClick>
        if self.spell and not InCombatLockdown() then
          CastSpellByID(self.spell)
        end
      </OnClick>
    </Scripts>
    <Layers>
      <Layer level="BORDER">
        <Texture setAllPoints="true">
          <Color r="1" g="1" b="1" a="0.25" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <Texture name="$parentIcon" parentKey="icon">
          <Size x="20" y="20" />
          <Anchors>
            <Anchor point="LEFT" />
          </Anchors>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString name="$parentLabel" parentKey="label" inherits="VeneerFontNormal" justifyH="LEFT">
          <Anchors>
            <Anchor point="LEFT" relativePoint="RIGHT" relativeKey="icon" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
  </Button>

  <FontString virtual="true" name="VeneerFieldName" parentKey="fieldname" inherits="VeneerFontHighlight" justifyV="TOP" justifyH="LEFT" />
  <FontString virtual="true" name="VeneerFieldValue" parentKey="fieldvalue" inherits="VeneerFontNormal" justifyV="TOP" justifyH="LEFT" />
  <Slider virtual="true" orientation="HORIZONTAL" name="VeneerConfigSlider">
    <Size x="250" y="18" />
    <Thumbtexture name="$parentThumb" alphaMode="BLEND" parentKey="thumb">
      <Size x="12" y="18" />
      <Color r="0.25" g="0.25" b="0.25" a="1" />
    </Thumbtexture>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture>
          <Anchors>
            <Anchor point="LEFT" />
            <Anchor point="RIGHT" />
          </Anchors>
          <Size y="7" />
          <Color r="0" g="0" b="0" a="1" />
        </Texture>

      </Layer>
      <Layer level="OVERLAY">


        <FontString name="$parentOptText" inherits="VeneerFieldName">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" />
          </Anchors>
        </FontString>

        <FontString name="$parentOptText" inherits="VeneerFieldValue">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="0" y="0" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
    <Scripts>
      <OnValueChanged>
        self:OnChange()
      </OnValueChanged>
    </Scripts>
  </Slider>

  <CheckButton virtual="true" orientation="HORIZONTAL" name="VeneerConfigCheckButton">
    <Size x="24" y="24" />
    <NormalTexture file="Interface\Buttons\UI-CheckBox-Up"/>
    <PushedTexture file="Interface\Buttons\UI-CheckBox-Down"/>
    <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD"/>
    <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check"/>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Size y="24" />
          <Color r="0" g="0.7" b="1" a="1" />
        </Texture>

        <FontString name="$parentOptText" inherits="VeneerFieldName" >
          <Anchors>
            <Anchor point="LEFT" relativePoint="LEFT" x="24" y="0" />
          </Anchors>
        </FontString>

      </Layer>
    </Layers>
    <Scripts>
      <OnValueChanged>
        self:OnChange()
      </OnValueChanged>
    </Scripts>
  </CheckButton>


  <Button virtual="true" name="VeneerConfigColor">
    <Size x="400" y="20" />
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Color r="0.15" g="0.15" b="0.15" a="0.5" />
        </Texture>
        <Texture>
          <Anchors>
            <Anchor point="BOTTOMLEFT" x="0" y="0" />
          </Anchors>
          <Size x="18" y="18" />
          <Color r="0" g="0" b="0" a="1" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <Texture name="$parentCurrentColor" parentKey="current">
          <Anchors>
            <Anchor point="BOTTOMLEFT" x="1" y="1" />
          </Anchors>
          <Size x="16" y="16" />
          <Color r="1" g="1" b="1" a="1" />
        </Texture>
      </Layer>
      <Layer level="OVERLAY">

        <FontString name="$parentOptText" inherits="VeneerFieldName">
          <Anchors>
            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="0" y="0" />
          </Anchors>
        </FontString>

        <FontString parentKey="fieldvalue" name="$parentOptText" inherits="VeneerFontNormal" text="">
          <Anchors>
            <Anchor point="CENTER" relativePoint="CENTER" relativeKey="$thumb" x="0" y="0" />
          </Anchors>
        </FontString>

      </Layer>
    </Layers>
  </Button>


  <Frame name="Veneer" hidden="true" enableMouse="true" movable="true" parent="UIParent" frameStrata="DIALOG">
    <Size x="400" y="400" />
    <Anchors>
      <Anchor point="CENTER" relativePoint="CENTER" x="0" y="0" />
    </Anchors>
    <Scripts>
      <OnLoad>
        self:RegisterForDrag('LeftButton')
      </OnLoad>
      <OnDragStart>
        self:StartMoving()
      </OnDragStart>
      <OnDragStop>
        self:StopMovingOrSizing()
      </OnDragStop>
    </Scripts>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Color r="0" g="0" b="0" a="0.7" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <FontString name="$parentHeader" parentKey="header" inherits="VeneerFontHighlightLarge" text="Veneer">
          <Anchors>
            <Anchor point="TOPLEFT" x="3" y="-4" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
    <Frames>
      <Button name="$parentCloseButton" parentKey="close" text="X">
        <ButtonText inherits="SystemFont_Small" />
        <Scripts>
          <OnClick>
            self:GetParent():Close()
          </OnClick>
        </Scripts>
        <Size x="24" y="24" />
        <Anchors>
          <Anchor point="TOPRIGHT" x="-5" y="-5" />
        </Anchors>
        <NormalTexture parentKey="normal" setAllPoints="true">
          <Color a="1" r="0" g="0" b="0" />
        </NormalTexture>
        <PushedTexture setAllPoints="true">
          <Color a="1" r="1" g="0" b="0" />
        </PushedTexture>
        <HighlightTexture setAllPoints="true" alphaMode="ADD">
          <Color a=".5" r="1" g=".7" b="0.5" />
        </HighlightTexture>
      </Button>
      <Button name="$parentGuidesButton" parentKey="guides" text="Guides">
        <ButtonText inherits="SystemFont_Small" />
        <Scripts>
          <OnClick>
            self:GetParent():ToggleGuides(self)
          </OnClick>
        </Scripts>
        <Size x="36" y="24" />
        <Anchors>
          <Anchor point="RIGHT" relativePoint="LEFT" relativeTo="$parentCloseButton" x="-5" y="0" />
        </Anchors>
        <NormalTexture parentKey="normal" setAllPoints="true">
          <Color a="1" r="0" g="0" b="0" />
        </NormalTexture>
        <PushedTexture setAllPoints="true">
          <Color a="1" r="1" g="0" b="0" />
        </PushedTexture>
        <HighlightTexture setAllPoints="true" alphaMode="ADD">
          <Color a=".5" r="1" g=".7" b="0.5" />
        </HighlightTexture>
      </Button>
    </Frames>
  </Frame>


  <Script file="Init.lua" />
  <Script file="Constants.lua" />
  <Script file="Config.lua" />

</Ui>