changeset 104:a3800989f515

- Solved the quest pins remaining visible issue
author Nenue
date Sun, 28 May 2017 19:53:11 -0400
parents 8cdd62e7a224
children 9f664a0ef8a8
files ClassPlan.lua ClassPlan.xml MapFrame.lua MapFrame.xml WorldPlan.lua WorldPlan.toc
diffstat 6 files changed, 76 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ClassPlan.lua	Sun May 28 19:50:42 2017 -0400
+++ b/ClassPlan.lua	Sun May 28 19:53:11 2017 -0400
@@ -101,15 +101,24 @@
       originalScript(minimap, button)
     end
   end)
+  local OnStopped = function()
+    print('Fade.OnStop()')
+    self.isAnimating = nil
+    self:SetShown(self.data.IsShown)
+  end
+
+  self.FadeOut:SetScript('OnStop', OnStopped)
   self.FadeOut:SetScript('OnFinished', function()
-    self:Hide()
-    self.data.IsShown = nil
+    print('FadeOut.OnFinished()')
     self.isAnimating = nil
+    self:SetShown(false)
   end)
   self.FadeIn:SetScript('OnPlay', function()
+    print('FadeIn.OnPlay()')
     self.isAnimating = true
-    self:SetShown(true)
+    self.data.IsShown = true
   end)
+  self.FadeIn:SetScript('OnStop', OnStopped)
 
   --hooksecurefunc(C_Garrison, 'RequestLandingPageShipmentInfo', function()
   --  WorldPlan:print("Requesting shipments data.")
@@ -303,10 +312,15 @@
 
 
 function ClassPlan:Toggle()
-  if self:IsShown() then
+  print('Toggle()', self:IsVisible(), self:IsShown())
+  if self:IsVisible() then
+    print('fade out')
+    self.data.IsShown = false
     self.FadeOut:Play()
   else
+    print('fade in')
     self.data.IsShown = true
+    self:SetShown(true)
     self.FadeIn:Play()
   end
 end
@@ -342,6 +356,7 @@
 
 function ClassPlan:OnHide()
   print('|cFF00FFFFHide()')
+  self.isAnimating = nil
 end
 
 function ClassPlan:Reanchor()
--- a/ClassPlan.xml	Sun May 28 19:50:42 2017 -0400
+++ b/ClassPlan.xml	Sun May 28 19:53:11 2017 -0400
@@ -26,7 +26,7 @@
       <AnimationGroup parentKey="FadeIn" setToFinalAlpha="true">
         <Alpha parentKey="AlphaFade" fromAlpha="0" toAlpha="1" duration=".3" order="1" />
       </AnimationGroup>
-      <AnimationGroup parentKey="FadeOut">
+      <AnimationGroup parentKey="FadeOut" setToFinalAlpha="true">
 
         <Alpha parentKey="AlphaFade" fromAlpha="1" toAlpha="0" duration=".3" order="1" />
       </AnimationGroup>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MapFrame.lua	Sun May 28 19:53:11 2017 -0400
@@ -0,0 +1,36 @@
+--
+-- Created by IntelliJ IDEA.
+-- User: Nick
+-- Date: 5/24/2017
+-- Time: 9:27 PM
+-- To change this template use File | Settings | File Templates.
+--
+
+WorldPlanMapFrameMixin = {
+  defaults = {
+    anchors = {
+      point = 'LEFT',
+      x = 50,
+    },
+    size = {
+      x = 800,
+      y = 600
+    }
+  }
+
+}
+local Module = WorldPlanMapFrameMixin
+
+function Module:OnLoad()
+  WorldPlan:AddHandler(self)
+
+
+end
+
+function Module:Setup()
+  self:ApplySettings()
+end
+
+function Module:ApplySettings()
+
+end
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MapFrame.xml	Sun May 28 19:53:11 2017 -0400
@@ -0,0 +1,13 @@
+<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="MapFrame.lua" />
+
+    <Frame name="WorldPlanMapFrame" mixin="WorldPlanMapFrameMixin">
+        <Scripts>
+            <OnShow method="OnShow" />
+            <OnHide method="OnHide" />
+            <OnUpdate method="OnUpdate" />
+        </Scripts>
+    </Frame>
+
+</Ui>
\ No newline at end of file
--- a/WorldPlan.lua	Sun May 28 19:50:42 2017 -0400
+++ b/WorldPlan.lua	Sun May 28 19:53:11 2017 -0400
@@ -643,6 +643,11 @@
   self.dataFlush = nil
 end
 
+function WorldPlanCore:SetHook(base, arg1, arg2)
+  if type(base) == 'table' then
+  end
+
+end
 
 
 
--- a/WorldPlan.toc	Sun May 28 19:50:42 2017 -0400
+++ b/WorldPlan.toc	Sun May 28 19:53:11 2017 -0400
@@ -16,4 +16,5 @@
 ClassPlan.xml
 ClassPlanMissions.xml
 ClassPlanShipments.xml
-ClassPlanFollowers.xml
\ No newline at end of file
+ClassPlanFollowers.xml
+MapFrame.xml
\ No newline at end of file