view ObjectiveTracker.xml @ 7:5301c68f28d8

TrackerBlock - use IsModifiedClick function to determine appropriate OnClick actions - handle 'CHATLINK' modifier - handle 'TOGGLEQUESTWATCH' modifier TrackerBlockObjectives - use a generic framework to manage frame creation for various criteria tracker types: - ProgressBar when Blizzard flag data indicates so - skip when Blizzard flag data indicates so - DynamicText otherwise - events related to the criteria are registered in the criteria frame, and unregistered when the frame is hidden, either by destruction of its parent or completion
author Nenue
date Fri, 01 Apr 2016 12:27:05 -0400
parents 589de8ea05b9
children f03c75f63566
line wrap: on
line source
<Ui>


  <Texture name="VnTestLine" virtual="true">
    <Color r="1" g="1" b="0" a="1" />
  </Texture>

  <Font name="VeneerCriteriaFontNormal" virtual="true" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16">
    <Color r="1" g="1" b="1" a="1" />
  </Font>
  <Font name="VeneerCriteriaFontComplete" virtual="true" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16">
    <Color r="0" g="1" b="0" a=".75" />
  </Font>
  <Font name="VeneerCriteriaFontProgressed" virtual="true" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16">
    <Color r="1" g="1" b="0" a="1" />
  </Font>

  <Font name="VeneerCriteriaFontFailed" virtual="true" font="Fonts\FRIZQT__.TTF" outline="NORMAL" height="16">
    <Color r="1" g=".4" b="0" a=".75" />
  </Font>

  <Frame name="VeneerObjectiveWrapper" parent="UIParent" movable="true" enableMouse="true">
    <Scripts>
      <OnLoad>
        self.toggle = true
        self.drag = true
        Veneer.OnLoad(self)
      </OnLoad>
      <OnShow>
      </OnShow>
      <OnDragStart>
        Veneer.OnDragStart(self)
      </OnDragStart>
      <OnDragStop>
        Veneer.OnDragStop(self)
        Veneer.ObjectiveTracker.UpdateActionButtons()
      </OnDragStop>
      <!--@debug@-->
      <!--@end-debug@-->
    </Scripts>
    <Anchors>
      <Anchor point="TOPRIGHT" x="-60" y="-240" />
    </Anchors>
    <Layers>

      <Layer level="ARTWORK">
        <Texture parentKey="BackgroundLeft" parentArray="header" />
        <Texture parentKey="BackgroundRight" parentArray="header" />
        <Texture parentKey="BackgroundTile" parentArray="header" />
        <Texture parentKey="HeaderBounds" parentArray="config" alphaMode="ADD" hidden="true">
          <Color r="0" g="0" b="1" a="0.5" />
          <Anchors>
            <Anchor point="TOPLEFT" relativeKey="$parent.BackgroundLeft" />
            <Anchor point="BOTTOMRIGHT" relativeKey="$parent.BackgroundRight" />
          </Anchors>
        </Texture>
        <Texture parentKey="FrameBounds" parentArray="config" alphaMode="ADD" hidden="true">
          <Color r="1" g="0" b="1" a="0.25" />
          <Anchors>
            <Anchor point="TOPLEFT" />
            <Anchor point="BOTTOMRIGHT"  />
          </Anchors>
        </Texture>
        <!--<Texture desatuated="true" parentKey="LineGlow" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_LineGlow" useAtlasSize="true">
          <Anchors>
            <Anchor point="LEFT" relativeKey="$parent.Background" x="-21" y="18"/>
          </Anchors>
        </Texture>
        <Texture parentKey="SoftGlow" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_Glow" useAtlasSize="true">
          <Anchors>
            <Anchor point="CENTER" relativeKey="$parent.Background" relativePoint="LEFT" x="49" y="20"/>
          </Anchors>
        </Texture>
        <Texture parentKey="StarBurst" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_StarBurst" useAtlasSize="true">
          <Anchors>
            <Anchor point="CENTER" relativeKey="$parent.SoftGlow" x="29"/>
          </Anchors>
        </Texture>
        <Texture parentKey="LineSheen" hidden="false" alpha="0" alphaMode="ADD" atlas="OBJFX_LineBurst">
          <Size x="60" y="15"/>
          <Anchors>
            <Anchor point="CENTER" relativeKey="$parent.SoftGlow" x="29" y="-13"/>
          </Anchors>
        </Texture>-->
      </Layer>
      <Layer level="OVERLAY">

      </Layer>
    </Layers>
    <Frames>

      <Frame name="$parentXP" parentKey="XPBar" hidden="true">
        <Size x="250" y="24" />
        <Anchors>
          <Anchor point="TOPLEFT" />
        </Anchors>
        <Layers>
          <Layer level="BACKGROUND">
            <Texture name="$parentBackground" parentKey="bg" setAllPoints="true"/>
          </Layer>
          <Layer level="ARTWORK">

            <Texture name="$parentForeground" parentKey="fg">
              <Anchors>
                <Anchor point="TOPLEFT" />
                <Anchor point="BOTTOMLEFT" />
              </Anchors>
            </Texture>
            <Texture name="$parentRested" parentKey="rested" >
              <Anchors>
                <Anchor point="TOPLEFT" />
                <Anchor point="BOTTOMLEFT" />
              </Anchors>
            </Texture>
          </Layer>
          <Layer level="OVERLAY">
            <FontString inherits="VeneerFontNormal" parentKey="xpText">
              <Anchors>
                <Anchor point="CENTER" />
              </Anchors>
            </FontString>
          </Layer>
        </Layers>
      </Frame>

      <Button name="$parentClose" parentKey="close" inherits="UIPanelCloseButtonNoScripts">
        <Size x="25" y="20" />
        <Anchors>
          <Anchor point="TOPRIGHT" x="-4" y="-2" />
        </Anchors>
      </Button>

      <ScrollFrame name="$parentScrollFrame" enableMouseWheel="true" parentKey="scrollArea">
        <Layers>
          <Layer level="BACKGROUND">
            <Texture setAllPoints="true">
              <Color r="0.15" g=".3" b=".3" a="0" />
            </Texture>
          </Layer>
        </Layers>
        <Frames>


          <!-- Can't get it to work as 'Slider'; implement as click frame
          <Slider name="$parentBar" parentKey="scrollBar" minValue="1" maxValue="100" valueStep="1" stepsPerPage="1" defaultValue="1" orientation="VERTICAL">
            <HitRectInsets top="-1" bottom="1" right="1" left="0" />
            <ThumbTexture name="$parentThumb">
              <Color r="1" g="1" b="1" a="0.85" />
            </ThumbTexture>
            <Layers>
              <Layer level="BACKGROUND">
                <Texture setAllPoints="true">
                  <Color r="1" g="0" b="0" a=".5" />
                </Texture>
              </Layer>
            </Layers>
          </Slider>
          -->
        </Frames>
      </ScrollFrame>
    </Frames>
  </Frame>

  <Frame name="VeneerObjectiveScroll" parent="VeneerObjectiveWrapperScrollFrame">
    <Anchors>
      <Anchor point="TOPLEFT" />
    </Anchors>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true">
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="HORIZONTAL">
            <MinColor r="0" g="0.5" b="0.5" a="0" />
            <MaxColor r="0" g="0.5" b="0.5" a="0" />
          </Gradient>
        </Texture>
      </Layer>
    </Layers>
  </Frame>

  <Frame name="VeneerTrackerTemplate" parent="UIParent" virtual="true">
    <Layers>
      <Layer level="BACKGROUND">
        <Texture name="$parentHeaderBG" parentKey="headerbg">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" />
            <Anchor point="RIGHT" relativePoint="RIGHT" />
          </Anchors>
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="HORIZONTAL">
            <MinColor r="0" g="0" b="0" a="0.1" />
            <MaxColor r="0" g="0" b="0" a="0" />
          </Gradient>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString name="$parentHeader" inherits="VeneerFontHighlight" text="OBJ" parentKey="header">
          <Anchors>
            <Anchor point="TOPLEFT" />
          </Anchors>
        </FontString>


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


  <Frame name="VeneerTrackerBlock" parent="VeneerObjectiveScroll" virtual="true" enableMouse="true">
    <Layers>
      <Layer level="BACKGROUND">
      </Layer>
      <Layer level="ARTWORK">
        <Texture name="$parentTitleBackground" parentKey="titlebg">
          <Color r="1" g="1" b="1" a="1" />
          <Anchors>
            <Anchor point="TOPLEFT" />
          </Anchors>
        </Texture>
        <Texture name="$parentBackground" parentKey="bg">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.titlebg" />
          </Anchors>
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="HORIZONTAL">
            <MinColor r="0" g="0" b="0" a=".15" />
            <MaxColor r="0" g="0" b="0" a=".35" />
          </Gradient>
        </Texture>
        <Texture name="$parentItemTile" parentKey="icon" hidden="true">
          <Size x="24" y="24" />
          <Anchors>
            <Anchor point="TOPRIGHT" x="-1" y="-1" />
          </Anchors>
        </Texture>
        <Texture name="$parentMoneyTile" parentKey="money" hidden="true" />
      </Layer>
      <Layer level="HIGHLIGHT">
        <Texture name="$parentHighLight" parentKey="highlight">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.titlebg" />
            <Anchor point="BOTTOM" relativePoint="TOP" relativeKey="$parent.titlebg" x="0" y="-4"/>
            <Anchor point="RIGHT" relativePoint="RIGHT" />
          </Anchors>
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="VERTICAL">
            <MaxColor r="1" g="1" b="1" a=".15" />
            <MinColor r="1" g="1" b="1" a="0" />
          </Gradient>
        </Texture>
        <Texture name="$parentLowLight" parentKey="highlight2">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.bg" x="0" y="14" />
            <Anchor point="BOTTOM" relativePoint="BOTTOM" relativeKey="$parent.bg" x="0" y="0"/>
            <Anchor point="RIGHT" relativePoint="RIGHT" relativeKey="$parent" />
          </Anchors>
          <Color r="1" g="1" b="1" a="1" />
          <Gradient orientation="VERTICAL">
            <MaxColor r="1" g="1" b="1" a="0" />
            <MinColor r="1" g="1" b="1" a="0.15" />
          </Gradient>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString name="$parentTitle" parentKey="title" inherits="VeneerFontHighlight" justifyH="LEFT" justifyV="MIDDLE">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.titlebg" />
          </Anchors>
        </FontString>
        <FontString name="$parentLeaderBoard" parentKey="objectives" inherits="VeneerFontNormal" justifyH="LEFT" justifyV="MIDDLE" wordwrap="true">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeKey="$parent.bg" x="5" y="0" />
            <Anchor point="RIGHT" relativeKey="$parent" />
          </Anchors>
        </FontString>
        <FontString name="$parentDebugText" parentKey="debugText" inherits="VeneerCriteriaFontNormal">
          <Anchors>
            <Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
  </Frame>

  <Include file="ObjectiveSecure.xml" />
  <Include file="ObjectiveWidgets.xml" />

  <Script file="ObjectiveCore.lua" />
  <Script file="ObjectiveInfo.lua" />
  <Script file="ObjectiveUI.lua" />
  <Script file="ObjectiveFrame.lua" />
  <Script file="ObjectiveEvents.lua" />
</Ui>