- Fixed an issue with the statistics sharing among guild members.
- Fixed an issue with Argus encounter where two segments were created. - Fixed aura type images on the Create Aura Panel. - Create Aura Panel can now be closed with Right Click. - Framework updated to r60, plugins should be more stable now.
This commit is contained in:
+39
-2
@@ -155,6 +155,14 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
|
||||
local smember_function = function (_object, _value)
|
||||
return _rawset (_object, "func", _value)
|
||||
end
|
||||
--> param1
|
||||
local smember_param1 = function (_object, _value)
|
||||
return _rawset (_object, "param1", _value)
|
||||
end
|
||||
--> param2
|
||||
local smember_param2 = function (_object, _value)
|
||||
return _rawset (_object, "param2", _value)
|
||||
end
|
||||
--> text color
|
||||
local smember_textcolor = function (_object, _value)
|
||||
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)
|
||||
@@ -225,6 +233,8 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
|
||||
ButtonMetaFunctions.SetMembers ["height"] = smember_height
|
||||
ButtonMetaFunctions.SetMembers ["text"] = smember_text
|
||||
ButtonMetaFunctions.SetMembers ["clickfunction"] = smember_function
|
||||
ButtonMetaFunctions.SetMembers ["param1"] = smember_param1
|
||||
ButtonMetaFunctions.SetMembers ["param2"] = smember_param2
|
||||
ButtonMetaFunctions.SetMembers ["textcolor"] = smember_textcolor
|
||||
ButtonMetaFunctions.SetMembers ["textfont"] = smember_textfont
|
||||
ButtonMetaFunctions.SetMembers ["textsize"] = smember_textsize
|
||||
@@ -861,9 +871,21 @@ local ButtonMetaFunctions = _G [DF.GlobalWidgetControlNames ["button"]]
|
||||
(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)
|
||||
|
||||
local success, errorText = pcall (button.MyObject.func, button, buttontype, button.MyObject.param1, button.MyObject.param2)
|
||||
if (not success) then
|
||||
error ("Details! Framework: button " .. button:GetName() .. " error: " .. errorText)
|
||||
end
|
||||
|
||||
--button.MyObject.func (button, buttontype, button.MyObject.param1, button.MyObject.param2)
|
||||
else
|
||||
button.MyObject.funcright (button, buttontype, button.MyObject.param1, button.MyObject.param2)
|
||||
|
||||
local success, errorText = pcall (button.MyObject.funcright, button, buttontype, button.MyObject.param1, button.MyObject.param2)
|
||||
if (not success) then
|
||||
error ("Details! Framework: button " .. button:GetName() .. " error: " .. errorText)
|
||||
end
|
||||
|
||||
--button.MyObject.funcright (button, buttontype, button.MyObject.param1, button.MyObject.param2)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -918,6 +940,21 @@ function ButtonMetaFunctions:SetTemplate (template)
|
||||
self:SetIcon (i.texture, i.width, i.height, i.layout, i.texcoord, i.color, i.textdistance, i.leftpadding)
|
||||
end
|
||||
|
||||
if (template.textsize) then
|
||||
self.textsize = template.textsize
|
||||
end
|
||||
|
||||
if (template.textfont) then
|
||||
self.textfont = template.textfont
|
||||
end
|
||||
|
||||
if (template.textcolor) then
|
||||
self.textcolor = template.textcolor
|
||||
end
|
||||
|
||||
if (template.textalign) then
|
||||
self.textalign = template.textalign
|
||||
end
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
|
||||
+252
-228
@@ -30,15 +30,18 @@ function DF:CreateCoolTip()
|
||||
--> Cooltip Startup
|
||||
----------------------------------------------------------------------
|
||||
|
||||
--> if a cooltip is already created with a higher version
|
||||
if (_G.GameCooltip2 and _G.GameCooltip2.version >= version) then
|
||||
return
|
||||
end
|
||||
|
||||
--> Start Cooltip Table
|
||||
local CoolTip = {version = version}
|
||||
--> initialize
|
||||
local CoolTip = {
|
||||
version = version
|
||||
}
|
||||
_G.GameCooltip2 = CoolTip
|
||||
|
||||
--> Containers
|
||||
--> containers
|
||||
CoolTip.LeftTextTable = {}
|
||||
CoolTip.LeftTextTableSub = {}
|
||||
CoolTip.RightTextTable = {}
|
||||
@@ -148,7 +151,7 @@ function DF:CreateCoolTip()
|
||||
|
||||
CoolTip._default_font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
|
||||
|
||||
--> Create Frames
|
||||
--> create frames
|
||||
|
||||
--> main frame
|
||||
local frame1
|
||||
@@ -200,7 +203,7 @@ function DF:CreateCoolTip()
|
||||
DF:FadeFrame (frame1, 0)
|
||||
DF:FadeFrame (frame2, 0)
|
||||
|
||||
--> button containers
|
||||
--> line container
|
||||
frame1.Lines = {}
|
||||
frame2.Lines = {}
|
||||
|
||||
@@ -265,13 +268,14 @@ function DF:CreateCoolTip()
|
||||
CoolTip.buttonClicked = false
|
||||
|
||||
frame1:SetScript ("OnEnter", function (self)
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then --> menu
|
||||
--> is cooltip a menu?
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then
|
||||
CoolTip.active = true
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
DF:FadeFrame (self, 0)
|
||||
--rever
|
||||
|
||||
if (CoolTip.sub_menus) then
|
||||
DF:FadeFrame (frame2, 0)
|
||||
end
|
||||
@@ -387,191 +391,200 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
local OnEnterUpdateButton = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.001) then
|
||||
--> search key: ~onenterupdatemain
|
||||
CoolTip:ShowSub (self.index)
|
||||
CoolTip.last_button = self.index
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
local OnLeaveUpdateButton = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.7) then
|
||||
if (not CoolTip.active and not CoolTip.buttonClicked) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
|
||||
elseif (not CoolTip.active) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
end
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:NewMainButton (i)
|
||||
local botao = CoolTip:CreateButton (i, frame1, "GameCooltipMainButton"..i)
|
||||
|
||||
--> serach key: ~onenter
|
||||
botao:SetScript ("OnEnter", function()
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not botao.isDiv) then
|
||||
CoolTip.active = true
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
|
||||
botao.background:Show()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendModeHover) then
|
||||
botao.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendModeHover)
|
||||
else
|
||||
botao.leftIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
if (CoolTip.PopupFrameTable [botao.index]) then
|
||||
local on_enter, on_leave, param1, param2 = unpack (CoolTip.PopupFrameTable [botao.index])
|
||||
if (on_enter) then
|
||||
xpcall (on_enter, geterrorhandler(), frame1, param1, param2)
|
||||
end
|
||||
|
||||
elseif (CoolTip.IndexesSub [botao.index] and CoolTip.IndexesSub [botao.index] > 0) then
|
||||
if (CoolTip.OptionsTable.SubMenuIsTooltip) then
|
||||
CoolTip:ShowSub (botao.index)
|
||||
botao.index = i
|
||||
else
|
||||
if (CoolTip.last_button) then
|
||||
CoolTip:ShowSub (CoolTip.last_button)
|
||||
else
|
||||
CoolTip:ShowSub (botao.index)
|
||||
end
|
||||
elapsedTime = 0
|
||||
botao.index = i
|
||||
botao:SetScript ("OnUpdate", OnEnterUpdateButton)
|
||||
end
|
||||
|
||||
else
|
||||
--hide second frame
|
||||
DF:FadeFrame (frame2, 1)
|
||||
CoolTip.last_button = nil
|
||||
end
|
||||
else
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
end
|
||||
end)
|
||||
|
||||
botao:SetScript ("OnLeave", function()
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not botao.isDiv) then
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
botao:SetScript ("OnUpdate", nil)
|
||||
|
||||
botao.background:Hide()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendMode) then
|
||||
botao.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
botao.rightIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
else
|
||||
botao.leftIcon:SetBlendMode ("BLEND")
|
||||
botao.rightIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
if (CoolTip.PopupFrameTable [botao.index]) then
|
||||
local on_enter, on_leave, param1, param2 = unpack (CoolTip.PopupFrameTable [botao.index])
|
||||
if (on_leave) then
|
||||
xpcall (on_leave, geterrorhandler(), frame1, param1, param2)
|
||||
end
|
||||
end
|
||||
|
||||
elapsedTime = 0
|
||||
frame1:SetScript ("OnUpdate", OnLeaveUpdateButton)
|
||||
--CoolTip:HideSub (i)
|
||||
else
|
||||
CoolTip.active = false
|
||||
elapsedTime = 0
|
||||
frame1:SetScript ("OnUpdate", OnLeaveUpdateButton)
|
||||
CoolTip.mouseOver = false
|
||||
end
|
||||
end)
|
||||
|
||||
return botao
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.001) then
|
||||
--> search key: ~onenterupdatemain
|
||||
CoolTip:ShowSub (self.index)
|
||||
CoolTip.last_button = self.index
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
local OnLeaveUpdateButton = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.7) then
|
||||
if (not CoolTip.active and not CoolTip.buttonClicked) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
|
||||
elseif (not CoolTip.active) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
end
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
local OnEnterMainButton = function (self)
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not self.isDiv) then
|
||||
CoolTip.active = true
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
|
||||
self.background:Show()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendModeHover) then
|
||||
self.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendModeHover)
|
||||
else
|
||||
self.leftIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
if (CoolTip.PopupFrameTable [self.index]) then
|
||||
local on_enter, on_leave, param1, param2 = unpack (CoolTip.PopupFrameTable [self.index])
|
||||
if (on_enter) then
|
||||
xpcall (on_enter, geterrorhandler(), frame1, param1, param2)
|
||||
end
|
||||
|
||||
elseif (CoolTip.IndexesSub [self.index] and CoolTip.IndexesSub [self.index] > 0) then
|
||||
if (CoolTip.OptionsTable.SubMenuIsTooltip) then
|
||||
CoolTip:ShowSub (self.index)
|
||||
self.index = self.ID
|
||||
else
|
||||
if (CoolTip.last_button) then
|
||||
CoolTip:ShowSub (CoolTip.last_button)
|
||||
else
|
||||
CoolTip:ShowSub (self.index)
|
||||
end
|
||||
elapsedTime = 0
|
||||
self.index = self.ID
|
||||
self:SetScript ("OnUpdate", OnEnterUpdateButton)
|
||||
end
|
||||
|
||||
else
|
||||
--hide second frame
|
||||
DF:FadeFrame (frame2, 1)
|
||||
CoolTip.last_button = nil
|
||||
end
|
||||
else
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
end
|
||||
end
|
||||
|
||||
local OnLeaveMainButton = function (self)
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not self.isDiv) then
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
|
||||
self.background:Hide()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendMode) then
|
||||
self.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
self.rightIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
else
|
||||
self.leftIcon:SetBlendMode ("BLEND")
|
||||
self.rightIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
if (CoolTip.PopupFrameTable [self.index]) then
|
||||
local on_enter, on_leave, param1, param2 = unpack (CoolTip.PopupFrameTable [self.index])
|
||||
if (on_leave) then
|
||||
xpcall (on_leave, geterrorhandler(), frame1, param1, param2)
|
||||
end
|
||||
end
|
||||
|
||||
elapsedTime = 0
|
||||
frame1:SetScript ("OnUpdate", OnLeaveUpdateButton)
|
||||
else
|
||||
CoolTip.active = false
|
||||
elapsedTime = 0
|
||||
frame1:SetScript ("OnUpdate", OnLeaveUpdateButton)
|
||||
CoolTip.mouseOver = false
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:NewMainButton (i)
|
||||
local newButton = CoolTip:CreateButton (i, frame1, "GameCooltipMainButton"..i)
|
||||
|
||||
--> serach key: ~onenter
|
||||
newButton.ID = i
|
||||
newButton:SetScript ("OnEnter", OnEnterMainButton)
|
||||
newButton:SetScript ("OnLeave", OnLeaveMainButton)
|
||||
|
||||
return newButton
|
||||
end
|
||||
|
||||
--> buttons for the secondary frame
|
||||
|
||||
local OnLeaveUpdateButtonSec = function (self, elapsed)
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.7) then
|
||||
if (not CoolTip.active and not CoolTip.buttonClicked) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
elseif (not CoolTip.active) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
end
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
elapsedTime = elapsedTime+elapsed
|
||||
if (elapsedTime > 0.7) then
|
||||
if (not CoolTip.active and not CoolTip.buttonClicked) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
elseif (not CoolTip.active) then
|
||||
DF:FadeFrame (frame1, 1)
|
||||
DF:FadeFrame (frame2, 1)
|
||||
end
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end
|
||||
|
||||
local OnEnterSecondaryButton = function (self)
|
||||
if (CoolTip.OptionsTable.SubMenuIsTooltip) then
|
||||
return CoolTip:Close()
|
||||
end
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not self.isDiv) then
|
||||
CoolTip.active = true
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
|
||||
self.background:Show()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendModeHover) then
|
||||
self.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendModeHover)
|
||||
else
|
||||
self.leftIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
|
||||
DF:FadeFrame (frame1, 0)
|
||||
DF:FadeFrame (frame2, 0)
|
||||
else
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
end
|
||||
end
|
||||
|
||||
local OnLeaveSecondaryButton = function (self)
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
|
||||
self.background:Hide()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendMode) then
|
||||
self.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
self.rightIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
else
|
||||
self.leftIcon:SetBlendMode ("BLEND")
|
||||
self.rightIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
elapsedTime = 0
|
||||
frame2:SetScript ("OnUpdate", OnLeaveUpdateButtonSec)
|
||||
else
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
elapsedTime = 0
|
||||
frame2:SetScript ("OnUpdate", OnLeaveUpdateButtonSec)
|
||||
end
|
||||
end
|
||||
|
||||
function CoolTip:NewSecondaryButton (i)
|
||||
local botao = CoolTip:CreateButton (i, frame2, "GameCooltipSecButton"..i)
|
||||
local newButton = CoolTip:CreateButton (i, frame2, "GameCooltipSecButton"..i)
|
||||
|
||||
botao:SetScript ("OnEnter", function()
|
||||
if (CoolTip.OptionsTable.SubMenuIsTooltip) then
|
||||
return CoolTip:Close()
|
||||
end
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not botao.isDiv) then
|
||||
CoolTip.active = true
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
|
||||
botao.background:Show()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendModeHover) then
|
||||
botao.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendModeHover)
|
||||
else
|
||||
botao.leftIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
frame1:SetScript ("OnUpdate", nil)
|
||||
frame2:SetScript ("OnUpdate", nil)
|
||||
|
||||
DF:FadeFrame (frame1, 0)
|
||||
DF:FadeFrame (frame2, 0)
|
||||
else
|
||||
CoolTip.mouseOver = true
|
||||
CoolTip.had_interaction = true
|
||||
end
|
||||
end)
|
||||
|
||||
botao:SetScript ("OnLeave", function()
|
||||
if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
|
||||
botao.background:Hide()
|
||||
|
||||
if (CoolTip.OptionsTable.IconBlendMode) then
|
||||
botao.leftIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
botao.rightIcon:SetBlendMode (CoolTip.OptionsTable.IconBlendMode)
|
||||
else
|
||||
botao.leftIcon:SetBlendMode ("BLEND")
|
||||
botao.rightIcon:SetBlendMode ("BLEND")
|
||||
end
|
||||
|
||||
elapsedTime = 0
|
||||
frame2:SetScript ("OnUpdate", OnLeaveUpdateButtonSec)
|
||||
else
|
||||
CoolTip.active = false
|
||||
CoolTip.mouseOver = false
|
||||
elapsedTime = 0
|
||||
frame2:SetScript ("OnUpdate", OnLeaveUpdateButtonSec)
|
||||
end
|
||||
end)
|
||||
newButton.ID = i
|
||||
newButton:SetScript ("OnEnter", OnEnterSecondaryButton)
|
||||
newButton:SetScript ("OnLeave", OnLeaveSecondaryButton)
|
||||
|
||||
return botao
|
||||
return newButton
|
||||
end
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -615,51 +628,62 @@ function DF:CreateCoolTip()
|
||||
CoolTip:ShowSelectedTexture (frame)
|
||||
end
|
||||
|
||||
local OnClickFunctionButtonPrincipal = function (self, button)
|
||||
if (CoolTip.IndexesSub [self.index] and CoolTip.IndexesSub [self.index] > 0) then
|
||||
CoolTip:ShowSub (self.index)
|
||||
CoolTip.last_button = self.index
|
||||
end
|
||||
|
||||
CoolTip.buttonClicked = true
|
||||
CoolTip:SetSelectedAnchor (frame1, self)
|
||||
|
||||
if (not CoolTip.OptionsTable.NoLastSelectedBar) then
|
||||
CoolTip:ShowSelectedTexture (frame1)
|
||||
|
||||
end
|
||||
CoolTip.SelectedIndexMain = self.index
|
||||
|
||||
if (CoolTip.FunctionsTableMain [self.index]) then
|
||||
local parameterTable = CoolTip.ParametersTableMain [self.index]
|
||||
CoolTip.FunctionsTableMain [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
end
|
||||
local OnClickFunctionMainButton = function (self, button)
|
||||
if (CoolTip.IndexesSub [self.index] and CoolTip.IndexesSub [self.index] > 0) then
|
||||
CoolTip:ShowSub (self.index)
|
||||
CoolTip.last_button = self.index
|
||||
end
|
||||
|
||||
CoolTip.buttonClicked = true
|
||||
CoolTip:SetSelectedAnchor (frame1, self)
|
||||
|
||||
if (not CoolTip.OptionsTable.NoLastSelectedBar) then
|
||||
CoolTip:ShowSelectedTexture (frame1)
|
||||
end
|
||||
CoolTip.SelectedIndexMain = self.index
|
||||
|
||||
if (CoolTip.FunctionsTableMain [self.index]) then
|
||||
local parameterTable = CoolTip.ParametersTableMain [self.index]
|
||||
local func = CoolTip.FunctionsTableMain [self.index]
|
||||
--> passing nil as the first parameter was a design mistake
|
||||
--CoolTip.FunctionsTableMain [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, nil, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
if (not okay) then
|
||||
print ("Cooltip OnClick Error:", errortext)
|
||||
end
|
||||
|
||||
local OnClickFunctionButtonSecundario = function (self, button)
|
||||
CoolTip.buttonClicked = true
|
||||
|
||||
CoolTip:SetSelectedAnchor (frame2, self)
|
||||
|
||||
if (CoolTip.FunctionsTableSub [self.mainIndex] and CoolTip.FunctionsTableSub [self.mainIndex] [self.index]) then
|
||||
local parameterTable = CoolTip.ParametersTableSub [self.mainIndex] [self.index]
|
||||
CoolTip.FunctionsTableSub [self.mainIndex] [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
end
|
||||
|
||||
local botao_p = frame1.Lines [self.mainIndex]
|
||||
CoolTip:SetSelectedAnchor (frame1, botao_p)
|
||||
end
|
||||
end
|
||||
|
||||
local OnClickFunctionSecondaryButton = function (self, button)
|
||||
CoolTip.buttonClicked = true
|
||||
|
||||
CoolTip:SetSelectedAnchor (frame2, self)
|
||||
|
||||
if (CoolTip.FunctionsTableSub [self.mainIndex] and CoolTip.FunctionsTableSub [self.mainIndex] [self.index]) then
|
||||
local parameterTable = CoolTip.ParametersTableSub [self.mainIndex] [self.index]
|
||||
local func = CoolTip.FunctionsTableSub [self.mainIndex] [self.index]
|
||||
--CoolTip.FunctionsTableSub [self.mainIndex] [self.index] (_, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
local okay, errortext = pcall (func, nil, CoolTip.FixedValue, parameterTable [1], parameterTable [2], parameterTable [3], button)
|
||||
if (not okay) then
|
||||
print ("Cooltip OnClick Error:", errortext)
|
||||
end
|
||||
end
|
||||
|
||||
local botao_p = frame1.Lines [self.mainIndex]
|
||||
CoolTip:SetSelectedAnchor (frame1, botao_p)
|
||||
|
||||
if (not CoolTip.OptionsTable.NoLastSelectedBar) then
|
||||
CoolTip:ShowSelectedTexture (frame1)
|
||||
end
|
||||
|
||||
CoolTip.SelectedIndexMain = self.mainIndex
|
||||
CoolTip.SelectedIndexSec [self.mainIndex] = self.index
|
||||
|
||||
end
|
||||
if (not CoolTip.OptionsTable.NoLastSelectedBar) then
|
||||
CoolTip:ShowSelectedTexture (frame1)
|
||||
end
|
||||
|
||||
CoolTip.SelectedIndexMain = self.mainIndex
|
||||
CoolTip.SelectedIndexSec [self.mainIndex] = self.index
|
||||
end
|
||||
|
||||
|
||||
--> format functions
|
||||
|
||||
function CoolTip:TextAndIcon (index, frame, menuButton, leftTextTable, rightTextTable, leftIconTable, rightIconTable, isSub)
|
||||
|
||||
--> reset width
|
||||
menuButton.leftText:SetWidth (0)
|
||||
menuButton.leftText:SetHeight (0)
|
||||
@@ -1010,7 +1034,7 @@ function DF:CreateCoolTip()
|
||||
end
|
||||
|
||||
--> register click function
|
||||
menuButton:SetScript ("OnClick", OnClickFunctionButtonPrincipal)
|
||||
menuButton:SetScript ("OnClick", OnClickFunctionMainButton)
|
||||
menuButton:Show()
|
||||
end
|
||||
|
||||
@@ -1044,7 +1068,7 @@ function DF:CreateCoolTip()
|
||||
frame2.w = stringWidth
|
||||
end
|
||||
|
||||
menuButton:SetScript ("OnClick", OnClickFunctionButtonSecundario)
|
||||
menuButton:SetScript ("OnClick", OnClickFunctionSecondaryButton)
|
||||
menuButton:Show()
|
||||
|
||||
return true
|
||||
|
||||
@@ -483,7 +483,13 @@ function DetailsFrameworkDropDownOptionClick (button)
|
||||
|
||||
--> exec function if any
|
||||
if (button.table.onclick) then
|
||||
button.table.onclick (button:GetParent():GetParent():GetParent().MyObject, button.object.FixedValue, button.table.value)
|
||||
|
||||
local success, errorText = pcall (button.table.onclick, button:GetParent():GetParent():GetParent().MyObject, button.object.FixedValue, button.table.value)
|
||||
if (not success) then
|
||||
error ("Details! Framework: dropdown " .. button:GetParent():GetParent():GetParent().MyObject:GetName() .. " error: " .. errorText)
|
||||
end
|
||||
|
||||
--button.table.onclick (button:GetParent():GetParent():GetParent().MyObject, button.object.FixedValue, button.table.value)
|
||||
end
|
||||
|
||||
--> set the value of selected option in main object
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
|
||||
local dversion = 58
|
||||
local dversion = 60
|
||||
local major, minor = "DetailsFramework-1.0", dversion
|
||||
local DF, oldminor = LibStub:NewLibrary (major, minor)
|
||||
|
||||
|
||||
+1
-1
@@ -963,7 +963,7 @@ function DF:NewFillPanel (parent, rows, name, member, w, h, total_lines, fill_ro
|
||||
for index, t in ipairs (rows) do
|
||||
panel.AddRow (panel, t)
|
||||
end
|
||||
|
||||
|
||||
local refresh_fillbox = function (self)
|
||||
|
||||
local offset = FauxScrollFrame_GetOffset (self)
|
||||
|
||||
+2
-1
@@ -958,7 +958,8 @@ local encounter_is_current_tier = function (encounterID)
|
||||
if (OnlyFromCurrentRaidTier) then
|
||||
local mapID = _detalhes:GetInstanceIdFromEncounterId (encounterID)
|
||||
if (mapID) then
|
||||
if (_detalhes.current_raid_tier_mapid ~= mapID) then
|
||||
--> if isn'y the mapID in the table to save data
|
||||
if (not _detalhes.InstancesToStoreData [mapID]) then
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
+12
-1
@@ -454,13 +454,24 @@
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
--> menu background
|
||||
local menuBackground = CreateFrame ("frame", nil, f)
|
||||
local menuBackground = CreateFrame ("frame", "$parentMenuFrame", f)
|
||||
_detalhes:FormatBackground (menuBackground)
|
||||
|
||||
--> point
|
||||
menuBackground:SetPoint ("topright", f, "topleft", -2, 0)
|
||||
menuBackground:SetPoint ("bottomright", f, "bottomleft", -2, 0)
|
||||
menuBackground:SetWidth (f.MenuButtonWidth + 6)
|
||||
|
||||
local bigdog = _detalhes.gump:NewImage (menuBackground, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.7, 200*0.7, "overlay", {0, 1, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
|
||||
bigdog:SetPoint ("bottomleft", custom_window, "bottomleft", 0, 1)
|
||||
bigdog:SetAlpha (0.3)
|
||||
|
||||
local bigdogRow = menuBackground:CreateTexture (nil, "artwork")
|
||||
bigdogRow:SetPoint ("bottomleft", menuBackground, "bottomleft", 1, 1)
|
||||
bigdogRow:SetPoint ("bottomright", menuBackground, "bottomright", -1, 1)
|
||||
bigdogRow:SetHeight (20)
|
||||
bigdogRow:SetColorTexture (.5, .5, .5, .1)
|
||||
bigdogRow:Hide()
|
||||
|
||||
--> plugins menu title bar
|
||||
local titlebar_plugins = CreateFrame ("frame", nil, menuBackground)
|
||||
|
||||
+4
-4
@@ -1192,7 +1192,7 @@
|
||||
end
|
||||
|
||||
DetailsRaidHistoryWindow.Initialized = true
|
||||
|
||||
|
||||
local f = DetailsRaidHistoryWindow or CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent) --, "ButtonFrameTemplate"
|
||||
f:SetPoint ("center", UIParent, "center")
|
||||
f:SetFrameStrata ("HIGH")
|
||||
@@ -1228,9 +1228,9 @@
|
||||
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
--> menu title
|
||||
local titleLabel = _detalhes.gump:NewLabel (titlebar, titlebar, nil, "titulo", "Statistics", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
local titleLabel = _detalhes.gump:NewLabel (titlebar, titlebar, nil, "titulo", "Details! " .. Loc ["STRING_STATISTICS"], "GameFontNormal", 12) --{227/255, 186/255, 4/255}
|
||||
titleLabel:SetPoint ("center", titlebar , "center")
|
||||
titleLabel:SetPoint ("top", titlebar , "top", 0, -5)
|
||||
titleLabel:SetPoint ("top", titlebar , "top", 0, -4)
|
||||
|
||||
--> close button
|
||||
f.Close = CreateFrame ("button", "$parentCloseButton", f)
|
||||
@@ -1254,7 +1254,7 @@
|
||||
insets = {left = 0, right = 0, top = 0, bottom = 0}, edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize=1})
|
||||
tutorialFrame:SetBackdropColor (0, 0, 0, 1)
|
||||
|
||||
tutorialFrame.Title = _detalhes.gump:CreateLabel (tutorialFrame, Loc ["STRING_MODE_OPENGUILDDAMAGERANK"], 12, "orange")
|
||||
tutorialFrame.Title = _detalhes.gump:CreateLabel (tutorialFrame, "Statistics" , 12, "orange") --curse localization isn't adding new strings (and I deleted the old one)
|
||||
tutorialFrame.Title:SetPoint ("top", tutorialFrame, "top", 0, -5)
|
||||
|
||||
tutorialFrame.Desc = _detalhes.gump:CreateLabel (tutorialFrame, Loc ["STRING_GUILDDAMAGERANK_TUTORIAL_DESC"], 12)
|
||||
|
||||
+29
-11
@@ -1731,12 +1731,25 @@
|
||||
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
|
||||
f:SetSize (800, 600)
|
||||
f:SetPoint ("center", UIParent, "center", 0, 150)
|
||||
f:SetFrameStrata ("HIGH")
|
||||
f:SetFrameStrata ("DIALOG")
|
||||
f:EnableMouse (true)
|
||||
f:SetMovable (true)
|
||||
f:SetToplevel (true)
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
|
||||
--f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
|
||||
--f:SetBackdropColor (24/255, 24/255, 24/255, .8)
|
||||
--f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
f.bg1 = f:CreateTexture (nil, "background")
|
||||
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
|
||||
f.bg1:SetAlpha (0.8)
|
||||
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
|
||||
f.bg1:SetVertTile (true)
|
||||
f.bg1:SetHorizTile (true)
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .7)
|
||||
f:SetBackdropBorderColor (0, 0, 0, 1)
|
||||
|
||||
--register to libwindow
|
||||
@@ -1746,6 +1759,12 @@
|
||||
LibWindow.MakeDraggable (f)
|
||||
LibWindow.SavePosition (f)
|
||||
|
||||
f:SetScript ("OnMouseDown", function (self, button)
|
||||
if (button == "RightButton") then
|
||||
f:Hide()
|
||||
end
|
||||
end)
|
||||
|
||||
--titlebar
|
||||
f.TitleBar = CreateFrame ("frame", "$parentTitleBar", f)
|
||||
f.TitleBar:SetPoint ("topleft", f, "topleft", 2, -3)
|
||||
@@ -1771,7 +1790,6 @@
|
||||
--title
|
||||
f.Title = f.TitleBar:CreateFontString ("$parentTitle", "overlay", "GameFontNormal")
|
||||
f.Title:SetPoint ("center", f.TitleBar, "center")
|
||||
f.Title:SetTextColor (.8, .8, .8, 1)
|
||||
f.Title:SetText ("Details! Create Aura")
|
||||
|
||||
local fw = _detalhes:GetFramework()
|
||||
@@ -1808,13 +1826,13 @@
|
||||
aura_type:SetPoint ("left", aura_type_label, "right", 2, 0)
|
||||
aura_type:Hide()
|
||||
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {119/512, 151/512, 176/512, 208/512}, nil, nil)
|
||||
local Icon_IconAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 32, 32, "overlay", {200/512, 232/512, 336/512, 368/512}, nil, nil)
|
||||
Icon_IconAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 10, -16)
|
||||
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {154/512, 246/512, 176/512, 188/512}, nil, nil)
|
||||
local Icon_StatusbarAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 92, 12, "overlay", {235/512, 327/512, 336/512, 348/512}, nil, nil)
|
||||
Icon_StatusbarAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 60, -26)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {169/512, 225/512, 200/512, 207/512}, nil, nil)
|
||||
|
||||
local Icon_TextOnlyAuraType = fw:CreateImage (f, [[Interface\AddOns\Details\images\icons2]], 57, 8, "overlay", {250/512, 306/512, 360/512, 367/512}, nil, nil)
|
||||
Icon_TextOnlyAuraType:SetPoint ("topleft", aura_type_label, "bottomleft", 170, -28)
|
||||
|
||||
local AuraTypeSelectedColor = {1, 1, 1, 0.3}
|
||||
@@ -2830,7 +2848,7 @@
|
||||
--> forge
|
||||
|
||||
function _detalhes:InitializeForge()
|
||||
local DetailsForgePanel = _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Aura Forge", "DetailsForgePanel")
|
||||
local DetailsForgePanel = _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Details! Aura Forge", "DetailsForgePanel")
|
||||
DetailsForgePanel.Frame = DetailsForgePanel
|
||||
DetailsForgePanel.__name = "Aura Forge"
|
||||
DetailsForgePanel.real_name = "DETAILS_FORGE"
|
||||
@@ -2864,7 +2882,7 @@
|
||||
local have_plugins_enabled
|
||||
|
||||
for id, instanceTable in pairs (_detalhes.EncounterInformation) do
|
||||
if (id == _detalhes.current_raid_tier_mapid) then
|
||||
if (_detalhes.InstancesToStoreData [id]) then
|
||||
have_plugins_enabled = true
|
||||
break
|
||||
end
|
||||
@@ -2930,7 +2948,7 @@
|
||||
f.bg1:SetSize (790, 454)
|
||||
f.bg1:SetAllPoints()
|
||||
|
||||
f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
|
||||
--f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
|
||||
|
||||
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
|
||||
f:SetBackdropColor (.5, .5, .5, .5)
|
||||
|
||||
@@ -238,7 +238,7 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section)
|
||||
window_icon:SetTexCoord (0, 0.054199, 0.591308, 0.646972) --605 663
|
||||
|
||||
--> title
|
||||
local title = g:NewLabel (window, nil, "$parentTitleLabel", "title", Loc ["STRING_OPTIONS_WINDOW"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
local title = g:NewLabel (window, nil, "$parentTitleLabel", "title", "Details! " .. Loc ["STRING_OPTIONS_WINDOW"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
|
||||
title:SetPoint ("center", window, "center")
|
||||
title:SetPoint ("top", window, "top", 0, -28)
|
||||
|
||||
|
||||
@@ -5826,7 +5826,8 @@ local build_mode_list = function (self, elapsed)
|
||||
CoolTip:AddMenu (1, _detalhes.OpenForge)
|
||||
CoolTip:AddIcon ([[Interface\MINIMAP\Vehicle-HammerGold-3]], 1, 1, 16, 16, 0, 1, 0, 1)
|
||||
|
||||
CoolTip:AddLine (Loc ["STRING_MODE_OPENGUILDDAMAGERANK"])
|
||||
--> statistics
|
||||
CoolTip:AddLine ("Statistics") --curse localization isn't adding new strings (and I deleted the old one)
|
||||
CoolTip:AddMenu (1, _detalhes.OpenRaidHistoryWindow)
|
||||
CoolTip:AddIcon ([[Interface\PvPRankBadges\PvPRank08]], 1, 1, 16, 16, 0, 1, 0, 1)
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user