# HG changeset patch # User Tercio # Date 1437251550 10800 # Node ID 215f0dd37a6c9848477ec6f0f81de62bac5125cd # Parent 680465749fc70231714cf15542a382287c842d30 library update. diff -r 680465749fc7 -r 215f0dd37a6c Libs/DF/button.lua --- a/Libs/DF/button.lua Fri Jun 26 14:03:10 2015 -0300 +++ b/Libs/DF/button.lua Sat Jul 18 17:32:30 2015 -0300 @@ -988,11 +988,13 @@ end local pickcolor_callback = function (self, r, g, b, a, button) + a = abs (a-1) button.MyObject.color_texture:SetVertexColor (r, g, b, a) button.MyObject:color_callback (r, g, b, a) end -local pickcolor = function (alpha, param2, self) +local pickcolor = function (self, alpha, param2) local r, g, b, a = self.MyObject.color_texture:GetVertexColor() + a = abs (a-1) DF:ColorPick (self, r, g, b, a, pickcolor_callback) end @@ -1000,6 +1002,7 @@ local color_button_width = 16 local set_colorpick_color = function (button, r, g, b, a) + a = a or 1 button.color_texture:SetVertexColor (r, g, b, a) end diff -r 680465749fc7 -r 215f0dd37a6c Libs/DF/panel.lua --- a/Libs/DF/panel.lua Fri Jun 26 14:03:10 2015 -0300 +++ b/Libs/DF/panel.lua Sat Jul 18 17:32:30 2015 -0300 @@ -1330,6 +1330,8 @@ db.IsLocked = db.IsLocked or false self.IsLocked = db.IsLocked db.position = db.position or {x = 0, y = 0} + db.position.x = db.position.x or 0 + db.position.y = db.position.y or 0 DF:RestoreFramePosition (self) end end @@ -1338,7 +1340,9 @@ if (frame.db and frame.db.position) then local x, y = DF:GetPositionOnScreen (frame) --print ("saving...", x, y, frame:GetName()) - frame.db.position.x, frame.db.position.y = x, y + if (x and y) then + frame.db.position.x, frame.db.position.y = x, y + end end end @@ -1358,6 +1362,8 @@ if (frame.db and frame.db.position) then local scale, UIscale = frame:GetEffectiveScale(), UIParent:GetScale() frame:ClearAllPoints() + frame.db.position.x = frame.db.position.x or 0 + frame.db.position.y = frame.db.position.y or 0 frame:SetPoint ("center", UIParent, "center", frame.db.position.x * UIscale / scale, frame.db.position.y * UIscale / scale) end end