Quantcast

5.2.99999

Steven Jackson [12-01-14 - 05:28]
5.2.99999
Filename
Interface/AddOns/SVUI/framework/api/api_layout.lua
Interface/AddOns/SVUI/framework/api/api_templates.lua
Interface/AddOns/SVUI/packages/tools/components/questwatch.lua
Interface/AddOns/SVUI/scripts/mounts.lua
Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
diff --git a/Interface/AddOns/SVUI/framework/api/api_layout.lua b/Interface/AddOns/SVUI/framework/api/api_layout.lua
index 9e36927..74a5cbb 100644
--- a/Interface/AddOns/SVUI/framework/api/api_layout.lua
+++ b/Interface/AddOns/SVUI/framework/api/api_layout.lua
@@ -126,7 +126,9 @@ local _purgatory = CreateFrame("Frame", nil)
 _purgatory:Hide()

 local function Die(self)
-    -- if(self.SetAtlas) then self.SetAtlas = SV.fubar end
+    if(self.SetAtlas) then
+        self.SetAtlas = function() return end
+    end
     if(self.UnregisterAllEvents) then
         self:UnregisterAllEvents()
         self:SetParent(_purgatory)
@@ -155,9 +157,9 @@ local function RemoveTextures(self, option)
                         region.Show = region.Hide
                     end
                     region:Hide()
-                    -- if(region.SetAtlas) then
-                    --     region.SetAtlas = SV.fubar
-                    -- end
+                    if(region.SetAtlas) then
+                        region.SetAtlas = function() return end
+                    end
                 elseif(type(option) == "string" and ((layer == option) or (texture ~= option))) then
                     region:SetTexture(0,0,0,0)
                 end
diff --git a/Interface/AddOns/SVUI/framework/api/api_templates.lua b/Interface/AddOns/SVUI/framework/api/api_templates.lua
index a7dc2a1..d07785f 100644
--- a/Interface/AddOns/SVUI/framework/api/api_templates.lua
+++ b/Interface/AddOns/SVUI/framework/api/api_templates.lua
@@ -742,6 +742,26 @@ local function SetCheckboxTemplate(self, shrink, x, y)
     self:SetSize(width, height)

     CreatePanelTemplate(self, "Inset", true, true, 1, x, y)
+end
+
+local function SetColorCheckboxTemplate(self, underlay, x, y)
+    if(not self or (self and self.Panel)) then return end
+
+    if(underlay) then
+        x = x or -7
+        y = y or -7
+    end
+
+    CreatePanelTemplate(self, "Slot", underlay, true, 1, x, y)
+    CreateButtonPanel(self, false, true)
+
+    hooksecurefunc(self, "SetChecked", function(self,checked)
+        local r,g,b = 0,0,0
+        if(checked == 1 or checked == true) then
+            r,g,b = self:GetCheckedTexture():GetVertexColor()
+        end
+        self:SetBackdropBorderColor(r,g,b)
+    end)
 end

 local function SetEditboxTemplate(self, x, y, fixed)
@@ -961,6 +981,7 @@ local function AppendMethods(OBJECT)
     if not OBJECT.SetButtonTemplate then META.SetButtonTemplate = SetButtonTemplate end
     if not OBJECT.SetSlotTemplate then META.SetSlotTemplate = SetSlotTemplate end
     if not OBJECT.SetCheckboxTemplate then META.SetCheckboxTemplate = SetCheckboxTemplate end
+    if not OBJECT.SetColorCheckboxTemplate then META.SetColorCheckboxTemplate = SetColorCheckboxTemplate end
     if not OBJECT.SetEditboxTemplate then META.SetEditboxTemplate = SetEditboxTemplate end
     if not OBJECT.SetFramedButtonTemplate then META.SetFramedButtonTemplate = SetFramedButtonTemplate end
 end
diff --git a/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua b/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua
index 792ac54..7466228 100644
--- a/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua
+++ b/Interface/AddOns/SVUI/packages/tools/components/questwatch.lua
@@ -153,7 +153,7 @@ function MOD:LoadQuestWatch()
 			if value > 420 then
 				value = 420
 			end
-			self:SetVerticalScroll(value)
+			--self:SetVerticalScroll(value)
 			self.slider:SetValue(value)
 		end)

@@ -163,23 +163,8 @@ function MOD:LoadQuestWatch()
 		ObjectiveTrackerFrame:SetWidth(WIDTH)
 		ObjectiveTrackerFrame:SetPoint("TOPRIGHT", listFrame, "TOPRIGHT", -31, 0)
 		ObjectiveTrackerFrame:SetFrameLevel(listFrame:GetFrameLevel() + 1)
-		ObjectiveTrackerFrame:HookScript('OnEvent', function(self)
-			local WIDTH, HEIGHT = SVUI_QuestWatchFrame:GetSize()
-	  		self:ClearAllPoints()
-			self:SetPoint("TOPRIGHT", SVUI_QuestWatchFrameScrollFrame, "TOPRIGHT", -31, 0)
-			SVUI_QuestWatchFrameScrollBar:SetValue(1)
-	  	end);
-	  	ObjectiveTrackerFrame:HookScript('OnSizeChanged', function(self)
-			local WIDTH, HEIGHT = SVUI_QuestWatchFrame:GetSize()
-	  		self:ClearAllPoints()
-			self:SetPoint("TOPRIGHT", SVUI_QuestWatchFrameScrollFrame, "TOPRIGHT", -31, 0)
-			SVUI_QuestWatchFrameScrollBar:SetValue(1)
-	  	end);
-
-		-- ObjectiveTrackerFrame.ClearAllPoints = SV.fubar;
-		-- ObjectiveTrackerFrame.SetAllPoints = SV.fubar;
-		-- ObjectiveTrackerFrame.SetPoint = SV.fubar;
-		-- ObjectiveTrackerFrame.SetWidth = SV.fubar;
+
+		ObjectiveTrackerFrame.SetPoint = function() return end;

 		ObjectiveTrackerFrame.HeaderMenu.MinimizeButton:Hide()

@@ -188,8 +173,6 @@ function MOD:LoadQuestWatch()
 		ObjectiveTrackerFrame.BlocksFrame:SetPoint("BOTTOMLEFT", ObjectiveTrackerFrame, "BOTTOMLEFT", 87, 0)
 		ObjectiveTrackerFrame.BlocksFrame:SetWidth(WIDTH)

-		-- ObjectiveTrackerFrame.BlocksFrame.SetWidth = SV.fubar;
-
 		ObjectiveTrackerFrame.BlocksFrame.QuestHeader:SetWidth((WIDTH - 60))
 		ObjectiveTrackerFrame.BlocksFrame.AchievementHeader:SetWidth((WIDTH - 60))
 		ObjectiveTrackerFrame.BlocksFrame.ScenarioHeader:SetWidth((WIDTH - 60))
@@ -214,9 +197,6 @@ function MOD:LoadQuestWatch()
 		self.QuestWatch:SetScript('OnHide', HideSubDocklet);

 		listFrame:SetScrollChild(ObjectiveTrackerFrame)
-		--scrollFrame:SetValue(10)
-		--scrollFrame:SetValue(0)
 		SV.Timers:ExecuteTimer(function() SVUI_QuestWatchFrameScrollBar:SetValue(10) SVUI_QuestWatchFrameScrollBar:SetValue(0) end, 5)
-
 	end
 end
\ No newline at end of file
diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua
index d1f0278..fe710ff 100644
--- a/Interface/AddOns/SVUI/scripts/mounts.lua
+++ b/Interface/AddOns/SVUI/scripts/mounts.lua
@@ -301,7 +301,7 @@ local function SetMountCheckButtons()
 		buttonBar["GROUND"]:SetSize(width,height)
 		buttonBar["GROUND"]:SetPoint("BOTTOMLEFT", buttonBar, "BOTTOMLEFT", 6, 4)
 		buttonBar["GROUND"]:RemoveTextures()
-	    buttonBar["GROUND"]:SetCheckboxTemplate()
+	    buttonBar["GROUND"]:SetColorCheckboxTemplate()
 	    buttonBar["GROUND"]:SetPanelColor(0.2, 0.7, 0.1, 0.15)
 	    buttonBar["GROUND"]:GetCheckedTexture():SetVertexColor(0.2, 0.7, 0.1, 1)
 	    buttonBar["GROUND"].key = "GROUND"
@@ -314,7 +314,7 @@ local function SetMountCheckButtons()
 		buttonBar["FLYING"]:SetSize(width,height)
 		buttonBar["FLYING"]:SetPoint("BOTTOMLEFT", buttonBar["GROUND"], "BOTTOMRIGHT", 2, 0)
 		buttonBar["FLYING"]:RemoveTextures()
-	    buttonBar["FLYING"]:SetCheckboxTemplate()
+	    buttonBar["FLYING"]:SetColorCheckboxTemplate()
 	    buttonBar["FLYING"]:SetPanelColor(1, 1, 0.2, 0.15)
 	    buttonBar["FLYING"]:GetCheckedTexture():SetVertexColor(1, 1, 0.2, 1)
 	    buttonBar["FLYING"].key = "FLYING"
@@ -327,7 +327,7 @@ local function SetMountCheckButtons()
 		buttonBar["SWIMMING"]:SetSize(width,height)
 		buttonBar["SWIMMING"]:SetPoint("BOTTOMLEFT", buttonBar["FLYING"], "BOTTOMRIGHT", 2, 0)
 		buttonBar["SWIMMING"]:RemoveTextures()
-	    buttonBar["SWIMMING"]:SetCheckboxTemplate()
+	    buttonBar["SWIMMING"]:SetColorCheckboxTemplate()
 	    buttonBar["SWIMMING"]:SetPanelColor(0.2, 0.42, 0.76, 0.15)
 	    buttonBar["SWIMMING"]:GetCheckedTexture():SetVertexColor(0.2, 0.42, 0.76, 1)
 	    buttonBar["SWIMMING"].key = "SWIMMING"
@@ -340,7 +340,7 @@ local function SetMountCheckButtons()
 		buttonBar["SPECIAL"]:SetSize(width,height)
 		buttonBar["SPECIAL"]:SetPoint("BOTTOMLEFT", buttonBar["SWIMMING"], "BOTTOMRIGHT", 2, 0)
 		buttonBar["SPECIAL"]:RemoveTextures()
-	    buttonBar["SPECIAL"]:SetCheckboxTemplate()
+	    buttonBar["SPECIAL"]:SetColorCheckboxTemplate()
 	    buttonBar["SPECIAL"]:SetPanelColor(0.7, 0.1, 0.1, 0.15)
 	    buttonBar["SPECIAL"]:GetCheckedTexture():SetVertexColor(0.7, 0.1, 0.1, 1)
 	    buttonBar["SPECIAL"].key = "SPECIAL"
diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
index a04cf06..6209a24 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua
@@ -91,15 +91,19 @@ local function StyleLootFrame(frame)
 		frame.Icon:ClearAllPoints()
 		frame.Icon:SetPoint("CENTER", frame.AlertPanel.icon, "CENTER", 0, 0)
 		StyleAlertIcon(frame, frame.Icon)
+	end

-		if(frame.Label) then
-			frame.Label:ClearAllPoints()
-			frame.Label:SetPoint("TOPLEFT", frame.Icon, "TOPRIGHT", 57, 5)
-		end
-		if(frame.ItemName) then
-			frame.ItemName:ClearAllPoints()
-			frame.ItemName:SetPoint("TOPLEFT", frame.Icon, "TOPRIGHT", 60, -16)
-		end
+	if(frame.Label) then
+		frame.Label:ClearAllPoints()
+		frame.Label:SetPoint("TOPLEFT", frame.Icon, "TOPRIGHT", 57, 5)
+	end
+	if(frame.ItemName) then
+		frame.ItemName:ClearAllPoints()
+		frame.ItemName:SetPoint("TOPLEFT", frame.Icon, "TOPRIGHT", 60, -16)
+	end
+	if(frame.Amount) then
+		frame.Amount:ClearAllPoints()
+		frame.Amount:SetPoint("TOPLEFT", frame.Icon, "TOPRIGHT", 60, -16)
 	end
 end

diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
index f0f0d8c..76cff46 100644
--- a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
+++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua
@@ -747,7 +747,7 @@ function PLUGIN:ApplyItemAlertStyle(frame, noicon)

     if(not noicon) then
 	    --[[ ICON BG ]]--
-	    alertpanel.icon = alertpanel:CreateTexture(nil, "BORDER")
+	    alertpanel.icon = alertpanel:CreateTexture(nil, "BACKGROUND", nil, 2)
 	    alertpanel.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-ICON-BORDER]])
 	    alertpanel.icon:SetGradient('VERTICAL', 1, 0.35, 0, 1, 1, 0)
 	    alertpanel.icon:SetPoint("LEFT", alertpanel, "LEFT", -50, 20)