- Added export/import for instances.

- Added export/import for customs displays.
- More small changes on ElvUI Frame Style skin.

- Fixed boss death recognition.
- Fixed the time of buffs applied before the pull.
- Fixed issue where sometimes the tooltip for break snap and lock buttons didn't disappear.

- New API: _detalhes:GetNumInstancesAmount() return the amount of instances created.
This commit is contained in:
tercio
2014-07-08 16:48:47 -03:00
parent 72c00a528a
commit 3391a22ebc
32 changed files with 2847 additions and 981 deletions
+42 -4
View File
@@ -377,6 +377,32 @@ local ButtonMetaFunctions = {}
end
end
-- icon
function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance)
if (not self.icon) then
self.icon = self:CreateTexture (nil, "artwork")
self.icon:SetSize (self.height*0.8, self.height*0.8)
self.icon:SetPoint ("left", self.widget, "left", 4, 0)
self.widget.text:ClearAllPoints()
self.widget.text:SetPoint ("left", self.icon, "right", textdistance or 2, 0)
end
self.icon:SetTexture (texture)
self.icon:SetSize (width or self.height*0.8, height or self.height*0.8)
self.icon:SetDrawLayer (layout or "artwork")
if (texcoord) then
self.icon:SetTexCoord (unpack (texcoord))
else
self.icon:SetTexCoord (0, 1, 0, 1)
end
if (overlay) then
self.icon:SetVertexColor (unpack (overlay))
else
self.icon:SetVertexColor (1, 1, 1, 1)
end
end
-- frame stratas
function ButtonMetaFunctions:SetFrameStrata()
return self.button:GetFrameStrata()
@@ -557,7 +583,9 @@ local ButtonMetaFunctions = {}
end
if (button.MyObject.capsule_textalign) then
if (button.MyObject.capsule_textalign == "left") then
if (button.MyObject.icon) then
button.MyObject.icon:SetPoint ("left", button, "left", 5, -1)
elseif (button.MyObject.capsule_textalign == "left") then
button.text:SetPoint ("left", button, "left", 3, -1)
elseif (button.MyObject.capsule_textalign == "center") then
button.text:SetPoint ("center", button, "center", 1, -1)
@@ -565,7 +593,11 @@ local ButtonMetaFunctions = {}
button.text:SetPoint ("right", button, "right", -1, -1)
end
else
button.text:SetPoint ("center", button,"center", 1, -1)
if (button.MyObject.icon) then
button.MyObject.icon:SetPoint ("left", button, "left", 7, -2)
else
button.text:SetPoint ("center", button,"center", 1, -1)
end
end
button.mouse_down = GetTime()
@@ -622,7 +654,9 @@ local ButtonMetaFunctions = {}
end
if (button.MyObject.capsule_textalign) then
if (button.MyObject.capsule_textalign == "left") then
if (button.MyObject.icon) then
button.MyObject.icon:SetPoint ("left", button, "left", 4, 0)
elseif (button.MyObject.capsule_textalign == "left") then
button.text:SetPoint ("left", button, "left", 2, 0)
elseif (button.MyObject.capsule_textalign == "center") then
button.text:SetPoint ("center", button, "center", 0, 0)
@@ -630,7 +664,11 @@ local ButtonMetaFunctions = {}
button.text:SetPoint ("right", button, "right", -2, 0)
end
else
button.text:SetPoint ("center", button,"center", 0, 0)
if (button.MyObject.icon) then
button.MyObject.icon:SetPoint ("left", button, "left", 4, 0)
else
button.text:SetPoint ("center", button,"center", 0, 0)
end
end
if (button.MyObject.container.isMoving) then
+9 -8
View File
@@ -639,7 +639,7 @@ function gump:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_
if (panel.rows [i].type == "icon") then
local result = results [i]:gsub (".-%\\", "")
row.row_widgets [i].icon.texture = results [i]
row.row_widgets [i]._icon.texture = results [i]
elseif (panel.rows [i].type == "button") then
@@ -673,7 +673,7 @@ function gump:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_
for i = 1, #row.row_widgets do
row.row_widgets [i]:SetText ("")
if (panel.rows [i].type == "icon") then
row.row_widgets [i].icon.texture = ""
row.row_widgets [i]._icon.texture = ""
end
end
end
@@ -682,7 +682,7 @@ function gump:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_
for i = 1, #row.row_widgets do
row.row_widgets [i]:SetText ("")
if (panel.rows [i].type == "icon") then
row.row_widgets [i].icon.texture = ""
row.row_widgets [i]._icon.texture = ""
end
end
end
@@ -804,26 +804,27 @@ function gump:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_
elseif (_type == "icon") then
--> create button and icon
local iconbutton = gump:NewButton (row, nil, "$parentIconButton" .. o, "iconbutton", panel.rows [o].width, 20)
local iconbutton = gump:NewButton (row, nil, "$parentIconButton" .. o, "iconbutton", 22, 20)
iconbutton:InstallCustomTexture()
iconbutton:SetHook ("OnEnter", button_on_enter)
iconbutton:SetHook ("OnLeave", button_on_leave)
--iconbutton:InstallCustomTexture()
local icon = gump:NewImage (iconbutton, nil, 20, 20, "artwork", nil, "icon", "$parentIcon" .. o)
local icon = gump:NewImage (iconbutton, nil, 20, 20, "artwork", nil, "_icon", "$parentIcon" .. o)
iconbutton._icon = icon
iconbutton:SetPoint ("left", row, "left", anchors [o], 0)
iconbutton:SetPoint ("left", row, "left", anchors [o] + ( (panel.rows [o].width - 22) / 2), 0)
icon:SetPoint ("center", iconbutton, "center", 0, 0)
--> set functions
local function iconcallback (texture)
iconbutton.icon.texture = texture
iconbutton._icon.texture = texture
panel.rows [o].func (iconbutton.index, texture)
end
iconbutton:SetClickFunction (function()
gump:IconPick (iconcallback)
gump:IconPick (iconcallback, true)
return true
end)
+2 -2
View File
@@ -700,8 +700,8 @@ function gump:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent)
scrollframe.editbox:SetMultiLine (true)
scrollframe.editbox:SetJustifyH ("left")
scrollframe.editbox:SetJustifyV ("top")
scrollframe.editbox:SetMaxBytes (40960)
scrollframe.editbox:SetMaxLetters (20000)
scrollframe.editbox:SetMaxBytes (1024000)
scrollframe.editbox:SetMaxLetters (128000)
borderframe.GetText = function_gettext
borderframe.SetText = function_settext