changeset 17:0c160948ac5e

- ToC Update.
author Tercio
date Tue, 23 Jun 2015 14:16:13 -0300
parents d5c8e2c42e04
children 680465749fc7
files Hansgar_And_Franzok_Assist.toc Libs/DF/addon.lua Libs/DF/dropdown.lua Libs/DF/fw.lua Libs/DF/icons.tga Libs/DF/panel.lua
diffstat 6 files changed, 37 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/Hansgar_And_Franzok_Assist.toc	Mon Jun 08 12:54:24 2015 -0300
+++ b/Hansgar_And_Franzok_Assist.toc	Tue Jun 23 14:16:13 2015 -0300
@@ -1,4 +1,4 @@
-## Interface: 60100
+## Interface: 60200
 ## Title: Hansgar And Franzok Assist
 ## Notes: Helps with Smart Stampers on Mythic during this encounter.
 ## SavedVariables: Hansgar_And_Franzok_DB
--- a/Libs/DF/addon.lua	Mon Jun 08 12:54:24 2015 -0300
+++ b/Libs/DF/addon.lua	Tue Jun 23 14:16:13 2015 -0300
@@ -6,7 +6,7 @@
 
 function DF:CreateAddOn (name, global_saved, global_table, options_table, broker)
 	
-	local addon = LibStub ("AceAddon-3.0"):NewAddon (name, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0", "DetailsFramework-1.0")
+	local addon = LibStub ("AceAddon-3.0"):NewAddon (name, "AceConsole-3.0", "AceEvent-3.0", "AceTimer-3.0", "DetailsFramework-1.0", "AceComm-3.0")
 	_G [name] = addon
 	addon.__name = name
 	
--- a/Libs/DF/dropdown.lua	Mon Jun 08 12:54:24 2015 -0300
+++ b/Libs/DF/dropdown.lua	Tue Jun 23 14:16:13 2015 -0300
@@ -515,7 +515,7 @@
 
 function DetailsFrameworkDropDownOptionOnEnter (frame)
 	if (frame.table.desc) then
-		DF:CooltipPreset (2)
+		GameCooltip2:Preset (2)
 		GameCooltip2:AddLine (frame.table.desc)
 		if (frame.table.descfont) then
 			GameCooltip2:SetOption ("TextFont", frame.table.descfont)
@@ -749,11 +749,14 @@
 	self.arrowTexture2:Show()
 	
 	if (self.MyObject.have_tooltip) then 
-		GameCooltip2:Reset()
-		GameCooltip2:SetType ("tooltip")
-		GameCooltip2:SetColor ("main", "transparent")
-		DF:CooltipPreset (2)
-		GameCooltip2:AddLine (self.MyObject.have_tooltip)
+		GameCooltip2:Preset (2)
+		
+		if (type (self.MyObject.have_tooltip) == "function") then
+			GameCooltip2:AddLine (self.MyObject.have_tooltip() or "")
+		else
+			GameCooltip2:AddLine (self.MyObject.have_tooltip)
+		end
+
 		GameCooltip2:SetOwner (self)
 		GameCooltip2:ShowCooltip()
 	end
--- a/Libs/DF/fw.lua	Mon Jun 08 12:54:24 2015 -0300
+++ b/Libs/DF/fw.lua	Tue Jun 23 14:16:13 2015 -0300
@@ -41,6 +41,7 @@
 	"SetFontColor",
 	"GetFontSize",
 	"GetFontFace",
+	"SetFontOutline",
 	"trim",
 	"Msg",
 	"CreateFlashAnimation",
Binary file Libs/DF/icons.tga has changed
--- a/Libs/DF/panel.lua	Mon Jun 08 12:54:24 2015 -0300
+++ b/Libs/DF/panel.lua	Tue Jun 23 14:16:13 2015 -0300
@@ -651,8 +651,11 @@
 							end
 							
 						else
-							--< text
+							--> text
 							row.row_widgets [i]:SetText (results [i])
+							if (panel.rows [i].type == "entry") then
+								row.row_widgets [i]:SetCursorPosition (0)
+							end
 							
 						end
 					end
@@ -680,7 +683,7 @@
 	
 	function panel:Refresh()
 		local filled_lines = total_lines()
-		local scroll_total_lines = #panel.scrollframe
+		local scroll_total_lines = #panel.scrollframe.lines
 		local line_height = options.rowheight
 		
 		FauxScrollFrame_Update (panel.scrollframe, filled_lines, scroll_total_lines, line_height)
@@ -704,7 +707,7 @@
 	
 	for i = 1, amount do
 	
-		local row = DF:NewPanel (parent, nil, "$parentRow_" .. i, nil, 1, size)
+		local row = DF:NewPanel (panel, nil, "$parentRow_" .. i, nil, 1, size)
 		row.backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]]}
 		row.color = {1, 1, 1, .2}
 		row:SetPoint ("topleft", scrollframe, "topleft", 0, (i-1) * size * -1)
@@ -1214,7 +1217,9 @@
 				DF:SavePositionOnScreen (self)
 			end
 		end
-		self:Hide()
+		if (not self.DontRightClickClose) then
+			self:Hide()
+		end
 		return
 	end
 	if (not self.IsMoving and not self.IsLocked) then
@@ -1288,6 +1293,12 @@
 		self.Lock:GetNormalTexture():SetTexCoord (32/128, 48/128, 0, 1)
 		self.Lock:GetHighlightTexture():SetTexCoord (32/128, 48/128, 0, 1)
 		self.Lock:GetPushedTexture():SetTexCoord (32/128, 48/128, 0, 1)
+		if (self.OnUnlock) then
+			self:OnUnlock()
+		end
+		if (self.db) then
+			self.db.IsLocked = self.IsLocked
+		end
 	else
 		self.IsLocked = true
 		self:SetMovable (false)
@@ -1295,6 +1306,12 @@
 		self.Lock:GetNormalTexture():SetTexCoord (16/128, 32/128, 0, 1)
 		self.Lock:GetHighlightTexture():SetTexCoord (16/128, 32/128, 0, 1)
 		self.Lock:GetPushedTexture():SetTexCoord (16/128, 32/128, 0, 1)
+		if (self.OnLock) then
+			self:OnLock()
+		end
+		if (self.db) then
+			self.db.IsLocked = self.IsLocked
+		end
 	end
 end
 local Panel1PxOnClickLock = function (self)
@@ -1357,7 +1374,7 @@
 	f:SetBackdrop (Panel1PxBackdrop)
 	f:SetBackdropColor (0, 0, 0, 0.5)
 	
-	f.IsLocked = false
+	f.IsLocked = (config and config.IsLocked ~= nil and config.IsLocked) or false
 	f:SetMovable (true)
 	f:EnableMouse (true)
 	f:SetUserPlaced (true)
@@ -1410,6 +1427,9 @@
 	f.Lock = lock
 	f.Close = close
 	
+	f.IsLocked = not f.IsLocked
+	Panel1PxOnToggleLock (f)
+	
 	return f
 end