diff ObjectiveUI.lua @ 14:ed642234f017

ObjectiveFrame - implement proper tracker name text - expanded tracker prototypes to cover "objective lines" formatting and accommodation of widget variables - implement the progress bars for bonus objectives ObjectiveStyle - moved `UpdateWrapperStyle` over and renamed it to fit semantics - change the formula for block.`height` to measure non-widget content only - allows widgets to position relative to text - size FontString `status` to match block.`height` - full block height is acquired by adding block.`height` and block.`attachmentHeight` which is calculated during objective parsing ObjectiveWidgets - use string keys for generated widgets to deal with multiple objectives under the same questID, and maybe dungeon objectives - wrapper buttons use a common code path - specialized handlers for wheel scrolling moved over to fit semantics
author Nenue
date Mon, 04 Apr 2016 03:16:22 -0400
parents 9455693fc290
children 880828018bf4
line wrap: on
line diff
--- a/ObjectiveUI.lua	Sat Apr 02 17:46:52 2016 -0400
+++ b/ObjectiveUI.lua	Mon Apr 04 03:16:22 2016 -0400
@@ -24,10 +24,10 @@
 end
 
 Tracker.OnMouseUp = function(self, button)
+  print(self.handler.name, self.mainStyle, self.subStyle)
   if button == 'LeftButton' then
     if IsModifiedClick("CHATLINK") and ChatEdit_GetActiveWindow() then
       self:Link()
-      self:SetStyle('TrackerBlock',  self.info.type, 'Normal')
     elseif IsModifiedClick("QUESTWATCHTOGGLE") then
       self:Remove()
     else
@@ -35,16 +35,16 @@
     end
   elseif button == 'RightButton' then
     self:Open()
-    self:SetStyle('TrackerBlock',  self.info.type, 'Normal')
   end
   self.initialButton = nil
   self.modChatLink = nil
   self.modQuestWatch = nil
+  self:SetStyle('TrackerBlock',  self.handler.name, self.mainStyle, self.subStyle)
   print('|cFFFF8800'..tostring(self:GetName())..':MouseUp()|r')
 end
 
 Tracker.OnMouseDown = function(self, button)
-  self:SetStyle('TrackerBlock', 'MouseDown')
+  self:SetStyle('TrackerBlock', self.handler.name, 'MouseDown')
   print(IsModifiedClick("CHATLINK"), IsModifiedClick("QUESTWATCHTOGGLE"))
   print(self.info.title)
 end