- framework update.

This commit is contained in:
Tercioo
2015-12-13 22:25:36 -02:00
parent e8a3f3d74c
commit c26e00cded
4 changed files with 31 additions and 11 deletions
+6 -2
View File
@@ -854,7 +854,10 @@ local ButtonMetaFunctions = {}
local x, y = GetCursorPosition()
x = _math_floor (x)
y = _math_floor (y)
if ((button.mouse_down+0.4 > GetTime() and (x == button.x and y == button.y)) or (x == button.x and y == button.y)) then
if (
(x == button.x and y == button.y) or
(button.mouse_down+0.5 > GetTime() and button:IsMouseOver())
) then
if (buttontype == "LeftButton") then
button.MyObject.func (button, buttontype, button.MyObject.param1, button.MyObject.param2)
else
@@ -936,7 +939,8 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local ButtonObject = {type = "button", dframework = true}
+13 -2
View File
@@ -1,5 +1,5 @@
local dversion = 12
local dversion = 13
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -205,6 +205,10 @@ function DF:Embed (target)
return target
end
function DF:RemoveRealmName (name)
return name:gsub (("%-.*"), "")
end
function DF:RemoveRealName (name)
return name:gsub (("%-.*"), "")
end
@@ -878,4 +882,11 @@ function DF:GetTemplate (type, template_name)
end
return template_table [template_name]
end
function DF.GetParentName (frame)
local parentName = frame:GetName()
if (not parentName) then
error ("Details! FrameWork: called $parent but parent was no name.", 2)
end
return parentName
end
+4 -7
View File
File diff suppressed because one or more lines are too long
+8
View File
@@ -25,12 +25,20 @@ do
function _detalhes:GetInstanceIdFromEncounterId (encounterid)
for id, instanceTable in pairs (_detalhes.EncounterInformation) do
--combatlog encounter id
local ids = instanceTable.encounter_ids2
if (ids) then
if (ids [encounterid]) then
return id
end
end
--encounter journal id
local ids_ej = instanceTable.encounter_ids
if (ids) then
if (ids_ej [encounterid]) then
return id
end
end
end
end