diff ObjectiveTracker/ObjectiveTracker.xml @ 40:03ed70f846de

- move block accessors into a new file - define a tMove function for reconciling the free/used tables as needed - when retrieving an old block frame, confirm ID still matches; resolves multiple watch items on one block - stop any animations when a block is freed; resolves stuck flare graphics
author Nenue
date Sun, 24 Apr 2016 14:15:25 -0400
parents 1f8f9cc3d956
children 7a65ed86e4dd
line wrap: on
line diff
--- a/ObjectiveTracker/ObjectiveTracker.xml	Thu Apr 21 16:43:37 2016 -0400
+++ b/ObjectiveTracker/ObjectiveTracker.xml	Sun Apr 24 14:15:25 2016 -0400
@@ -4,6 +4,7 @@
 
 
 
+  <FontString name="VeneerRewardText" virtual="true" inherits="VeneerNumberFontSmall" parentArray="rewardLabel" />
   <Texture file="Interface\ICONS\INV_Misc_QuestionMark"  name="VeneerRewardTile" parentArray="rewardTile" alpha="0.5" hidden="true" virtual="true">
     <Color r="1" g="1" b="1" a="1" />
     <Anchors>
@@ -12,6 +13,33 @@
     <TexCoords top="0.15" bottom="0.85" left="0.15" right="0.85" />
   </Texture>
 
+  <Frame name="VeneerRewardsPopOut" parent="UIParent" frameStrata="LOW">
+    <Size x="200" y="350" />
+    <Anchors>
+      <Anchor point="TOPRIGHT" relativePoint="TOPLEFT" x="-4" />
+    </Anchors>
+    <Layers>
+      <Layer level="BACKGROUND">
+
+      </Layer>
+      <Layer level="ARTWORK">
+        <Texture inherits="VeneerRewardTile" />
+        <Texture inherits="VeneerRewardTile" />
+        <Texture inherits="VeneerRewardTile" />
+      </Layer>
+      <Layer level="OVERLAY">
+        <FontString inherits="VeneerRewardText" />
+        <FontString inherits="VeneerRewardText" />
+        <FontString inherits="VeneerRewardText" />
+      </Layer>
+    </Layers>
+    <Animations>
+      <AnimationGroup parentKey="rewardFadeIn">
+        <Translation offsetX="-200" offsetY="0" smoothing="OUT" duration="0.15" order="1" />
+        <Alpha change="1" duration=".15" order="1" />
+      </AnimationGroup>
+    </Animations>
+  </Frame>
 
   <Frame name="VeneerObjectiveWrapper"  parent="UIParent" movable="true" enableMouse="true" frameStrata="LOW">
     <TitleRegion>
@@ -257,6 +285,22 @@
         <Alpha childKey="LineSheen" startDelay="0.15" duration="0.5" order="1" fromAlpha="0" toAlpha="0.75"/>
         <Alpha childKey="LineSheen" startDelay="0.75" duration="0.5" order="1" fromAlpha="0.75" toAlpha="0"/>
         <Translation childKey="LineSheen" startDelay="0.15" duration="1.5" order="1" offsetX="280" offsetY="0"/>
+        <Scripts>
+          <OnPlay>
+            self:GetParent().fadeOut:Stop()
+          </OnPlay>
+        </Scripts>
+      </AnimationGroup>
+      <AnimationGroup parentKey="fadeOut" ignoreFramerateThrottle="true">
+        <Alpha duration="0.25" fromAlpha="1" toAlpha="0" order="1" />
+        <Scripts>
+          <OnPlay>
+            self:GetParent().headerFade:Stop()
+          </OnPlay>
+          <OnFinished>
+            self:GetParent():Hide()
+          </OnFinished>
+        </Scripts>
       </AnimationGroup>
     </Animations>
     <Layers>
@@ -321,21 +365,27 @@
   <Frame name="VeneerTrackerBlock" virtual="true">
     <Scripts>
       <OnShow>
+        Veneer.print('Frame')(self:GetName(), '|cFF00FF00SHOW|r', debugstack(1,3,1))
         if(self.DebugTab:IsShown()) then
-        self.DebugTab:Show()
+          self.DebugTab:Show()
         end
+        self.blockFadeOut:Stop()
       </OnShow>
       <OnHide>
+        Veneer.print('Frame')(self:GetName(), '|cFF00FF00HIDE|r', debugstack(1,3,1))
         if(self.DebugTab:IsShown()) then
-        self.DebugTab:Hide()
+          self.DebugTab:Hide()
         end
+        -- make sure neither of these execute their onFinished upon re-show
+        self.blockFadeOut:Stop()
+        self.questFadeIn:Stop()
       </OnHide>
     </Scripts>
     <Animations>
-      <AnimationGroup name="$parentSlideIn" parentKey="SlideIn" ignoreFramerateThrottle="true">
+      <AnimationGroup name="$parent_BlockSlide" parentKey="blockShift" ignoreFramerateThrottle="true">
         <Translation parentKey="translation" offsetX="0" offsetY="0" smoothing="OUT" order="1" duration=".25" />
       </AnimationGroup>
-      <AnimationGroup parentKey="questFadeIn" setToFinalAlpha="true" ignoreFramerateThrottle="true">
+      <AnimationGroup name="$parent_BlockFadeIn" setToFinalAlpha="true" parentKey="questFadeIn" ignoreFramerateThrottle="true">
         <Alpha duration="0.25" order="1" fromAlpha="0" toAlpha="1"/>
         <Scale duration="0.25" order="1" fromScaleX="0.1" fromScaleY="0.1" toScaleX="1" toScaleY="1">
           <Origin point="CENTER">
@@ -352,14 +402,10 @@
         <Alpha childKey="LineSheen" startDelay="0.15" duration="0.5" order="1" fromAlpha="0" toAlpha="0.75"/>
         <Alpha childKey="LineSheen" startDelay="0.75" duration="0.5" order="1" fromAlpha="0.75" toAlpha="0"/>
         <Translation childKey="LineSheen" startDelay="0.15" duration="1.5" order="1" offsetX="280" offsetY="0"/>
-        <Scripts>
-          <OnPlay>
-            self.animating = true
-          </OnPlay>
-          <OnFinished>
-            self.animating = nil
-          </OnFinished>
-        </Scripts>
+      </AnimationGroup>
+      <AnimationGroup name="$parent_BlockFade" parentKey="blockFadeOut" ignoreFramerateThrottle="true" looping="NONE">
+        <Alpha duration="0.25" order="1" fromAlpha="1" toAlpha="0" />
+        <Translation duration="0.25" order="1" offsetX="260" offsetY="0" smoothing="OUT" />
       </AnimationGroup>
     </Animations>
     <Layers>
@@ -469,9 +515,9 @@
             <Anchor point="RIGHT" relativeKey="$parent" />
           </Anchors>
         </FontString>
-        <FontString parentArray="rewardLabel" inherits="VeneerNumberFontSmall" />
-        <FontString parentArray="rewardLabel" inherits="VeneerNumberFontSmall" />
-        <FontString parentArray="rewardLabel" inherits="VeneerNumberFontSmall" />
+        <FontString inherits="VeneerRewardText" />
+        <FontString inherits="VeneerRewardText" />
+        <FontString inherits="VeneerRewardText" />
 
 
         <Texture alphaMode="BLEND" parentArray="config" hidden="true">
@@ -674,7 +720,9 @@
   <Script file="BonusObjectives.lua" />
   <Script file="ScenarioObjectives.lua" />
   <Script file="ExerienceBar.lua" />
-  <Script file="Frame.lua" />
+  <Script file="TrackerFrame.lua" />
+  <Script file="TrackerBlock.lua" />
+  <Script file="RewardFrame.lua" />
   <Script file="DefaultTracker.lua" />
   <Script file="Events.lua" />
   <Script file="Widgets.lua" />