view Turok/Modules/Utilities/Utilities.xml @ 6:a9b8b0866ece

clear out log jam
author Nenue
date Sun, 21 Feb 2016 08:32:53 -0500
parents
children
line wrap: on
line source
<Ui>
  <Frame name="TkAlertContainer" parent="UIParent" movable="true">
    <Scripts>
      <OnDragStart>
        self.cx = self:GetLeft()
        self.cy = self:GetTop()
        self:StartMoving()
      </OnDragStart>
      <OnDragStop>
        self:StopMovingOrSizing()
        self.x = self.x + self:GetLeft() -  self.cx
        self.y = self.y + self:GetTop() - self.cy
        self:ClearAllPoints()
        self:SetPoint(self.anchor, self.parent, self.anchorTo, self.x, self.y)
      </OnDragStop>
    </Scripts>
    <Anchors>
      <Anchor point="LEFT" x="20" y="0" />
    </Anchors>
    <Size x="300" y="100" />
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true" parentKey="configBG" hidden="true">
          <Color r="1" b="1" g="1" a="0.5" />
        </Texture>
        <Texture setAllPoints="true" parentKey="flashBG" alpha="0">
        </Texture>
      </Layer>
    </Layers>
    <Animations>
      <AnimationGroup parentKey="flashIn" setToFinalAlpha="true">
        <Alpha change="1" childKey="flashBG" parentKey="a1" duration=".3" order="1" />
        <Alpha change="-1" childKey="flashBG" parentKey="a2" duration=".6" order="2" />
        <Scripts>
          <OnPlay>
            self:GetParent().flashBG:Show()
          </OnPlay>
          <OnFinished>
            self:GetParent().flashBG:Hide()
          </OnFinished>
        </Scripts>
      </AnimationGroup>
    </Animations>
    <Frames>
      <Button parentKey="clear" name="$parentButton_C" inherits="TurokButton" hidden="true">
        <Size x="24" y="24" />
        <Anchors>
          <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="-4" y="0" />
        </Anchors>
        <Scripts>
          <OnClick>
            self:GetParent():Clear(self:GetParent())
          </OnClick>
        </Scripts>
      </Button>
      <Button parentArray="tools" parentKey="close" name="$parentButton_Close" inherits="TurokButton" hidden="true">
        <Size x="64" y="24" />
        <Anchors>
          <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" x="0" y="-4" />
        </Anchors>
        <Scripts>
          <OnClick>
            self:GetParent():Close()
          </OnClick>
        </Scripts>
      </Button>
      <Button parentArray="tools" name="$parentButton_Unlock" inherits="TurokButton" hidden="true">
        <Size>
          <AbsDimension y="24" />
            </Size>
        <Scripts>
          <OnClick>
            self:GetParent():Unlock()
          </OnClick>
        </Scripts>
        <Anchors>
          <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" relativeKey="$parent.close" x="2" y="0" />
          <Anchor point="TOPRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="-2" />
        </Anchors>
      </Button>
    </Frames>
  </Frame>

  <Frame name="TkAlertFrame" hidden="true" virtual="true">

    <Animations>
      <AnimationGroup name="flashIn" parentKey="flashIn" looping="NONE" ignoreFramerateThrottle="true" setToFinalAlpha="true">
        <Alpha name="a1" parentKey="a1" childKey="flash" duration=".1" fromAlpha="0" toAlpha="1" order="1" />
        <Alpha name="a2" parentKey="a2" childKey="flash" duration=".5" fromAlpha="1" toAlpha="0" order="2" />
        <Alpha name="a3" parentKey="a3" childKey="backdrop" duration=".1" fromAlpha="0" toAlpha="1" order="1" />
        <Scripts>
          <OnPlay>
            print(self:GetParent():GetParent():GetName())
            print(self:GetParent():GetParent().num_events)
          </OnPlay>
          <OnFinished>
            self:GetParent():Pin()
          </OnFinished>
        </Scripts>
      </AnimationGroup>
      <AnimationGroup name="fadeOut" parentKey="fadeOut" looping="NONE" ignoreFramerateThrottle="true">
        <Alpha startDelay="5" name="a1" parentKey="a1" duration="1.5" change="-1" order="1" />
        <Scripts>
          <OnFinished>

            self:GetParent():Remove()
          </OnFinished>
        </Scripts>
      </AnimationGroup>
      <AnimationGroup name="sweepOver" parentKey="sweepOver" looping="NONE" ignoreFrameRateThrottle="true">
        <Alpha
            name="a1" parentKey="a1" childKey="flare" change="1" duration="0.15" order="1" />
        <Translation
            name="t1" parentKey="t1" childKey="flare" offsetX="200" offsetY="0" startDelay="0.2" duration=".4" order="1" />
        <Rotation
            name="r1" parentKey="r1" childKey="flare" degrees="180" duration="0.55" order="1" />
        <Alpha
            name="a2" parentKey="a2" childKey="flare" change="-1" duration="0.15" order="2" startDelay=".8" />
        <Scripts>
          <OnPlay>
            self:GetParent():GetParent().flare:Show()
          </OnPlay>
          <OnFinished>
            self:GetParent():GetParent().flare:Hide()
          </OnFinished>
        </Scripts>
      </AnimationGroup>
    </Animations>
    <Layers>
      <Layer level="BACKGROUND">
        <Texture setAllPoints="true" parentKey="backdrop" alpha="1" alphaMode="BLEND">
          <Color r="0" g="0" b="0" a="0.5" />
        </Texture>
        <Texture setAllPoints="true" parentKey="flash" alpha="0" alphaMode="ADD">
          <Color r="1" b="1" g="1" a="1" />
          <Gradient orientation="HORIZONTAL">
            <MinColor r="1" g="1" b="1" a="1" />
            <MaxColor r="1" g="1" b="1" a="0" />
          </Gradient>
        </Texture>
        <Texture parentKey="flare" file="Interface\Cooldown\star4" alphaMode="ADD">
          <Color r="0.3" g="0.6" b="1" a="0.8"/>
          <Size x="24" y="24" />
          <Anchors>
            <Anchor point="LEFT" />
          </Anchors>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <FontString inherits="TurokFont" parentKey="ename" justifyH="LEFT">
          <Anchors>
            <Anchor point="TOPLEFT" />
          </Anchors>
        </FontString>
        <FontString inherits="TurokFontDetail" parentKey="desc" justifyH="LEFT">
          <Anchors>
            <Anchor point="TOPLEFT" relativePoint="BOTTOMLEFT" relativeKey="ename" />
          </Anchors>
        </FontString>
      </Layer>
    </Layers>
    <Frames>

      <Button parentArray="tools" name="$parentButton_Block" inherits="UIPanelSquareButton" hidden="true" >
        <Scripts>
          <OnClick>
            self:GetParent():Block(self)
          </OnClick>
        </Scripts>
        <Size x="30" y="30" />
        <Anchors>
          <Anchor point="TOPRIGHT" x="36" y="3" />
        </Anchors>
      </Button>
    </Frames>
  </Frame>

  <Frame virtual="true" hidden="true" name="TkPetSwatchTemplate" enableMouse="true">
    <Layers>
      <Layer level="OVERLAY">
        <FontString inherits="TurokFont" name="PetName" parentKey="name" />
      </Layer>
    </Layers>
  </Frame>

  <Frame virtual="true" hidden="true" name="TkPetSpellTemplate" enableMouse="true">
    <Scripts>
      <OnEnter>
        print(self:GetName(), self.spellID, 'enter')
        GameTooltip:SetOwner(self, 'ANCHOR_TOP')
        --GameTooltip:SetPetAction(self.spellID)
        GameTooltip:Show()
      </OnEnter>
      <OnLeave>
        print(self:GetName(), 'leave')
        GameTooltip:Hide()
      </OnLeave>
    </Scripts>
    <Size x="64" y="64" />
    <Layers>
      <Layer level="ARTWORK">
        <Texture name="Icon" parentKey="icon" setAllPoints="true">
          <Anchors>
            <Anchor point="CENTER" />
          </Anchors>
        </Texture>
      </Layer>
      <Layer level="OVERLAY">
        <Texture name="StrongWeak" parentKey="strongWeakHint">
          <Size x="32" y="32" />
          <Anchor>
            <Anchor point="CENTER" />
          </Anchor>
        </Texture>
        <FontString inherits="TurokFont" name="TurnsLeft" parentKey="turnsLeft" setAllPoints="true" />
      </Layer>
      <Layer level="HIGHLIGHT">
        <FontString inherits="TurokFontDetail" name="Description" parentKey="spellDesc" setAllPoints="true" />
        <FontString inherits="TurokFontDetail" name="Damage" parentKey="damageModifier" setAllPoints="true" />
        <Texture alphaMode="ADD" setAllPoints="true">
          <Color a="1" r="1" g="1" b="0" />
        </Texture>
      </Layer>
    </Layers>
    <Animations>
      <AnimationGroup name="popIn" parentKey="popIn" ignoreFrameRateThrottle="true" looping="NONE" setToFinalAlpha="true">
        <Scripts>
          <OnPlay>
            self:GetParent():Show()
            self:GetParent():SetAlpha(0)
          </OnPlay>
        </Scripts>
        <Alpha childKey="spellIcon" duration="0.4" change="1" order="1" />
        <Scale childKey="spellIcon" duration="0.4" fromScaleX="0.1" fromScaleY="0.1" toScaleX="1" toScaleY="1" order="1" />
      </AnimationGroup>
      <AnimationGroup name="popOut" parentKey="popOut" ignoreFramerateThrottle="true" looping="NONE" setToFinalAlpha="true">
        <Scripts>
          <OnFinished>
            self:GetParent():Hide()
          </OnFinished>
        </Scripts>
        <Alpha childKey="spellIcon" duration="0.4" change="-1" order="1" />
        <Scale childKey="spellIcon" duration="0.4" fromScaleX="1" toScaleX=".1" fromScaleY="1" toScaleY=".1" order="1" />
      </AnimationGroup>
    </Animations>
  </Frame>

  <Include file="Raid.xml" />
  <Script file="Toast.lua" />
  <Script file="Raid.lua" />
  <Script file="PetBattle.lua" />
</Ui>