view ClassPlan.xml @ 4:4c7e9efec4b5

fix order of operations regarding frame visibility checking
author Nenue
date Mon, 17 Oct 2016 12:59:24 -0400
parents c006ce87a147
children 4e1883842abf
line wrap: on
line source
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">

  <Script file="ClassPlan.lua" />

  <Font name="ClassPlanFont" font="Interface\AddOns\Veneer\Font\ArchivoNarrow-Regular.ttf" height="14" outline="NORMAL" virtual="true" />
  <Font name="ClassPlanNumberFont" font="Interface\AddOns\Veneer\Font\ArchivoNarrow-Bold.ttf" height="14" outline="NORMAL" virtual="true" />

  <Button name="ClassPlanButton" parent="UIParent" frameStrata="HIGH">
    <Size x="600" y="16" />
    <Anchors>
      <Anchor point="TOP" relativePoint="BOTTOM" relativeTo="ClassOrderPlan" />
      <Anchor point="LEFT" relativeTo="ClassOrderPlan" />
      <Anchor point="RIGHT" relativeTo="ClassOrderPlan" />
    </Anchors>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true" parentKey="Background" hidden="true">
          <Color a="1" r="0" g="0" b="0" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">

        <Texture parentKey="Grip" alphaMode="BLEND" file="Interface\RaidFrame\Raid-Move-Down">
          <Anchors>
            <Anchor point="TOP" />
          </Anchors>
          <Size x="32" y="16"/>
        </Texture>
      </Layer>
      <Layer level="HIGHLIGHT">
        <Texture setAllPoints="true" alphaMode="ADD">
          <Color a="0.25" r="1" g="1" b="1" />
        </Texture>
      </Layer>
    </Layers>
    <Scripts>
      <OnClick>
        ClassOrderPlan:Toggle()
      </OnClick>
    </Scripts>
  </Button>

  <Frame name="ClassOrderPlan" mixin="ClassOrderPlanCore" parent="UIParent" hidden="true">
    <Size x="600" y="40" />
    <Anchors>
      <Anchor point="TOP" />
    </Anchors>
    <Scripts>
      <OnLoad method="OnLoad" />
      <OnEvent method="OnEvent" />
      <OnShow method="OnShow" />
      <OnHide method="OnHide" />
    </Scripts>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture parentKey="Background" setAllPoints="true">
          <Color a="0.5" r="0" b="0" g="0" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <Texture parentKey="portrait">
          <Size x="40" y="40" />
          <Anchors>
            <Anchor point="TOPLEFT" />

          </Anchors>
        </Texture>
      </Layer>
    </Layers>
  </Frame>


  <Button name="ClassPlanBlock" mixin="ClassPlanBlockMixin" virtual="true" hidden="true">
    <Size x="400" y="32" />
    <Scripts>
      <OnUpdate method="OnUpdate" />
      <OnShow method="OnShow" />
      <OnEnter method="OnEnter" />
      <OnLeave method="OnLeave" />
    </Scripts>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true" parentKey="Background">
          <Color a=".5" r="0" g="0" b="0" />
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <Texture name="$parentIcon" parentKey="Icon">
          <Size x="32" y="32" />
          <Anchors>
            <Anchor point="TOPLEFT" />
          </Anchors>
          <TexCoords left="0.15" right=".85" top="0.15" bottom="0.85" />
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString name="$parentLabel" inherits="ClassPlanFont" parentKey="Label" text="base text">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeKey="$parent.Icon" x="4" y="-2" />
          </Anchors>
        </FontString>
        <FontString name="$parentTimeLeft" inherits="ClassPlanNumberFont" parentKey="TimeLeft" text="base text">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.Label" x="4" y="-2" />
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="HIGHLIGHT">
        <Texture setAllPoints="true" alphaMode="ADD">
          <Color a="1" r="0.1" g="0.1" b="0.1" />
        </Texture>
        <FontString name="$parentOwner" inherits="ClassPlanFont" parentKey="Owner" text="base text">
          <Anchors>
            <Anchor point="TOPRIGHT" x="-2" y="-2" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
  </Button>

  <Button name="ClassPlanShipment" mixin="ClassPlanShipmentMixin" virtual="true">
    <Scripts>
      <OnClick method="OnClick" />
      <OnUpdate method="OnUpdate" />
      <OnShow method="OnShow" />
      <OnEnter method="OnEnter" />
      <OnLeave method="OnLeave" />
    </Scripts>
    <Size x="200" y="32" />
    <Layers>
      <Layer level="BACKGROUND">
        <Texture parentKey="Background" setAllPoints="true" />
      </Layer>
      <Layer level="BACKGROUND" textureSubLevel="1">
        <Texture parentKey="Icon" alpha="1" desaturated="true">
          <Size x="32" y="32"/>
          <Anchors>
            <Anchor point="LEFT"/>
          </Anchors>
          <TexCoords left="0.15" right=".85" top="0.15" bottom="0.85" />
        </Texture>
      </Layer>
      <Layer level="BORDER">
        <Texture parentKey="Done" atlas="GarrLanding-ShipmentCompleteGlow">
          <Size x="32" y="32" />
          <Anchors>
            <Anchor point="LEFT"/>
          </Anchors>
        </Texture>
      </Layer>
      <Layer level="ARTWORK">
        <FontString parentKey="Name" inherits="ClassPlanFont" justifyV="TOP" justifyH="CENTER">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeKey="$parent.Icon" x="2" y="-2"/>
          </Anchors>
          <Color r=".75" g=".75" b=".73"/>
        </FontString>
      </Layer>
      <Layer level="OVERLAY">
        <FontString parentKey="TimeLeft" inherits="ClassPlanFont" justifyH="CENTER">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="$parent.Name" x="0" y="-2"/>
          </Anchors>
        </FontString>
        <FontString parentKey="Count" inherits="WorldPlanFont" justifyH="CENTER">
          <Anchors>
            <Anchor point="BOTTOM" relativeKey="$parent.Icon" x="0" y="0"/>
          </Anchors>
        </FontString>
      </Layer>
      <Layer level="HIGHLIGHT">

        <FontString name="$parentOwner" inherits="WorldPlanFont" parentKey="Owner" text="base text">
          <Anchors>
            <Anchor point="TOPRIGHT" x="-2" y="-2" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
    <Frames>
      <Cooldown parentKey="Swipe" inherits="CooldownFrameTemplate" reverse="true" hideCountdownNumbers="true">
        <Size x="32" y="32"/>
        <Anchors>
          <Anchor point="TOPLEFT"/>
          <Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMLEFT" x="32" y="0" />
        </Anchors>
        <Scripts>
          <OnCooldownStart>
            self:Show()
          </OnCooldownStart>
          <OnCoolDownDone>
            -- update via event
            C_Garrison.RequestLandingPageShipmentInfo();
          </OnCoolDownDone>
        </Scripts>
      </Cooldown>
    </Frames>
  </Button>
</Ui>