- Improvements done on Report Death and Spell List from Player Detail Window.
- Added option for disable window group (snap). - Added option for select the icon pack instead of type the file name. - Fixed several bugs on profile and skins support. - Few fixes on Time Attack plugin. - New API: instance:SetMode (DETAILS_MODE_* SOLO RAID GROUP ALL) change the instance mode. - New API: instance:SetDisplay (segment, attribute, subattribute) change instance's display. - New API: framework:ShowTutorialAlertFrame (maintext, desctext, clickfunc) show an alert on the left side of screen. - New API: _detalhes:GetMaxInstancesAmount() return how many windows can be opened. - New API: _detalhes:GetFreeInstancesAmount() return how many windows can still be created. - New API: _detalhes:GetTutorialCVar (key, default) return a value from tutorial table. - New API: _detalhes:SetTutorialCVar (key, value) set a value on tutorial table.
This commit is contained in:
@@ -220,6 +220,14 @@ function _detalhes:GetDisplay()
|
||||
return self.atributo, self.sub_atributo
|
||||
end
|
||||
|
||||
function _detalhes:GetMaxInstancesAmount()
|
||||
return _detalhes.instances_amount
|
||||
end
|
||||
|
||||
function _detalhes:GetFreeInstancesAmount()
|
||||
return _detalhes.instances_amount - #_detalhes.tabela_instancias
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> retorna se a instância esta ou não ativa
|
||||
@@ -255,7 +263,8 @@ end
|
||||
self.verticalSnap = config.verticalSnap
|
||||
self.sub_atributo_last = config.sub_atributo_last
|
||||
self.isLocked = config.isLocked
|
||||
|
||||
self.last_raid_plugin = config.last_raid_plugin
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
@@ -367,8 +376,8 @@ end
|
||||
self.baseframe.lock_button:SetWidth (self.baseframe.lock_button.label:GetStringWidth()+2)
|
||||
self.baseframe.lock_button:ClearAllPoints()
|
||||
self.baseframe.lock_button:SetPoint ("bottomright", self.baseframe, "bottomright", -3, 0)
|
||||
self.baseframe.resize_direita:SetAlpha (1)
|
||||
self.baseframe.resize_esquerda:SetAlpha (1)
|
||||
self.baseframe.resize_direita:SetAlpha (0)
|
||||
self.baseframe.resize_esquerda:SetAlpha (0)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -468,14 +477,6 @@ end
|
||||
return false
|
||||
end
|
||||
|
||||
--> check is is open
|
||||
--if (instance:IsEnabled()) then
|
||||
-- instance:ShutDown()
|
||||
--end
|
||||
|
||||
-- deletei a janela 1
|
||||
-- a janela 2 ficou com snap [1] = 1 [3] = 3
|
||||
|
||||
--> break snaps of previous and next window
|
||||
local left_instance = _detalhes:GetInstance (id-1)
|
||||
if (left_instance) then
|
||||
@@ -511,84 +512,6 @@ end
|
||||
|
||||
table.remove (_detalhes.tabela_instancias, id)
|
||||
|
||||
if (true) then
|
||||
return
|
||||
end
|
||||
|
||||
table.remove (_detalhes.local_instances_config, id)
|
||||
_detalhes:SaveProfile()
|
||||
_detalhes:SaveLocalInstanceConfig()
|
||||
table.insert (_detalhes.tabela_instancias, 3, instance)
|
||||
_detalhes:ApplyProfile (_detalhes:GetCurrentProfileName(), true)
|
||||
|
||||
if (true) then
|
||||
return
|
||||
end
|
||||
|
||||
--> break snaps of previous and next window
|
||||
local left_instance = _detalhes:GetInstance (id-1)
|
||||
if (left_instance) then
|
||||
for index, instance_id in _pairs (left_instance.snap) do
|
||||
if (index == id) then --snap na proxima instancia
|
||||
left_instance.snap [index] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
local right_instance = _detalhes:GetInstance (id+1)
|
||||
if (right_instance) then
|
||||
for index, instance_id in _pairs (right_instance.snap) do
|
||||
if (index == id) then --snap na proxima instancia
|
||||
right_instance.snap [index] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> copy skins from next instances
|
||||
for i = id+1, #_detalhes.tabela_instancias do
|
||||
local current_instance = _detalhes:GetInstance (i-1)
|
||||
local next_instance = _detalhes:GetInstance (i)
|
||||
|
||||
if (next_instance) then
|
||||
local exported = next_instance:ExportSkin()
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
--fixas os snaps nas janelas superiores
|
||||
for i = id+1, #_detalhes.tabela_instancias do
|
||||
local this_instance = _detalhes:GetInstance (i)
|
||||
|
||||
--down the id
|
||||
this_instance.meu_id = i-1
|
||||
|
||||
--fix the snaps
|
||||
for index, id in _pairs (this_instance.snap) do
|
||||
if (id == i+1) then --snap na proxima instancia
|
||||
this_instance.snap [index] = i
|
||||
elseif (id == i-1) then --snap na instancia anterior
|
||||
this_instance.snap [index] = i-2
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--remover do container tabela_instancias
|
||||
|
||||
-- fiz alterações das outras instancias, precisa salvar agora? // ele salva ao sair ou mudar o profile
|
||||
-- remover a instancia do container deste profile
|
||||
|
||||
--local profile = _detalhes:GetProfile (current_profile_name)
|
||||
--local saved_skins = profile.instances
|
||||
--tremove (saved_skins, id)
|
||||
|
||||
--tremove (_detalhes.tabela_instancias, id)
|
||||
|
||||
--> save the current profile
|
||||
_detalhes:SaveProfile()
|
||||
|
||||
end
|
||||
|
||||
|
||||
@@ -619,6 +542,18 @@ end
|
||||
end
|
||||
|
||||
local new_instance = _detalhes:NovaInstancia (next_id)
|
||||
|
||||
if (_detalhes.standard_skin) then
|
||||
for key, value in pairs (_detalhes.standard_skin) do
|
||||
if (type (value) == "table") then
|
||||
new_instance [key] = table_deepcopy (value)
|
||||
else
|
||||
new_instance [key] = value
|
||||
end
|
||||
end
|
||||
new_instance:ChangeSkin()
|
||||
end
|
||||
|
||||
return new_instance
|
||||
|
||||
elseif (id) then
|
||||
@@ -1795,6 +1730,13 @@ function _detalhes:AtualizaSegmentos_AfterCombat (instancia, historico)
|
||||
|
||||
end
|
||||
|
||||
function _detalhes:SetDisplay (segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode)
|
||||
if (not self.meu_id) then
|
||||
return
|
||||
end
|
||||
return self:TrocaTabela (segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode)
|
||||
end
|
||||
|
||||
function _detalhes:TrocaTabela (instancia, segmento, atributo, sub_atributo, iniciando_instancia, InstanceMode)
|
||||
|
||||
if (self and self.meu_id and not instancia) then --> self é uma instância
|
||||
@@ -2334,6 +2276,10 @@ function _detalhes:ChangeIcon (icon)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:SetMode (qual)
|
||||
return self:AlteraModo (qual)
|
||||
end
|
||||
|
||||
function _detalhes:AlteraModo (instancia, qual, from_mode_menu)
|
||||
|
||||
if (_type (instancia) == "number") then
|
||||
@@ -2797,7 +2743,7 @@ function _detalhes:envia_relatorio (linhas, custom)
|
||||
|
||||
local segmento = self.segmento
|
||||
local luta = nil
|
||||
|
||||
|
||||
if (not custom) then
|
||||
if (segmento == -1) then --overall
|
||||
luta = Loc ["STRING_REPORT_LAST"] .. " " .. #_detalhes.tabela_historico.tabelas .. " " .. Loc ["STRING_REPORT_FIGHTS"]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
local _detalhes = _G._detalhes
|
||||
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
|
||||
|
||||
function _detalhes:ResetInstanceConfig()
|
||||
function _detalhes:ResetInstanceConfig (maintainsnap)
|
||||
for key, value in pairs (_detalhes.instance_defaults) do
|
||||
if (type (value) == "table") then
|
||||
self [key] = table_deepcopy (value)
|
||||
@@ -10,10 +10,12 @@ function _detalhes:ResetInstanceConfig()
|
||||
self [key] = value
|
||||
end
|
||||
end
|
||||
self.snap = {}
|
||||
self.horizontalSnap = nil
|
||||
self.verticalSnap = nil
|
||||
self:LockInstance (false)
|
||||
if (not maintainsnap) then
|
||||
self.snap = {}
|
||||
self.horizontalSnap = nil
|
||||
self.verticalSnap = nil
|
||||
self:LockInstance (false)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:LoadInstanceConfig()
|
||||
|
||||
+13
-28
@@ -300,9 +300,14 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
if (evento [1] and type (evento [1]) == "boolean") then --> damage
|
||||
if (evento [3]) then
|
||||
local elapsed = _cstr ("%.1f", evento [4] - time_of_death) .."s"
|
||||
local spelllink = GetSpellLink (evento [2])
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local spellname, _, spellicon = _GetSpellInfo (evento [2])
|
||||
local spelllink
|
||||
if (evento [2] > 10) then
|
||||
spelllink = GetSpellLink (evento [2])
|
||||
else
|
||||
spelllink = spellname
|
||||
end
|
||||
local source = _detalhes:GetOnlyName (evento [6])
|
||||
local amount = evento [3]
|
||||
local hp = _math_floor (evento [5] / max_health * 100)
|
||||
if (hp > 100) then
|
||||
@@ -331,36 +336,16 @@ function atributo_misc:ReportSingleDeadLine (morte, instancia)
|
||||
end
|
||||
end
|
||||
|
||||
-- ELAPSED | HP | LINK | SOURCE
|
||||
local bigger_len = 0
|
||||
for index, table in _ipairs (report_array) do
|
||||
local spell = table [2] --[[
|
||||
_detalhes.fontstring_len:SetText (spell)
|
||||
local stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
while (stringlen < default_len) do
|
||||
spell = spell .. " "
|
||||
_detalhes.fontstring_len:SetText (spell)
|
||||
stringlen = _detalhes.fontstring_len:GetStringWidth()
|
||||
end
|
||||
table [2] = spell--]]
|
||||
reportar [#reportar+1] = table [1] .. table [4] .. spell .. table [3]
|
||||
for index = #report_array, 1, -1 do
|
||||
local table = report_array [index]
|
||||
reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
end
|
||||
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
--for index, table in _ipairs (report_array) do
|
||||
-- reportar [#reportar+1] = table [1] .. table [4] .. table [2] .. table [3]
|
||||
--end
|
||||
|
||||
--[[
|
||||
local barra = instancia.barras [morte.minha_barra]
|
||||
local reportar = {"Details! " .. Loc ["STRING_REPORT_SINGLE_DEATH"] .. " " .. morte [3] .. " " .. barra.texto_esquerdo:GetText()} --> localize-me
|
||||
for i = 1, GameCooltip:GetNumLines() do
|
||||
local texto_left, texto_right = GameCooltip:GetText (i)
|
||||
|
||||
if (texto_left and texto_right) then
|
||||
texto_left = texto_left:gsub (("|T(.*)|t "), "")
|
||||
reportar [#reportar+1] = ""..texto_left.." "..texto_right..""
|
||||
end
|
||||
end
|
||||
return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true})
|
||||
--]]
|
||||
end
|
||||
|
||||
function atributo_misc:ReportSingleCooldownLine (misc_actor, instancia)
|
||||
|
||||
@@ -141,6 +141,10 @@
|
||||
_detalhes.PluginCount.STATUSBAR = _detalhes.PluginCount.STATUSBAR + 1
|
||||
end
|
||||
|
||||
if (saved_table) then
|
||||
PluginObject.db = saved_table
|
||||
end
|
||||
|
||||
if (PluginObject.__enabled) then
|
||||
return true, saved_table, true
|
||||
else
|
||||
|
||||
+10
-2
@@ -165,8 +165,16 @@
|
||||
return
|
||||
end
|
||||
|
||||
--> jump to the next
|
||||
if (_switchTo == -1) then
|
||||
--> if passed the absolute plugin name
|
||||
if (type (_switchTo) == "string") then
|
||||
for index, ptable in ipairs (_detalhes.SoloTables.Menu) do
|
||||
if (ptable [3].__enabled and ptable [4] == _switchTo) then
|
||||
_switchTo = index
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
elseif (_switchTo == -1) then
|
||||
_switchTo = _detalhes.SoloTables.Mode + 1
|
||||
if (_switchTo > #_detalhes.SoloTables.Plugins) then
|
||||
_switchTo = 1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
for nome, jogador in _ipairs (tabela) do
|
||||
if (jogador) then
|
||||
|
||||
local ultima_acao = jogador.last_event+3
|
||||
local ultima_acao = jogador.last_event+10
|
||||
|
||||
if (ultima_acao > _tempo) then --> okey o jogador esta dando dps
|
||||
if (jogador.on_hold) then --> o dps estava pausado, retornar a ativa
|
||||
|
||||
+127
-22
@@ -309,7 +309,10 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
-- textcolor
|
||||
function ButtonMetaFunctions:SetTextColor (color)
|
||||
function ButtonMetaFunctions:SetTextColor (color, arg2, arg3, arg4)
|
||||
if (arg2) then
|
||||
return self.button.text:SetTextColor (color, arg2, arg3, arg4 or 1)
|
||||
end
|
||||
local _value1, _value2, _value3, _value4 = gump:ParseColors (color)
|
||||
return self.button.text:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
@@ -397,7 +400,12 @@ local ButtonMetaFunctions = {}
|
||||
self.icon:SetTexCoord (0, 1, 0, 1)
|
||||
end
|
||||
if (overlay) then
|
||||
self.icon:SetVertexColor (unpack (overlay))
|
||||
if (type (overlay) == "string") then
|
||||
local r, g, b, a = gump:ParseColors (overlay)
|
||||
self.icon:SetVertexColor (r, g, b, a)
|
||||
else
|
||||
self.icon:SetVertexColor (unpack (overlay))
|
||||
end
|
||||
else
|
||||
self.icon:SetVertexColor (1, 1, 1, 1)
|
||||
end
|
||||
@@ -471,31 +479,67 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
--> custom textures
|
||||
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords)
|
||||
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords, use_split)
|
||||
|
||||
self.button:SetNormalTexture (nil)
|
||||
self.button:SetPushedTexture (nil)
|
||||
self.button:SetDisabledTexture (nil)
|
||||
self.button:SetHighlightTexture (nil)
|
||||
|
||||
local button = self.button
|
||||
|
||||
texture = texture or "Interface\\AddOns\\Details\\images\\default_button"
|
||||
self.button.texture = self.button:CreateTexture (nil, "artwork")
|
||||
if (use_split) then
|
||||
|
||||
--> 4 corners
|
||||
button.textureTopLeft = button:CreateTexture (nil, "artwork"); button.textureTopLeft:SetSize (8, 8); button.textureTopLeft:SetPoint ("topleft", button)
|
||||
button.textureTopRight = button:CreateTexture (nil, "artwork"); button.textureTopRight:SetSize (8, 8); button.textureTopRight:SetPoint ("topright", button)
|
||||
button.textureBottomLeft = button:CreateTexture (nil, "artwork"); button.textureBottomLeft:SetSize (8, 8); button.textureBottomLeft:SetPoint ("bottomleft", button)
|
||||
button.textureBottomRight = button:CreateTexture (nil, "artwork"); button.textureBottomRight:SetSize (8, 8); button.textureBottomRight:SetPoint ("bottomright", button)
|
||||
|
||||
button.textureLeft = button:CreateTexture (nil, "artwork"); button.textureLeft:SetWidth (4); button.textureLeft:SetPoint ("topleft", button.textureTopLeft, "bottomleft"); button.textureLeft:SetPoint ("bottomleft", button.textureBottomLeft, "topleft")
|
||||
button.textureRight = button:CreateTexture (nil, "artwork"); button.textureRight:SetWidth (4); button.textureRight:SetPoint ("topright", button.textureTopRight, "bottomright"); button.textureRight:SetPoint ("bottomright", button.textureBottomRight, "topright")
|
||||
button.textureTop = button:CreateTexture (nil, "artwork"); button.textureTop:SetHeight (4); button.textureTop:SetPoint ("topleft", button.textureTopLeft, "topright"); button.textureTop:SetPoint ("topright", button.textureTopRight, "topleft");
|
||||
button.textureBottom = button:CreateTexture (nil, "artwork"); button.textureBottom:SetHeight (4); button.textureBottom:SetPoint ("bottomleft", button.textureBottomLeft, "bottomright"); button.textureBottom:SetPoint ("bottomright", button.textureBottomRight, "bottomleft");
|
||||
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 9/128, 24/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 9/128, 24/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 0, 4/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 28/128, 32/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 0, 8/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 0, 8/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 24/128, 32/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 24/128, 32/128)
|
||||
|
||||
button.textureTopLeft:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureTopRight:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureBottomLeft:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureBottomRight:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureLeft:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureRight:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureTop:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
button.textureBottom:SetTexture ([[Interface\AddOns\Details\images\default_button]])
|
||||
|
||||
if (not rect) then
|
||||
self.button.texture:SetAllPoints (self.button)
|
||||
else
|
||||
self.button.texture:SetPoint ("topleft", self.button, "topleft", rect.x1, rect.y1)
|
||||
self.button.texture:SetPoint ("bottomright", self.button, "bottomright", rect.x2, rect.y2)
|
||||
texture = texture or "Interface\\AddOns\\Details\\images\\default_button"
|
||||
self.button.texture = self.button:CreateTexture (nil, "artwork")
|
||||
|
||||
if (not rect) then
|
||||
self.button.texture:SetAllPoints (self.button)
|
||||
else
|
||||
self.button.texture:SetPoint ("topleft", self.button, "topleft", rect.x1, rect.y1)
|
||||
self.button.texture:SetPoint ("bottomright", self.button, "bottomright", rect.x2, rect.y2)
|
||||
end
|
||||
|
||||
if (coords) then
|
||||
self.button.texture.coords = coords
|
||||
self.button.texture:SetTexCoord (_unpack (coords.Normal))
|
||||
else
|
||||
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
|
||||
end
|
||||
|
||||
self.button.texture:SetTexture (texture)
|
||||
end
|
||||
|
||||
if (coords) then
|
||||
self.button.texture.coords = coords
|
||||
self.button.texture:SetTexCoord (_unpack (coords.Normal))
|
||||
else
|
||||
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
|
||||
end
|
||||
|
||||
self.button.texture:SetTexture (texture)
|
||||
end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------
|
||||
@@ -503,6 +547,18 @@ local ButtonMetaFunctions = {}
|
||||
|
||||
local OnEnter = function (button)
|
||||
|
||||
if (button.textureTopLeft) then
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 40/128, 56/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 40/128, 56/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 33/128, 37/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 60/128, 64/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 33/128, 40/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 33/128, 40/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 56/128, 64/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 56/128, 64/128)
|
||||
end
|
||||
|
||||
if (button.MyObject.OnEnterHook) then
|
||||
local interrupt = button.MyObject.OnEnterHook (button)
|
||||
if (interrupt) then
|
||||
@@ -511,7 +567,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
button.MyObject.is_mouse_over = true
|
||||
|
||||
|
||||
if (button.texture) then
|
||||
if (button.texture.coords) then
|
||||
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
|
||||
@@ -535,6 +591,19 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
local OnLeave = function (button)
|
||||
|
||||
if (button.textureLeft and not button.MyObject.is_mouse_down) then
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 9/128, 24/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 9/128, 24/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 0, 4/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 28/128, 32/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 0, 8/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 0, 8/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 24/128, 32/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 24/128, 32/128)
|
||||
end
|
||||
|
||||
if (button.MyObject.OnLeaveHook) then
|
||||
local interrupt = button.MyObject.OnLeaveHook (button)
|
||||
if (interrupt) then
|
||||
@@ -551,7 +620,7 @@ local ButtonMetaFunctions = {}
|
||||
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (button.MyObject.have_tooltip) then
|
||||
if (GameCooltip:GetText (1) == button.MyObject.have_tooltip) then
|
||||
GameCooltip:Hide()
|
||||
@@ -589,6 +658,18 @@ local ButtonMetaFunctions = {}
|
||||
return
|
||||
end
|
||||
|
||||
if (button.textureTopLeft) then
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 72/128, 88/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 72/128, 88/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 65/128, 68/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 92/128, 96/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 65/128, 71/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 65/128, 71/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 88/128, 96/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 88/128, 96/128)
|
||||
end
|
||||
|
||||
if (button.MyObject.OnMouseDownHook) then
|
||||
local interrupt = button.MyObject.OnMouseDownHook (button, buttontype)
|
||||
if (interrupt) then
|
||||
@@ -652,6 +733,30 @@ local ButtonMetaFunctions = {}
|
||||
return
|
||||
end
|
||||
|
||||
if (button.textureLeft) then
|
||||
if (button.MyObject.is_mouse_over) then
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 40/128, 56/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 40/128, 56/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 33/128, 37/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 60/128, 64/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 33/128, 40/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 33/128, 40/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 56/128, 64/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 56/128, 64/128)
|
||||
else
|
||||
button.textureLeft:SetTexCoord (0, 4/128, 9/128, 24/128)
|
||||
button.textureRight:SetTexCoord (124/128, 1, 9/128, 24/128)
|
||||
button.textureTop:SetTexCoord (9/128, 120/128, 0, 4/128)
|
||||
button.textureBottom:SetTexCoord (9/128, 119/128, 28/128, 32/128)
|
||||
|
||||
button.textureTopLeft:SetTexCoord (0, 8/128, 0, 8/128)
|
||||
button.textureTopRight:SetTexCoord (121/128, 1, 0, 8/128)
|
||||
button.textureBottomLeft:SetTexCoord (0, 8/128, 24/128, 32/128)
|
||||
button.textureBottomRight:SetTexCoord (120/128, 1, 24/128, 32/128)
|
||||
end
|
||||
end
|
||||
|
||||
if (button.MyObject.OnMouseUpHook) then
|
||||
local interrupt = button.MyObject.OnMouseUpHook (button, buttontype)
|
||||
if (interrupt) then
|
||||
@@ -660,7 +765,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
|
||||
button.MyObject.is_mouse_down = false
|
||||
|
||||
|
||||
if (button.texture) then
|
||||
if (button.texture.coords) then
|
||||
if (button.MyObject.is_mouse_over) then
|
||||
@@ -676,7 +781,7 @@ local ButtonMetaFunctions = {}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if (button.MyObject.capsule_textalign) then
|
||||
if (button.MyObject.icon) then
|
||||
button.MyObject.icon:SetPoint ("left", button, "left", 4, 0)
|
||||
|
||||
@@ -180,6 +180,26 @@ function gump:BuildMenu (parent, menu, x_offset, y_offset, height)
|
||||
slider:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 60 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
end
|
||||
|
||||
elseif (widget_table.type == "color" or widget_table.type == "color") then
|
||||
local colorpick = self:NewColorPickButton (parent, "$parentWidget" .. index, nil, widget_table.set)
|
||||
colorpick.tooltip = widget_table.desc
|
||||
|
||||
local default_value, g, b, a = widget_table.get()
|
||||
if (type (default_value) == "table") then
|
||||
colorpick:SetColor (unpack (default_value))
|
||||
else
|
||||
colorpick:SetColor (default_value, g, b, a)
|
||||
end
|
||||
|
||||
local label = self:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name, "GameFontNormal", 12)
|
||||
colorpick:SetPoint ("left", label, "right", 2)
|
||||
label:SetPoint (cur_x, cur_y)
|
||||
|
||||
local size = label.widget:GetStringWidth() + 60 + 4
|
||||
if (size > max_x) then
|
||||
max_x = size
|
||||
@@ -194,4 +214,69 @@ function gump:BuildMenu (parent, menu, x_offset, y_offset, height)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function gump:ShowTutorialAlertFrame (maintext, desctext, clickfunc)
|
||||
|
||||
local TutorialAlertFrame = _G.DetailsTutorialAlertFrame
|
||||
|
||||
if (not TutorialAlertFrame) then
|
||||
|
||||
TutorialAlertFrame = CreateFrame ("ScrollFrame", "DetailsTutorialAlertFrame", UIParent, "WatchFrameAutoQuestPopUpTemplate")
|
||||
TutorialAlertFrame.isFirst = true
|
||||
TutorialAlertFrame:SetPoint ("left", UIParent, "left", -20, 100)
|
||||
|
||||
TutorialAlertFrame:SetWidth (290)
|
||||
TutorialAlertFrame.ScrollChild:SetWidth (256)
|
||||
|
||||
local scrollname = TutorialAlertFrame.ScrollChild:GetName()
|
||||
_G [scrollname .. "BorderTopLeft"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderTopRight"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderBotLeft"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderBotRight"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderLeft"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderRight"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderBottom"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "BorderTop"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
|
||||
local iconbg = _G [scrollname .. "QuestIconBg"]
|
||||
iconbg:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
|
||||
iconbg:SetTexCoord (0, 1, 0, 1)
|
||||
iconbg:SetSize (100, 100)
|
||||
iconbg:ClearAllPoints()
|
||||
iconbg:SetPoint ("bottomleft", TutorialAlertFrame.ScrollChild, "bottomleft")
|
||||
|
||||
_G [scrollname .. "Exclamation"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
_G [scrollname .. "QuestionMark"]:SetVertexColor (1, 0.8, 0, 1)
|
||||
|
||||
_G [scrollname .. "TopText"]:SetText ("Details!") --string
|
||||
_G [scrollname .. "QuestName"]:SetText ("") --string
|
||||
_G [scrollname .. "BottomText"]:SetText ("") --string
|
||||
|
||||
TutorialAlertFrame.ScrollChild.IconShine:SetTexture ([[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]])
|
||||
|
||||
TutorialAlertFrame:SetScript ("OnMouseUp", function (self)
|
||||
if (self.clickfunc and type (self.clickfunc) == "function") then
|
||||
self.clickfunc()
|
||||
end
|
||||
self:Hide()
|
||||
end)
|
||||
TutorialAlertFrame:Hide()
|
||||
end
|
||||
|
||||
if (type (maintext) == "string") then
|
||||
TutorialAlertFrame.ScrollChild.QuestName:SetText (maintext)
|
||||
else
|
||||
TutorialAlertFrame.ScrollChild.QuestName:SetText ("")
|
||||
end
|
||||
|
||||
if (type (desctext) == "string") then
|
||||
TutorialAlertFrame.ScrollChild.BottomText:SetText (desctext)
|
||||
else
|
||||
TutorialAlertFrame.ScrollChild.BottomText:SetText ("")
|
||||
end
|
||||
|
||||
TutorialAlertFrame.clickfunc = clickfunc
|
||||
TutorialAlertFrame:Show()
|
||||
WatchFrame_SlideInFrame (TutorialAlertFrame, "AUTOQUEST")
|
||||
end
|
||||
@@ -195,6 +195,15 @@ local LabelMetaFunctions = {}
|
||||
function LabelMetaFunctions:Hide()
|
||||
return self.label:Hide()
|
||||
end
|
||||
|
||||
-- textcolor
|
||||
function LabelMetaFunctions:SetTextColor (color, arg2, arg3, arg4)
|
||||
if (arg2) then
|
||||
return self.label:SetTextColor (color, arg2, arg3, arg4 or 1)
|
||||
end
|
||||
local _value1, _value2, _value3, _value4 = gump:ParseColors (color)
|
||||
return self.label:SetTextColor (_value1, _value2, _value3, _value4)
|
||||
end
|
||||
|
||||
-- setpoint
|
||||
function LabelMetaFunctions:SetPoint (v1, v2, v3, v4, v5)
|
||||
|
||||
+47
-9
@@ -147,14 +147,42 @@ function _detalhes:ResetProfile (profile_name)
|
||||
return false
|
||||
end
|
||||
|
||||
--> reset
|
||||
--> reset all already created instances
|
||||
for index, instance in _detalhes:ListInstances() do
|
||||
if (not instance.baseframe) then
|
||||
instance:AtivarInstancia()
|
||||
end
|
||||
instance.skin = ""
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
end
|
||||
|
||||
for index, instance in pairs (_detalhes.unused_instances) do
|
||||
if (not instance.baseframe) then
|
||||
instance:AtivarInstancia()
|
||||
end
|
||||
instance.skin = ""
|
||||
instance:ChangeSkin ("Minimalistic")
|
||||
end
|
||||
|
||||
profile.instances = {}
|
||||
local profile = table_deepcopy (_detalhes.default_profile)
|
||||
profile.instances = instances
|
||||
--> reset the profile
|
||||
table.wipe (profile.instances)
|
||||
|
||||
--> export first instance
|
||||
local instance = _detalhes:GetInstance (1)
|
||||
local exported = instance:ExportSkin()
|
||||
exported.__was_opened = instance:IsEnabled()
|
||||
exported.__pos = table_deepcopy (instance:GetPosition())
|
||||
exported.__locked = instance.isLocked
|
||||
exported.__snap = {}
|
||||
exported.__snapH = false
|
||||
exported.__snapV = false
|
||||
profile.instances [1] = exported
|
||||
instance.horizontalSnap = false
|
||||
instance.verticalSnap = false
|
||||
instance.snap = {}
|
||||
|
||||
_detalhes:ApplyProfile (profile_name, true)
|
||||
|
||||
|
||||
--> end
|
||||
return true
|
||||
end
|
||||
@@ -302,7 +330,6 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
|
||||
--> load data saved for this character only
|
||||
instance:LoadLocalInstanceConfig()
|
||||
|
||||
if (skin.__was_opened) then
|
||||
instance:AtivarInstancia()
|
||||
else
|
||||
@@ -311,7 +338,6 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
|
||||
--> load data saved again
|
||||
instance:LoadLocalInstanceConfig()
|
||||
|
||||
--> check window positioning
|
||||
if (_detalhes.profile_save_pos) then
|
||||
if (skin.__pos) then
|
||||
@@ -335,7 +361,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
instance.posicao.normal = {x = 1, y = 1, w = 300, h = 200}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--> open the instance
|
||||
if (instance:IsEnabled()) then
|
||||
if (not instance.baseframe) then
|
||||
@@ -351,6 +377,7 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy)
|
||||
end
|
||||
|
||||
instances_loaded = instances_loaded + 1
|
||||
|
||||
end
|
||||
|
||||
--> move unused instances for unused container
|
||||
@@ -675,6 +702,7 @@ local default_profile = {
|
||||
max_window_size = {width = 480, height = 450},
|
||||
new_window_size = {width = 300, height = 95},
|
||||
window_clamp = {-8, 0, 21, -14},
|
||||
disable_window_groups = false,
|
||||
|
||||
--> segments
|
||||
segments_amount = 12,
|
||||
@@ -833,7 +861,17 @@ local default_global_data = {
|
||||
|
||||
_detalhes.default_global_data = default_global_data
|
||||
|
||||
|
||||
function _detalhes:GetTutorialCVar (key, default)
|
||||
local value = _detalhes.tutorial [key]
|
||||
if (value == nil and default) then
|
||||
_detalhes.tutorial [key] = default
|
||||
value = default
|
||||
end
|
||||
return value
|
||||
end
|
||||
function _detalhes:SetTutorialCVar (key, value)
|
||||
_detalhes.tutorial [key] = value
|
||||
end
|
||||
|
||||
function _detalhes:SaveProfileSpecial()
|
||||
|
||||
|
||||
@@ -32,7 +32,8 @@ function _detalhes:SaveLocalInstanceConfig()
|
||||
horizontalSnap = instance.horizontalSnap,
|
||||
verticalSnap = instance.verticalSnap,
|
||||
sub_atributo_last = instance.sub_atributo_last,
|
||||
isLocked = instance.isLocked
|
||||
isLocked = instance.isLocked,
|
||||
last_raid_plugin = instance.last_raid_plugin
|
||||
}
|
||||
|
||||
if (_detalhes.local_instances_config [index].isLocked == nil) then
|
||||
|
||||
+11
-2
@@ -3104,10 +3104,19 @@ function _detalhes.janela_info:monta_relatorio (botao)
|
||||
local report_lines
|
||||
|
||||
if (botao == 1) then --> botão da esquerda
|
||||
report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_REPORTTO"] .. " " .. _detalhes.sub_atributos [atributo].lista [sub_atributo] .. " " .. Loc ["STRING_ACTORFRAME_REPORTOF"] .. " " .. player.nome}
|
||||
report_lines = {"Details! " .. Loc ["STRING_ACTORFRAME_SPELLSOF"] .. " " .. player.nome .. " (" .. _detalhes.sub_atributos [atributo].lista [sub_atributo] .. ")"}
|
||||
for index, barra in _ipairs (info.barras1) do
|
||||
if (barra:IsShown()) then
|
||||
report_lines [#report_lines+1] = barra.texto_esquerdo:GetText().." -> ".. _detalhes:comma_value (barra.texto_direita:GetText())
|
||||
local spellid = barra.show
|
||||
if (spellid > 10) then
|
||||
local link = GetSpellLink (spellid)
|
||||
report_lines [#report_lines+1] = index .. ". " .. link .. ": " .. barra.texto_direita:GetText()
|
||||
else
|
||||
local spellname = barra.texto_esquerdo:GetText():gsub ((".*%."), "")
|
||||
spellname = spellname:gsub ("|c%x%x%x%x%x%x%x%x", "")
|
||||
spellname = spellname:gsub ("|r", "")
|
||||
report_lines [#report_lines+1] = index .. ". " .. spellname .. ": " .. barra.texto_direita:GetText()
|
||||
end
|
||||
end
|
||||
if (index == amt) then
|
||||
break
|
||||
|
||||
+248
-89
@@ -39,6 +39,11 @@ local slider_backdrop = {edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", e
|
||||
bgFile = [[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]], tile = true, tileSize = 130, insets = {left = 1, right = 1, top = 5, bottom = 5}}
|
||||
local slider_backdrop_color = {1, 1, 1, 1}
|
||||
|
||||
local button_color_rgb = {1, 0.93, 0.74}
|
||||
|
||||
local font_select_icon, font_select_texcoord = [[Interface\AddOns\Details\images\icons]], {472/512, 513/512, 186/512, 230/512}
|
||||
local texture_select_icon, texture_select_texcoord = [[Interface\AddOns\Details\images\icons]], {472/512, 513/512, 186/512, 230/512}
|
||||
|
||||
local dropdown_backdrop = {edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", edgeSize = 10,
|
||||
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background", tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1}}
|
||||
local dropdown_backdrop_onenter = {0, 0, 0, 1}
|
||||
@@ -1045,10 +1050,13 @@ function window:CreateFrame20()
|
||||
_detalhes.tooltip.fontface = fontName
|
||||
end
|
||||
|
||||
--local icon, texcoord = [[Interface\AddOns\Details\images\icons]], {479/512, 506/512, 186/512, 221/512}
|
||||
|
||||
local build_tooltip_menu = function()
|
||||
local fonts = {}
|
||||
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
|
||||
fonts [#fonts+1] = {value = name, label = name, onclick = on_select_tooltip_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
|
||||
fonts [#fonts+1] = {value = name, icon = font_select_icon, texcoord = font_select_texcoord, label = name, onclick = on_select_tooltip_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
end
|
||||
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
|
||||
return fonts
|
||||
@@ -1177,9 +1185,12 @@ function window:CreateFrame20()
|
||||
local unlock_function = function()
|
||||
DetailsTooltipAnchor:MoveAnchor()
|
||||
end
|
||||
local unlock_anchor_button = g:NewButton (frame20, nil, "$parentUnlockAnchorButton", "UnlockAnchorButton", 160, 20, unlock_function, nil, nil, nil, Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE"])
|
||||
local unlock_anchor_button = g:NewButton (frame20, nil, "$parentUnlockAnchorButton", "UnlockAnchorButton", 160, 20, unlock_function, nil, nil, nil, Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE"], 1)
|
||||
unlock_anchor_button:InstallCustomTexture()
|
||||
|
||||
frame20.UnlockAnchorButton:SetTextColor (button_color_rgb)
|
||||
|
||||
frame20.UnlockAnchorButton:SetIcon ([[Interface\COMMON\UI-ModelControlPanel]], nil, nil, nil, {20/64, 34/64, 38/128, 52/128}, nil, 4)
|
||||
|
||||
if (_detalhes.tooltip.anchored_to == 1) then
|
||||
unlock_anchor_button:Disable()
|
||||
else
|
||||
@@ -1187,7 +1198,7 @@ function window:CreateFrame20()
|
||||
end
|
||||
|
||||
frame20.UnlockAnchorButton:SetPoint ("left", frame20.UnlockAnchorButtonLabel, "right", 0, 0)
|
||||
window:CreateLineBackground2 (frame20, "UnlockAnchorButton", "UnlockAnchorButtonLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE_DESC"])
|
||||
window:CreateLineBackground2 (frame20, "UnlockAnchorButton", "UnlockAnchorButton", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO_CHOOSE_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
--main anchor
|
||||
g:NewLabel (frame20, _, "$parentTooltipAnchorLabel", "TooltipAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_TO"], "GameFontHighlightLeft")
|
||||
@@ -1817,12 +1828,12 @@ function window:CreateFrame18()
|
||||
instance:InstanceReset()
|
||||
end
|
||||
local totalbar_pickicon = function()
|
||||
g:IconPick (totalbar_pickicon_callback)
|
||||
g:IconPick (totalbar_pickicon_callback, true)
|
||||
end
|
||||
g:NewLabel (frame18, _, "$parentTotalBarIconLabel", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON"], "GameFontHighlightLeft")
|
||||
g:NewImage (frame18, nil, 20, 20, nil, nil, "totalBarIconTexture", "$parentTotalBarIconTexture")
|
||||
g:NewButton (frame18, _, "$parentTotalBarIconButton", "totalBarIconButton", 20, 20, totalbar_pickicon)
|
||||
frame18.totalBarIconButton:InstallCustomTexture()
|
||||
frame18.totalBarIconButton:InstallCustomTexture (nil, nil, nil, true)
|
||||
frame18.totalBarIconButton:SetPoint ("left", frame18.totalBarIconLabel, "right", 2, 0)
|
||||
frame18.totalBarIconTexture:SetPoint ("left", frame18.totalBarIconLabel, "right", 2, 0)
|
||||
|
||||
@@ -1925,6 +1936,17 @@ function window:CreateFrame18()
|
||||
end)
|
||||
|
||||
window:CreateLineBackground2 (frame18, "MenuTextSizeSlider", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE_DESC"])
|
||||
|
||||
--> disable groups
|
||||
g:NewLabel (frame18, _, "$parentDisableGroupsLabel", "DisableGroupsLabel", Loc ["STRING_OPTIONS_DISABLE_GROUPS"], "GameFontHighlightLeft")
|
||||
g:NewSwitch (frame18, _, "$parentDisableGroupsSlider", "DisableGroupsSlider", 60, 20, _, _, _detalhes.disable_window_groups)
|
||||
|
||||
frame18.DisableGroupsSlider:SetPoint ("left", frame18.DisableGroupsLabel, "right", 2)
|
||||
frame18.DisableGroupsSlider.OnSwitch = function (_, _, value)
|
||||
_detalhes.disable_window_groups = value
|
||||
end
|
||||
|
||||
window:CreateLineBackground2 (frame18, "DisableGroupsSlider", "DisableGroupsLabel", Loc ["STRING_OPTIONS_DISABLE_GROUPS_DESC"])
|
||||
|
||||
--> Report
|
||||
g:NewLabel (frame18, _, "$parentReportHelpfulLinkLabel", "ReportHelpfulLinkLabel", Loc ["STRING_OPTIONS_REPORT_HEALLINKS"], "GameFontHighlightLeft")
|
||||
@@ -1973,14 +1995,13 @@ function window:CreateFrame18()
|
||||
local right_side = {
|
||||
{"instancesMiscLabel", 1, true},
|
||||
{"deleteInstanceLabel", 2},
|
||||
|
||||
{"totalBarAnchorLabel", 4, true},
|
||||
{"totalBarIconLabel", 5},
|
||||
{"totalBarPickColorLabel", 6},
|
||||
{"totalBarLabel", 7},
|
||||
{"totalBarOnlyInGroupLabel", 8},
|
||||
|
||||
{"MenuTextSizeLabel", 3}
|
||||
{"MenuTextSizeLabel", 3},
|
||||
{"DisableGroupsLabel", 4},
|
||||
{"totalBarAnchorLabel", 5, true},
|
||||
{"totalBarIconLabel", 6},
|
||||
{"totalBarPickColorLabel", 7},
|
||||
{"totalBarLabel", 8},
|
||||
{"totalBarOnlyInGroupLabel", 9},
|
||||
}
|
||||
|
||||
window:arrange_menu (frame18, right_side, window.right_start_at, -90)
|
||||
@@ -2410,6 +2431,8 @@ function window:CreateFrame16()
|
||||
addbutton:InstallCustomTexture()
|
||||
addbutton:SetPoint ("bottomright", panel, "topright", -30, 0)
|
||||
addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4)
|
||||
window:CreateLineBackground2 (frame16, "addbutton", "addbutton", nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
addbutton:SetTextColor (button_color_rgb)
|
||||
|
||||
local left = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0, 0.05078125})
|
||||
left:SetPoint ("bottomright", addbutton, "bottomleft", 34, 0)
|
||||
@@ -2500,6 +2523,8 @@ function window:CreateFrame16()
|
||||
importbutton:InstallCustomTexture()
|
||||
importbutton:SetPoint ("right", addbutton, "left", -4, 0)
|
||||
importbutton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4)
|
||||
window:CreateLineBackground2 (frame16, "importbutton", "importbutton", nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
importbutton:SetTextColor (button_color_rgb)
|
||||
|
||||
local left = g:NewImage (frame16, "Interface\\PaperDollInfoFrame\\PaperDollSidebarTabs", 64, 13, "artwork", {0, 1, 0, 0.05078125})
|
||||
left:SetPoint ("bottomright", importbutton, "bottomleft", 34, 0)
|
||||
@@ -2553,6 +2578,7 @@ function window:CreateFrame16()
|
||||
addframe:Hide();
|
||||
|
||||
end
|
||||
|
||||
local addcapturebutton = g:NewButton (addframe, nil, "$parentAddCaptureButton", "addCapturebutton", 100, 21, addcapture, nil, nil, nil, Loc ["STRING_OPTIONS_CHART_ADD2"])
|
||||
addcapturebutton:InstallCustomTexture()
|
||||
|
||||
@@ -2567,6 +2593,12 @@ function window:CreateFrame16()
|
||||
addcapturebutton:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 18, 18, nil, nil, nil, 4)
|
||||
closebutton:SetIcon ([[Interface\PetBattles\DeadPetIcon]], 14, 14, nil, nil, nil, 4)
|
||||
|
||||
window:CreateLineBackground2 (addframe.widget, closebutton, closebutton, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
closebutton:SetTextColor (button_color_rgb)
|
||||
|
||||
window:CreateLineBackground2 (addframe.widget, addcapturebutton, addcapturebutton, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
addcapturebutton:SetTextColor (button_color_rgb)
|
||||
|
||||
addcapturebutton:SetPoint ("bottomright", addframe, "bottomright", -5, 5)
|
||||
closebutton:SetPoint ("right", addcapturebutton, "left", -4, 0)
|
||||
|
||||
@@ -2731,6 +2763,8 @@ function window:CreateFrame15()
|
||||
--> close button
|
||||
local closebutton = g:NewButton (addframe, nil, "$parentAddCloseButton", "addClosebutton", 100, 21, function() addframe:Hide(); table.wipe (all_cached_spells) end, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_CLOSE"])
|
||||
closebutton:InstallCustomTexture()
|
||||
local bg = window:CreateLineBackground2 (addframe.widget, closebutton, closebutton, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
closebutton:SetTextColor (button_color_rgb)
|
||||
|
||||
--> confirm add spell
|
||||
local addspell = function()
|
||||
@@ -2765,6 +2799,9 @@ function window:CreateFrame15()
|
||||
end
|
||||
local addspellbutton = g:NewButton (addframe, nil, "$parentAddSpellButton", "addSpellbutton", 100, 21, addspell, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADD"])
|
||||
addspellbutton:InstallCustomTexture()
|
||||
local bg2 = window:CreateLineBackground2 (addframe.widget, addspellbutton, addspellbutton, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
addspellbutton:SetTextColor (button_color_rgb)
|
||||
bg:SetFrameLevel (bg2:GetFrameLevel()-1)
|
||||
|
||||
addspellbutton:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 18, 18, nil, nil, nil, 4)
|
||||
closebutton:SetIcon ([[Interface\PetBattles\DeadPetIcon]], 14, 14, nil, nil, nil, 4)
|
||||
@@ -2802,6 +2839,10 @@ function window:CreateFrame15()
|
||||
end
|
||||
local addbutton = g:NewButton (frame15, nil, "$parentAddButton", "addbutton", 100, 21, add, nil, nil, nil, Loc ["STRING_OPTIONS_SPELL_ADDSPELL"])
|
||||
addbutton:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (frame15, "addbutton", "addbutton", nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
addbutton:SetTextColor (button_color_rgb)
|
||||
|
||||
addbutton:SetPoint ("bottomright", panel, "topright", -30, 0)
|
||||
|
||||
addbutton:SetIcon ([[Interface\PaperDollInfoFrame\Character-Plus]], 12, 12, nil, nil, nil, 4)
|
||||
@@ -2876,11 +2917,11 @@ function window:CreateFrame14()
|
||||
local on_select_attribute_font = function (self, instance, fontName)
|
||||
instance:AttributeMenu (nil, nil, nil, fontName)
|
||||
end
|
||||
|
||||
|
||||
local build_font_menu = function()
|
||||
local fonts = {}
|
||||
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
|
||||
fonts [#fonts+1] = {value = name, label = name, onclick = on_select_attribute_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
fonts [#fonts+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = on_select_attribute_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
end
|
||||
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
|
||||
return fonts
|
||||
@@ -3027,15 +3068,55 @@ function window:CreateFrame1()
|
||||
_G.AvatarPickFrame:Show()
|
||||
end
|
||||
|
||||
g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 18, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"])
|
||||
frame1.chooseAvatarButton:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (frame1, "chooseAvatarButton", "chooseAvatarButton", Loc ["STRING_OPTIONS_AVATAR_DESC"])
|
||||
--g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 18, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"], 1)
|
||||
g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", 275, 85, openAtavarPickFrame, nil, nil, nil, "", 1) --
|
||||
frame1.chooseAvatarButton:InstallCustomTexture (nil, nil, nil, true)
|
||||
frame1.chooseAvatarButton:SetTextColor (button_color_rgb)
|
||||
--frame1.chooseAvatarButton:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125})
|
||||
|
||||
g:NewLabel (frame1, _, "$parentChooseAvatarLabel", "ChooseAvatarLabel", Loc ["STRING_OPTIONS_AVATAR"], "GameFontHighlightLeft")
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -10, -10)
|
||||
frame1.ChooseAvatarLabel:SetTextColor (button_color_rgb)
|
||||
|
||||
--> avatar preview
|
||||
g:NewImage (frame1, nil, 128, 64, nil, nil, "avatarPreview", "$parentAvatarPreviewTexture")
|
||||
g:NewImage (frame1, nil, 275, 60, nil, nil, "avatarPreview2", "$parentAvatarPreviewTexture2")
|
||||
g:NewLabel (frame1, _, "$parentAvatarNicknameLabel", "avatarNickname", UnitName ("player"), "GameFontHighlightSmall")
|
||||
g:NewLabel (frame1, _, "$parentAvatarNicknameLabel", "avatarNickname", UnitName ("player"), "GameFontHighlightSmall")
|
||||
|
||||
--> avatar button
|
||||
frame1.chooseAvatarButton:SetHook ("OnEnter", function()
|
||||
frame1.ChooseAvatarLabel:SetTextColor (1, 1, 1)
|
||||
|
||||
_detalhes:CooltipPreset (2)
|
||||
GameCooltip:AddLine (Loc ["STRING_OPTIONS_AVATAR_DESC"])
|
||||
GameCooltip:ShowCooltip (frame1.chooseAvatarButton.widget, "tooltip")
|
||||
--frame1.avatarPreview:SetBlendMode ("ADD")
|
||||
frame1.avatarPreview2:SetBlendMode ("ADD")
|
||||
return true
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnLeave", function()
|
||||
frame1.ChooseAvatarLabel:SetTextColor (button_color_rgb)
|
||||
GameCooltip:Hide()
|
||||
--frame1.avatarPreview:SetBlendMode ("BLEND")
|
||||
frame1.avatarPreview2:SetBlendMode ("BLEND")
|
||||
return true
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnMouseDown", function()
|
||||
local avatar_x_anchor = window.right_start_at
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+2, -158)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+2, -160)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+110, -192)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -9, -11)
|
||||
end)
|
||||
frame1.chooseAvatarButton:SetHook ("OnMouseUp", function()
|
||||
local avatar_x_anchor = window.right_start_at
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+109, -191)
|
||||
frame1.ChooseAvatarLabel:SetPoint ("topright", frame1.chooseAvatarButton, "topright", -10, -10)
|
||||
end)
|
||||
|
||||
--window:CreateLineBackground2 (frame1, "chooseAvatarButton", "chooseAvatarButton", Loc ["STRING_OPTIONS_AVATAR_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
_detalhes:SetFontSize (frame1.avatarNickname.widget, 18)
|
||||
|
||||
@@ -3222,34 +3303,34 @@ function window:CreateFrame1()
|
||||
--lock unlock
|
||||
g:NewButton (frame1, _, "$parentLockButton", "LockButton", buttons_width, 18, _detalhes.lock_instance_function, nil, nil, nil, Loc ["STRING_OPTIONS_WC_LOCK"], 1)
|
||||
frame1.LockButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "LockButton", "LockButton", Loc ["STRING_OPTIONS_WC_LOCK_DESC"], nil, {1, 0.8, 0}, {1, 1, 1})
|
||||
window:CreateLineBackground2 (frame1, "LockButton", "LockButton", Loc ["STRING_OPTIONS_WC_LOCK_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.LockButton:SetIcon ([[Interface\PetBattles\PetBattle-LockIcon]], nil, nil, nil, {0.0703125, 0.9453125, 0.0546875, 0.9453125})
|
||||
frame1.LockButton:SetTextColor (1, 1, 1, 1)
|
||||
frame1.LockButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--break snap
|
||||
g:NewButton (frame1, _, "$parentBreakSnapButton", "BreakSnapButton", buttons_width, 18, _G.DetailsOptionsWindow.instance.Desagrupar, -1, nil, nil, Loc ["STRING_OPTIONS_WC_UNSNAP"], 1)
|
||||
frame1.BreakSnapButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "BreakSnapButton", "BreakSnapButton", Loc ["STRING_OPTIONS_WC_UNSNAP_DESC"], nil, {1, 0.8, 0}, {1, 1, 1})
|
||||
window:CreateLineBackground2 (frame1, "BreakSnapButton", "BreakSnapButton", Loc ["STRING_OPTIONS_WC_UNSNAP_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.BreakSnapButton:SetIcon ([[Interface\AddOns\Details\images\icons]], nil, nil, nil, {160/512, 179/512, 142/512, 162/512})
|
||||
frame1.BreakSnapButton:SetTextColor (1, 1, 1, 1)
|
||||
frame1.BreakSnapButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--close
|
||||
g:NewButton (frame1, _, "$parentCloseButton", "CloseButton", buttons_width, 18, _detalhes.close_instancia_func, _G.DetailsOptionsWindow.instance, nil, nil, Loc ["STRING_OPTIONS_WC_CLOSE"], 1)
|
||||
frame1.CloseButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "CloseButton", "CloseButton", Loc ["STRING_OPTIONS_WC_CLOSE_DESC"], nil, {1, 0.8, 0}, {1, 1, 1})
|
||||
window:CreateLineBackground2 (frame1, "CloseButton", "CloseButton", Loc ["STRING_OPTIONS_WC_CLOSE_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.CloseButton:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125})
|
||||
frame1.CloseButton:SetTextColor (1, 1, 1, 1)
|
||||
frame1.CloseButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--create
|
||||
g:NewButton (frame1, _, "$parentCreateWindowButton", "CreateWindowButton", buttons_width, 18, function() _detalhes.CriarInstancia (nil, nil, true) end, nil, nil, nil, Loc ["STRING_OPTIONS_WC_CREATE"], 1)
|
||||
frame1.CreateWindowButton:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame1, "CreateWindowButton", "CreateWindowButton", Loc ["STRING_OPTIONS_WC_CREATE_DESC"], nil, {1, 0.8, 0}, {1, 1, 1})
|
||||
window:CreateLineBackground2 (frame1, "CreateWindowButton", "CreateWindowButton", Loc ["STRING_OPTIONS_WC_CREATE_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame1.CreateWindowButton:SetIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]])
|
||||
frame1.CreateWindowButton:SetTextColor (1, 1, 1, 1)
|
||||
frame1.CreateWindowButton:SetTextColor (button_color_rgb)
|
||||
|
||||
--> anchors
|
||||
|
||||
@@ -3270,9 +3351,9 @@ function window:CreateFrame1()
|
||||
frame1.nicknameLabel:SetPoint (avatar_x_anchor, -115)
|
||||
frame1.chooseAvatarButton:SetPoint (avatar_x_anchor+1, -140)
|
||||
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor-8, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor-8, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+100, -191)
|
||||
frame1.avatarPreview:SetPoint (avatar_x_anchor+1, -157)
|
||||
frame1.avatarPreview2:SetPoint (avatar_x_anchor+1, -159)
|
||||
frame1.avatarNickname:SetPoint (avatar_x_anchor+109, -191)
|
||||
|
||||
frame1.realmNameLabel:SetPoint (avatar_x_anchor, -235)
|
||||
|
||||
@@ -3781,21 +3862,25 @@ function window:CreateFrame13()
|
||||
|
||||
--> reset profile
|
||||
|
||||
function _detalhes:RefreshOptionsAfterProfileReset()
|
||||
_detalhes:OpenOptionsWindow (_detalhes:GetInstance(1))
|
||||
end
|
||||
|
||||
local reset_profile = function()
|
||||
local current_instance = _G.DetailsOptionsWindow.instance
|
||||
_detalhes:ResetProfile (_detalhes:GetCurrentProfileName())
|
||||
_detalhes:OpenOptionsWindow (current_instance)
|
||||
_detalhes:ScheduleTimer ("RefreshOptionsAfterProfileReset", 1)
|
||||
end
|
||||
|
||||
local profile_reset_button = g:NewButton (frame13, _, "$parentProfileResetButton", "profileResetButton", 128, 19, reset_profile, nil, nil, nil, Loc ["STRING_OPTIONS_PROFILES_RESET"])
|
||||
profile_reset_button:InstallCustomTexture()
|
||||
frame13.profileResetButton:SetIcon ([[Interface\Buttons\UI-RefreshButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 4)
|
||||
frame13.profileResetButton:SetTextColor (button_color_rgb)
|
||||
|
||||
local hiddenlabel = g:NewLabel (frame13, _, "$parentProfileResetButtonLabel", "profileResetButtonLabel", "", "GameFontHighlightLeft")
|
||||
hiddenlabel:SetPoint ("left", profile_reset_button, "left")
|
||||
|
||||
window:CreateLineBackground2 (frame13, profile_reset_button, hiddenlabel, Loc ["STRING_OPTIONS_PROFILES_RESET_DESC"])
|
||||
|
||||
--profile_reset_button.button.texture:SetVertexColor (1, .8, 0)
|
||||
window:CreateLineBackground2 (frame13, "profileResetButton", "profileResetButton", Loc ["STRING_OPTIONS_PROFILES_RESET_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
--> save window position within profile
|
||||
|
||||
@@ -3822,12 +3907,13 @@ function window:CreateFrame13()
|
||||
local left_side = {
|
||||
{"ProfileAnchorLabel", 1, true},
|
||||
{current_profile_label, 2},
|
||||
{select_profile_label, 3},
|
||||
{profile_name_label, 4},
|
||||
{select_profileCopy_label, 5},
|
||||
{select_profileErase_label, 6},
|
||||
{profile_reset_button, 7},
|
||||
{"PosAndSizeLabel", 8, true},
|
||||
{"PosAndSizeLabel", 3},
|
||||
{select_profile_label, 4, true},
|
||||
{profile_name_label, 5, true},
|
||||
{select_profileCopy_label, 6},
|
||||
{select_profileErase_label, 7},
|
||||
{profile_reset_button, 8, true},
|
||||
|
||||
}
|
||||
|
||||
window:arrange_menu (frame13, left_side, x, window.top_start_at)
|
||||
@@ -3904,11 +3990,6 @@ function window:CreateFrame3()
|
||||
local titulo_skin = g:NewLabel (frame3, _, "$parentTituloSkin", "tituloSkinLabel", Loc ["STRING_OPTIONS_SKIN_A"], "GameFontNormal", 16)
|
||||
local titulo_skin_desc = g:NewLabel (frame3, _, "$parentTituloSkin2", "tituloSkin2Label", Loc ["STRING_OPTIONS_SKIN_A_DESC"], "GameFontNormal", 9, "white")
|
||||
titulo_skin_desc.width = 320
|
||||
|
||||
--> Save Load
|
||||
-- local titulo_save = g:NewLabel (frame3, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_SAVELOAD"], "GameFontNormal", 16)
|
||||
-- local titulo_save_desc = g:NewLabel (frame3, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_SAVELOAD_DESC"], "GameFontNormal", 9, "white")
|
||||
-- titulo_save_desc.width = 320
|
||||
|
||||
--> create functions and frames first:
|
||||
|
||||
@@ -3954,9 +4035,6 @@ function window:CreateFrame3()
|
||||
loadStyle (nil, _G.DetailsOptionsWindow.instance, _detalhes.instance_defaults)
|
||||
end
|
||||
|
||||
--g:NewButton (frame3, _, "$parentResetToDefaultButton", "resetToDefaults", 160, 16, resetToDefaults, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_RESET"])
|
||||
--frame3.resetToDefaults:InstallCustomTexture()
|
||||
|
||||
--> select skin
|
||||
local onSelectSkin = function (_, instance, skin_name)
|
||||
instance:ChangeSkin (skin_name)
|
||||
@@ -4019,6 +4097,7 @@ function window:CreateFrame3()
|
||||
|
||||
_G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Refresh()
|
||||
_G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Refresh()
|
||||
_G.DetailsOptionsWindow3CustomSkinExportDropdown.MyObject:Refresh()
|
||||
|
||||
end
|
||||
|
||||
@@ -4060,21 +4139,25 @@ function window:CreateFrame3()
|
||||
_detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_STDSAVE"])
|
||||
end
|
||||
|
||||
g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 18, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"], 1)
|
||||
frame3.applyToAll:InstallCustomTexture()
|
||||
g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 18, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"])
|
||||
frame3.makeDefault:InstallCustomTexture()
|
||||
|
||||
g:NewLabel (frame3, _, "$parentToAllStyleLabel", "toAllStyleLabel", "", "GameFontHighlightLeft")
|
||||
g:NewLabel (frame3, _, "$parentmakeDefaultLabel", "makeDefaultLabel", "", "GameFontHighlightLeft")
|
||||
|
||||
g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 18, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"], 1)
|
||||
frame3.applyToAll:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame3, "applyToAll", "applyToAll", Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 18, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"])
|
||||
frame3.makeDefault:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame3, "makeDefault", "makeDefault", Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
frame3.toAllStyleLabel:SetPoint ("left", frame3.applyToAll, "left")
|
||||
frame3.makeDefaultLabel:SetPoint ("left", frame3.makeDefault, "left")
|
||||
|
||||
window:CreateLineBackground2 (frame3, "applyToAll", "toAllStyleLabel", Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"])
|
||||
|
||||
window:CreateLineBackground2 (frame3, "makeDefault", "makeDefaultLabel", Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"])
|
||||
|
||||
frame3.makeDefault:SetIcon ([[Interface\Buttons\UI-CheckBox-Check]], 14, 14, nil, {4/32, 28/32, 4/32, 28/32}, "yellow", 4)
|
||||
frame3.applyToAll:SetIcon ([[Interface\Buttons\UI-HomeButton]], 14, 14, nil, {1/16, 14/16, 0, 1}, nil, 4)
|
||||
frame3.makeDefault:SetTextColor (button_color_rgb)
|
||||
frame3.applyToAll:SetTextColor (button_color_rgb)
|
||||
|
||||
--> Load Custom Skin
|
||||
g:NewLabel (frame3, _, "$parentLoadCustomSkinLabel", "loadCustomSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_LOAD"], "GameFontHighlightLeft")
|
||||
--
|
||||
@@ -4146,6 +4229,7 @@ function window:CreateFrame3()
|
||||
_G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Select (false)
|
||||
_G.DetailsOptionsWindow3CustomSkinLoadDropdown.MyObject:Refresh()
|
||||
_G.DetailsOptionsWindow3CustomSkinRemoveDropdown.MyObject:Refresh()
|
||||
_G.DetailsOptionsWindow3CustomSkinExportDropdown.MyObject:Refresh()
|
||||
_detalhes:Msg (Loc ["STRING_OPTIONS_SKIN_REMOVED"])
|
||||
end
|
||||
|
||||
@@ -4242,11 +4326,13 @@ function window:CreateFrame3()
|
||||
|
||||
g:NewButton (frame3, _, "$parentImportButton", "ImportButton", 160, 18, import_saved, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_IMPORT"])
|
||||
frame3.ImportButton:InstallCustomTexture()
|
||||
|
||||
frame3.ImportButton:SetIcon ([[Interface\Buttons\UI-GuildButton-PublicNote-Up]], 14, 14, nil, nil, nil, 4)
|
||||
frame3.ImportButton:SetTextColor (button_color_rgb)
|
||||
|
||||
g:NewLabel (frame3, _, "$parentImportLabel", "ImportLabel", "", "GameFontHighlightLeft")
|
||||
frame3.ImportLabel:SetPoint ("left", frame3.ImportButton, "left")
|
||||
|
||||
window:CreateLineBackground2 (frame3, "ImportButton", "ImportLabel", Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_DESC"])
|
||||
window:CreateLineBackground2 (frame3, "ImportButton", "ImportButton", Loc ["STRING_OPTIONS_SAVELOAD_IMPORT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
|
||||
--> extra Options
|
||||
g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal")
|
||||
@@ -4370,6 +4456,12 @@ function window:CreateFrame4()
|
||||
window:CreateLineBackground2 (frame4, "BarSpacementSlider", "BarSpacementLabel", Loc ["STRING_OPTIONS_BAR_SPACING_DESC"])
|
||||
|
||||
--> Top Texture
|
||||
|
||||
local texture_icon = [[Interface\TARGETINGFRAME\UI-PhasingIcon]]
|
||||
local texture_icon = [[Interface\AddOns\Details\images\icons]]
|
||||
local texture_icon_size = {14, 14}
|
||||
local texture_texcoord = {469/512, 505/512, 249/512, 284/512}
|
||||
|
||||
--anchor
|
||||
g:NewLabel (frame4, _, "$parentRowUpperTextureAnchor", "rowUpperTextureLabel", Loc ["STRING_OPTIONS_TEXT_TEXTUREU_ANCHOR"], "GameFontNormal")
|
||||
|
||||
@@ -4382,7 +4474,7 @@ function window:CreateFrame4()
|
||||
local textures = SharedMedia:HashTable ("statusbar")
|
||||
local texTable = {}
|
||||
for name, texturePath in pairs (textures) do
|
||||
texTable[#texTable+1] = {value = name, label = name, statusbar = texturePath, onclick = onSelectTexture}
|
||||
texTable[#texTable+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTexture, icon = texture_icon, texcoord = texture_texcoord}
|
||||
end
|
||||
table.sort (texTable, function (t1, t2) return t1.label < t2.label end)
|
||||
return texTable
|
||||
@@ -4436,7 +4528,7 @@ function window:CreateFrame4()
|
||||
local textures2 = SharedMedia:HashTable ("statusbar")
|
||||
local texTable2 = {}
|
||||
for name, texturePath in pairs (textures2) do
|
||||
texTable2[#texTable2+1] = {value = name, label = name, statusbar = texturePath, onclick = onSelectTextureBackground}
|
||||
texTable2[#texTable2+1] = {value = name, label = name, iconsize = texture_icon_size, statusbar = texturePath, onclick = onSelectTextureBackground, icon = texture_icon, texcoord = texture_texcoord}
|
||||
end
|
||||
table.sort (texTable2, function (t1, t2) return t1.label < t2.label end)
|
||||
return texTable2
|
||||
@@ -4478,17 +4570,55 @@ function window:CreateFrame4()
|
||||
|
||||
|
||||
--> Icons
|
||||
--anchors
|
||||
--> anchors
|
||||
g:NewLabel (frame4, _, "$parentIconsAnchor", "rowIconsLabel", Loc ["STRING_OPTIONS_TEXT_ROWICONS_ANCHOR"], "GameFontNormal")
|
||||
|
||||
--icon file
|
||||
g:NewLabel (frame4, _, "$parentIconFileLabel", "iconFileLabel", Loc ["STRING_OPTIONS_BAR_ICONFILE"], "GameFontHighlightLeft")
|
||||
--> icon file
|
||||
|
||||
--> textbox
|
||||
g:NewTextEntry (frame4, _, "$parentIconFileEntry", "iconFileEntry", 180, 20)
|
||||
frame4.iconFileEntry:SetPoint ("left", frame4.iconFileLabel, "right", 2, 0)
|
||||
|
||||
g:NewLabel (frame4, _, "$parentIconFileLabel", "iconFileLabel", Loc ["STRING_OPTIONS_BAR_ICONFILE"], "GameFontHighlightLeft")
|
||||
g:NewLabel (frame4, _, "$parentIconFileLabel2", "iconFileLabel2", "", "GameFontHighlightLeft")
|
||||
|
||||
--> dropdown
|
||||
local OnSelectIconFile = function (_, _, iconpath)
|
||||
_G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, iconpath)
|
||||
frame4.iconFileEntry:SetText (iconpath)
|
||||
end
|
||||
|
||||
local iconsize = {16, 16}
|
||||
local icontexture = [[Interface\WorldStateFrame\ICONS-CLASSES]]
|
||||
local iconcoords = {0.25, 0.50, 0, 0.25}
|
||||
local list = {
|
||||
{value = [[]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE1"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize, iconcolor = {1, 1, 1, .3}},
|
||||
{value = [[Interface\AddOns\Details\images\classes_small]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE2"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
|
||||
{value = [[Interface\AddOns\Details\images\classes_small_bw]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE3"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
|
||||
{value = [[Interface\AddOns\Details\images\classes_small_alpha]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE4"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
|
||||
{value = [[Interface\AddOns\Details\images\classes]], label = Loc ["STRING_OPTIONS_BAR_ICONFILE5"], onclick = OnSelectIconFile, icon = icontexture, texcoord = iconcoords, iconsize = iconsize},
|
||||
}
|
||||
local BuiltIconList = function()
|
||||
return list
|
||||
end
|
||||
|
||||
local d = g:NewDropDown (frame4, _, "$parentIconSelectDropdown", "IconSelectDropdown", DROPDOWN_WIDTH, 20, BuiltIconList, instance.row_info.icon_file)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
d:SetPoint ("left", frame4.iconFileLabel, "right", 2)
|
||||
window:CreateLineBackground2 (frame4, "IconSelectDropdown", "iconFileLabel", Loc ["STRING_OPTIONS_BAR_ICONFILE_DESC2"])
|
||||
--
|
||||
|
||||
frame4.iconFileEntry:SetPoint ("topleft", frame4.iconFileLabel, "bottomleft", 0, -3)
|
||||
--frame4.iconFileEntry:SetPoint ("topright", frame4.IconSelectDropdown, "bottomright", 0, 0)
|
||||
|
||||
frame4.iconFileEntry.tooltip = "- Press escape to restore default value.\n- Leave empty to hide icons."
|
||||
frame4.iconFileEntry:SetHook ("OnEnterPressed", function()
|
||||
_G.DetailsOptionsWindow.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, frame4.iconFileEntry.text)
|
||||
d:Select (false)
|
||||
d:Select (frame4.iconFileEntry.text)
|
||||
end)
|
||||
frame4.iconFileEntry:SetHook ("OnEscapePressed", function()
|
||||
frame4.iconFileEntry:SetText ([[Interface\AddOns\Details\images\classes_small]])
|
||||
@@ -4519,7 +4649,7 @@ function window:CreateFrame4()
|
||||
frame4.noIconButton:GetNormalTexture():SetDesaturated (true)
|
||||
frame4.noIconButton.tooltip = "Clear icon file / Restore default"
|
||||
|
||||
--bar start at
|
||||
--> bar start at
|
||||
g:NewSwitch (frame4, _, "$parentBarStartSlider", "barStartSlider", 60, 20, nil, nil, instance.row_info.start_after_icon)
|
||||
g:NewLabel (frame4, _, "$parentBarStartLabel", "barStartLabel", Loc ["STRING_OPTIONS_BARSTART"], "GameFontHighlightLeft")
|
||||
|
||||
@@ -4548,11 +4678,12 @@ function window:CreateFrame4()
|
||||
instance:SetBarBackdropSettings (nil, nil, nil, textureName)
|
||||
end
|
||||
|
||||
local iconsize = {16, 16}
|
||||
local buildTextureBackdropMenu = function()
|
||||
local textures2 = SharedMedia:HashTable ("border")
|
||||
local texTable2 = {}
|
||||
for name, texturePath in pairs (textures2) do
|
||||
texTable2 [#texTable2+1] = {value = name, label = name, onclick = onSelectTextureBackdrop}
|
||||
texTable2 [#texTable2+1] = {value = name, label = name, onclick = onSelectTextureBackdrop, icon = [[Interface\DialogFrame\UI-DialogBox-Corner]], texcoord = {0.09375, 1, 0, 0.78}, iconsize = iconsize}
|
||||
end
|
||||
table.sort (texTable2, function (t1, t2) return t1.label < t2.label end)
|
||||
return texTable2
|
||||
@@ -4563,7 +4694,7 @@ function window:CreateFrame4()
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
d.onleave_backdrop = dropdown_backdrop_onleave
|
||||
d:SetBackdrop (dropdown_backdrop)
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
d:SetBackdropColor (unpack (dropdown_backdrop_onleave))
|
||||
|
||||
frame4.BackdropBorderTextureDropdown:SetPoint ("left", frame4.BackdropBorderTextureLabel, "right", 2)
|
||||
window:CreateLineBackground2 (frame4, "BackdropBorderTextureDropdown", "BackdropBorderTextureLabel", Loc ["STRING_OPTIONS_BAR_BACKDROP_TEXTURE_DESC"])
|
||||
@@ -4608,13 +4739,14 @@ function window:CreateFrame4()
|
||||
--icon
|
||||
{frame4.rowIconsLabel, 6, true},
|
||||
{frame4.iconFileLabel, 7},
|
||||
{frame4.barStartLabel, 8},
|
||||
{frame4.iconFileLabel2, 8},
|
||||
{frame4.barStartLabel, 9},
|
||||
--backdrop
|
||||
{frame4.BackdropAnchorLabel, 9, true},
|
||||
{frame4.BackdropEnabledLabel, 10},
|
||||
{frame4.BackdropBorderTextureLabel, 11},
|
||||
{frame4.BackdropSizeLabel, 12},
|
||||
{frame4.BackdropColorLabel, 13},
|
||||
{frame4.BackdropAnchorLabel, 10, true},
|
||||
{frame4.BackdropEnabledLabel, 11},
|
||||
{frame4.BackdropBorderTextureLabel, 12},
|
||||
{frame4.BackdropSizeLabel, 13},
|
||||
{frame4.BackdropColorLabel, 14},
|
||||
}
|
||||
|
||||
local right_side = {
|
||||
@@ -4696,7 +4828,7 @@ function window:CreateFrame5()
|
||||
local fontObjects = SharedMedia:HashTable ("font")
|
||||
local fontTable = {}
|
||||
for name, fontPath in pairs (fontObjects) do
|
||||
fontTable[#fontTable+1] = {value = name, label = name, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
|
||||
fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = onSelectFont, font = fontPath, descfont = name, desc = Loc ["STRING_MUSIC_DETAILS_ROBERTOCARLOS"]}
|
||||
end
|
||||
table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
|
||||
return fontTable
|
||||
@@ -5190,12 +5322,17 @@ function window:CreateFrame6()
|
||||
local onBackdropSelect = function (_, instance, backdropName)
|
||||
instance:SetBackdropTexture (backdropName)
|
||||
end
|
||||
local backdropObjects = SharedMedia:HashTable ("background")
|
||||
local backdropTable = {}
|
||||
for name, backdropPath in pairs (backdropObjects) do
|
||||
backdropTable[#backdropTable+1] = {value = name, label = name, onclick = onBackdropSelect}
|
||||
|
||||
local backdrop_icon_size = {16, 16}
|
||||
local backdrop_icon_color = {.6, .6, .6}
|
||||
|
||||
local buildBackdropMenu = function()
|
||||
local backdropTable = {}
|
||||
for name, backdropPath in pairs (SharedMedia:HashTable ("background")) do
|
||||
backdropTable[#backdropTable+1] = {value = name, label = name, onclick = onBackdropSelect, icon = [[Interface\ITEMSOCKETINGFRAME\UI-EMPTYSOCKET]], iconsize = backdrop_icon_size, iconcolor = backdrop_icon_color}
|
||||
end
|
||||
return backdropTable
|
||||
end
|
||||
local buildBackdropMenu = function() return backdropTable end
|
||||
|
||||
local d = g:NewDropDown (frame6, _, "$parentBackdropDropdown", "backdropDropdown", DROPDOWN_WIDTH, 20, buildBackdropMenu, nil)
|
||||
d.onenter_backdrop = dropdown_backdrop_onenter
|
||||
@@ -5698,7 +5835,7 @@ function window:CreateFrame8()
|
||||
local fontObjects = SharedMedia:HashTable ("font")
|
||||
local fontTable = {}
|
||||
for name, fontPath in pairs (fontObjects) do
|
||||
fontTable[#fontTable+1] = {value = name, label = name, onclick = instance_text_color_onselectfont, font = fontPath, descfont = name, desc = "If there's a bustle in your hedgerow, don't be alarmed now\nIt's just a spring clean for the may queen."}
|
||||
fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = instance_text_color_onselectfont, font = fontPath, descfont = name, desc = "If there's a bustle in your hedgerow, don't be alarmed now\nIt's just a spring clean for the may queen."}
|
||||
end
|
||||
table.sort (fontTable, function (t1, t2) return t1.label < t2.label end)
|
||||
return fontTable
|
||||
@@ -6165,13 +6302,14 @@ function window:CreateFrame9()
|
||||
frame9.anchorDropdown:SetPoint ("left", frame9.anchorLabel, "right", 2)
|
||||
--
|
||||
frame9.editImage:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (frame9, "editImage", "editImage", Loc ["STRING_OPTIONS_WP_EDIT_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
frame9.editImage:SetTextColor (button_color_rgb)
|
||||
frame9.editImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 14, 14, nil, {469/512, 505/512, 290/512, 322/512}, nil, 4)
|
||||
|
||||
window:CreateLineBackground2 (frame9, "useBackgroundSlider", "enablewallpaperLabel", Loc ["STRING_OPTIONS_WP_ENABLE_DESC"])
|
||||
|
||||
window:CreateLineBackground2 (frame9, "anchorDropdown", "anchorLabel", Loc ["STRING_OPTIONS_WP_ALIGN_DESC"])
|
||||
|
||||
window:CreateLineBackground2 (frame9, "editImage", "editImage", Loc ["STRING_OPTIONS_WP_EDIT_DESC"])
|
||||
|
||||
|
||||
window:CreateLineBackground2 (frame9, "backgroundDropdown", "wallpapergroupLabel", Loc ["STRING_OPTIONS_WP_GROUP_DESC"])
|
||||
|
||||
window:CreateLineBackground2 (frame9, "backgroundDropdown2", "selectwallpaperLabel", Loc ["STRING_OPTIONS_WP_GROUP2_DESC"])
|
||||
@@ -6401,7 +6539,9 @@ function window:CreateFrame9()
|
||||
|
||||
g:NewButton (frame9, _, "$parentLoadImage", "LoadImage", 200, 18, load_image, nil, nil, nil, Loc ["STRING_OPTIONS_WALLPAPER_LOAD"])
|
||||
frame9.LoadImage:InstallCustomTexture()
|
||||
window:CreateLineBackground2 (frame9, "LoadImage", "LoadImage", Loc ["STRING_OPTIONS_WALLPAPER_LOAD_DESC"])
|
||||
window:CreateLineBackground2 (frame9, "LoadImage", "LoadImage", Loc ["STRING_OPTIONS_WALLPAPER_LOAD_DESC"], nil, {1, 0.8, 0}, button_color_rgb)
|
||||
frame9.LoadImage:SetTextColor (button_color_rgb)
|
||||
frame9.LoadImage:SetIcon ([[Interface\AddOns\Details\images\icons]], 11, 14, nil, {437/512, 467/512, 191/512, 239/512}, nil, 5)
|
||||
|
||||
--> Anchors
|
||||
|
||||
@@ -6952,6 +7092,11 @@ function window:CreateFrame12()
|
||||
g:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 16, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"])
|
||||
bframe ["OptionsButton"..i]:SetPoint ("topleft", frame4, "topleft", 510, y-2)
|
||||
bframe ["OptionsButton"..i]:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (bframe, "OptionsButton"..i, "OptionsButton"..i, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3)
|
||||
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
@@ -7029,6 +7174,10 @@ function window:CreateFrame12()
|
||||
g:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 16, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"])
|
||||
bframe ["OptionsButton"..i]:SetPoint ("topleft", frame4, "topleft", 510, y-2)
|
||||
bframe ["OptionsButton"..i]:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (bframe, "OptionsButton"..i, "OptionsButton"..i, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3)
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
@@ -7106,6 +7255,10 @@ function window:CreateFrame12()
|
||||
g:NewButton (bframe, nil, "$parentOptionsButton"..i, "OptionsButton"..i, 86, 16, pluginObject.OpenOptionsPanel, nil, nil, nil, Loc ["STRING_OPTIONS_PLUGINS_OPTIONS"])
|
||||
bframe ["OptionsButton"..i]:SetPoint ("topleft", frame4, "topleft", 510, y-2)
|
||||
bframe ["OptionsButton"..i]:InstallCustomTexture()
|
||||
|
||||
window:CreateLineBackground2 (bframe, "OptionsButton"..i, "OptionsButton"..i, nil, nil, {1, 0.8, 0}, button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetTextColor (button_color_rgb)
|
||||
bframe ["OptionsButton"..i]:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3)
|
||||
end
|
||||
|
||||
i = i + 1
|
||||
@@ -7328,6 +7481,10 @@ function window:update_all (editing_instance)
|
||||
_G.DetailsOptionsWindow4BackdropSizeHeight.MyObject:SetValue (editing_instance.row_info.backdrop.size)
|
||||
_G.DetailsOptionsWindow4BackdropColorPick.MyObject:SetColor (unpack (editing_instance.row_info.backdrop.color))
|
||||
|
||||
_G.DetailsOptionsWindow4IconFileEntry:SetText (editing_instance.row_info.icon_file)
|
||||
_G.DetailsOptionsWindow4IconSelectDropdown.MyObject:Select (false)
|
||||
_G.DetailsOptionsWindow4IconSelectDropdown.MyObject:Select (editing_instance.row_info.icon_file)
|
||||
|
||||
--> window 5
|
||||
|
||||
_G.DetailsOptionsWindow5PercentDropdown.MyObject:SetFixedParameter (editing_instance)
|
||||
@@ -7476,6 +7633,8 @@ function window:update_all (editing_instance)
|
||||
|
||||
--report
|
||||
_G.DetailsOptionsWindow18ReportHelpfulLinkSlider.MyObject:SetValue (_detalhes.report_heal_links)
|
||||
--disabled groups
|
||||
_G.DetailsOptionsWindow18DisableGroupsSlider.MyObject:SetValue (_detalhes.disable_window_groups)
|
||||
|
||||
--auto switch
|
||||
local switch_tank_in_combat = editing_instance.switch_tank_in_combat
|
||||
@@ -7757,7 +7916,7 @@ function window:update_all (editing_instance)
|
||||
GameCooltip:ShowCooltip (_G.DetailsOptionsWindowInstanceSelectDropdown, "tooltip")
|
||||
end
|
||||
|
||||
_G.DetailsOptionsWindow4IconFileEntry:SetText (editing_instance.row_info.icon_file)
|
||||
|
||||
|
||||
--profiles
|
||||
_G.DetailsOptionsWindow13CurrentProfileLabel2.MyObject:SetText (_detalhes_database.active_profile)
|
||||
|
||||
+129
-256
@@ -486,7 +486,10 @@ local movement_onupdate = function (self, elapsed)
|
||||
local function move_janela (baseframe, iniciando, instancia)
|
||||
|
||||
instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1]
|
||||
|
||||
if (_detalhes.disable_window_groups) then
|
||||
instancia_alvo = nil
|
||||
end
|
||||
|
||||
if (iniciando) then
|
||||
|
||||
baseframe.isMoving = true
|
||||
@@ -496,15 +499,8 @@ local function move_janela (baseframe, iniciando, instancia)
|
||||
local _, ClampLeft, ClampRight = instancia:InstanciasHorizontais()
|
||||
local _, ClampBottom, ClampTop = instancia:InstanciasVerticais()
|
||||
|
||||
if (ClampTop == 0) then
|
||||
ClampTop = 0
|
||||
end
|
||||
if (ClampBottom == 0) then
|
||||
ClampBottom = 0
|
||||
end
|
||||
|
||||
baseframe:SetClampRectInsets (-ClampLeft, ClampRight, ClampTop, -ClampBottom)
|
||||
|
||||
|
||||
if (instancia_alvo) then
|
||||
|
||||
tempo_fades = 1.0
|
||||
@@ -832,85 +828,43 @@ local function instancias_verticais (instancia, altura, esquerda, direita)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InstanciasVerticais (instancia)
|
||||
|
||||
instancia = self or instancia
|
||||
|
||||
local linha_vertical, baixo, cima = {}, 0, 0
|
||||
|
||||
local checking = instancia
|
||||
local first = true
|
||||
|
||||
local check_index_anterior = _detalhes.tabela_instancias [instancia.meu_id-1]
|
||||
if (check_index_anterior) then --> possiu uma instância antes de mim
|
||||
if (check_index_anterior.snap[4] and check_index_anterior.snap[4] == instancia.meu_id) then --> o index negativo vai para baixo
|
||||
for i = instancia.meu_id-1, 1, -1 do
|
||||
local esta_instancia = _detalhes.tabela_instancias [i]
|
||||
if (esta_instancia.snap[4] and esta_instancia.snap [4] == checking.meu_id) then
|
||||
linha_vertical [#linha_vertical+1] = esta_instancia
|
||||
if (first) then
|
||||
baixo = baixo + esta_instancia.baseframe:GetHeight()+48
|
||||
first = false
|
||||
else
|
||||
baixo = baixo + esta_instancia.baseframe:GetHeight()+34
|
||||
end
|
||||
checking = esta_instancia
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif (check_index_anterior.snap[2] and check_index_anterior.snap[2] == instancia.meu_id) then --> o index negativo vai para cima
|
||||
for i = instancia.meu_id-1, 1, -1 do
|
||||
local esta_instancia = _detalhes.tabela_instancias [i]
|
||||
if (esta_instancia.snap[2] and esta_instancia.snap[2] == checking.meu_id) then
|
||||
linha_vertical [#linha_vertical+1] = esta_instancia
|
||||
if (first) then
|
||||
cima = cima + esta_instancia.baseframe:GetHeight() + 64
|
||||
first = false
|
||||
else
|
||||
cima = cima + esta_instancia.baseframe:GetHeight() + 34
|
||||
end
|
||||
checking = esta_instancia
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
local check_snap_side = function (instanceid, snap, id, container)
|
||||
local instance = _detalhes:GetInstance (instanceid)
|
||||
if (instance and instance.snap [snap] and instance.snap [snap] == id) then
|
||||
tinsert (container, instance)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:InstanciasVerticais (instance)
|
||||
|
||||
instance = self or instance
|
||||
|
||||
checking = instancia
|
||||
first = true
|
||||
local on_top = {}
|
||||
local on_bottom = {}
|
||||
local id = instance:GetId()
|
||||
|
||||
local check_index_posterior = _detalhes.tabela_instancias [instancia.meu_id+1]
|
||||
if (check_index_posterior) then
|
||||
if (check_index_posterior.snap[4] and check_index_posterior.snap[4] == instancia.meu_id) then --> o index posterior vai para a esquerda
|
||||
for i = instancia.meu_id+1, #_detalhes.tabela_instancias do
|
||||
local esta_instancia = _detalhes.tabela_instancias [i]
|
||||
if (esta_instancia.snap[4] and esta_instancia.snap[4] == checking.meu_id) then
|
||||
linha_vertical [#linha_vertical+1] = esta_instancia
|
||||
if (first) then
|
||||
baixo = baixo + esta_instancia.baseframe:GetHeight()+48
|
||||
first = true
|
||||
else
|
||||
baixo = baixo + esta_instancia.baseframe:GetHeight()+34
|
||||
end
|
||||
checking = esta_instancia
|
||||
--lower instances
|
||||
local this_instance = _detalhes:GetInstance (id-1)
|
||||
if (this_instance) then
|
||||
--> top side
|
||||
if (this_instance.snap [2] and this_instance.snap [2] == id) then
|
||||
local cid = id
|
||||
local snapid = 2
|
||||
for i = cid-1, 1, -1 do
|
||||
if (check_snap_side (i, 2, cid, on_top)) then
|
||||
cid = cid - 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif (check_index_posterior.snap[2] and check_index_posterior.snap[2] == instancia.meu_id) then --> o index posterior vai para a direita
|
||||
for i = instancia.meu_id+1, #_detalhes.tabela_instancias do
|
||||
local esta_instancia = _detalhes.tabela_instancias [i]
|
||||
if (esta_instancia.snap[2] and esta_instancia.snap[2] == checking.meu_id) then
|
||||
linha_vertical [#linha_vertical+1] = esta_instancia
|
||||
if (first) then
|
||||
cima = cima + esta_instancia.baseframe:GetHeight() + 64
|
||||
first = false
|
||||
else
|
||||
cima = cima + esta_instancia.baseframe:GetHeight() + 34
|
||||
end
|
||||
checking = esta_instancia
|
||||
--> bottom side
|
||||
elseif (this_instance.snap [4] and this_instance.snap [4] == id) then
|
||||
local cid = id
|
||||
local snapid = 4
|
||||
for i = cid-1, 1, -1 do
|
||||
if (check_snap_side (i, 4, cid, on_bottom)) then
|
||||
cid = cid - 1
|
||||
else
|
||||
break
|
||||
end
|
||||
@@ -918,10 +872,65 @@ function _detalhes:InstanciasVerticais (instancia)
|
||||
end
|
||||
end
|
||||
|
||||
--upper instances
|
||||
local this_instance = _detalhes:GetInstance (id+1)
|
||||
if (this_instance) then
|
||||
--> top side
|
||||
if (this_instance.snap [2] and this_instance.snap [2] == id) then
|
||||
local cid = id
|
||||
local snapid = 2
|
||||
for i = cid+1, _detalhes:GetNumInstancesAmount() do
|
||||
if (check_snap_side (i, 2, cid, on_top)) then
|
||||
cid = cid + 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
--> bottom side
|
||||
elseif (this_instance.snap [4] and this_instance.snap [4] == id) then
|
||||
local cid = id
|
||||
local snapid = 4
|
||||
for i = cid+1, _detalhes:GetNumInstancesAmount() do
|
||||
if (check_snap_side (i, 4, cid, on_bottom)) then
|
||||
cid = cid + 1
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--> calc top clamp
|
||||
local top_clamp = 0
|
||||
local bottom_clamp = 0
|
||||
|
||||
return linha_vertical, baixo, cima
|
||||
if (instance.toolbar_side == 1) then
|
||||
top_clamp = top_clamp + 20
|
||||
elseif (instance.toolbar_side == 2) then
|
||||
bottom_clamp = bottom_clamp + 20
|
||||
end
|
||||
if (instance.show_statusbar) then
|
||||
bottom_clamp = bottom_clamp + 14
|
||||
end
|
||||
|
||||
for cid, this_instance in _ipairs (on_top) do
|
||||
if (this_instance.show_statusbar) then
|
||||
top_clamp = top_clamp + 14
|
||||
end
|
||||
top_clamp = top_clamp + 20
|
||||
top_clamp = top_clamp + this_instance.baseframe:GetHeight()
|
||||
end
|
||||
|
||||
for cid, this_instance in _ipairs (on_bottom) do
|
||||
if (this_instance.show_statusbar) then
|
||||
bottom_clamp = bottom_clamp + 14
|
||||
end
|
||||
bottom_clamp = bottom_clamp + 20
|
||||
bottom_clamp = bottom_clamp + this_instance.baseframe:GetHeight()
|
||||
tinsert (on_top, this_instance)
|
||||
end
|
||||
|
||||
return on_top, bottom_clamp, top_clamp
|
||||
end
|
||||
|
||||
--[[
|
||||
@@ -4548,7 +4557,7 @@ function _detalhes:ChangeSkin (skin_name)
|
||||
end
|
||||
|
||||
--> reset all config
|
||||
self:ResetInstanceConfig()
|
||||
self:ResetInstanceConfig (true)
|
||||
|
||||
--> overwrites
|
||||
local overwrite_cprops = this_skin.instance_cprops
|
||||
@@ -5961,7 +5970,7 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\AddOns\Details\images\modo_icone]])
|
||||
baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", instancia.menu_anchor [1], instancia.menu_anchor [2])
|
||||
baseframe.cabecalho.modo_selecao:SetFrameLevel (baseframe:GetFrameLevel()+5)
|
||||
|
||||
|
||||
--> Generating Cooltip menu from table template
|
||||
local modeMenuTable = {
|
||||
|
||||
@@ -6420,180 +6429,44 @@ function gump:CriaCabecalho (baseframe, instancia)
|
||||
|
||||
--> fim botão reset
|
||||
|
||||
--> Botão de Ajuda ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
--> disabled
|
||||
if (instancia.meu_id == 1 and _detalhes.tutorial.logons < 0) then
|
||||
|
||||
--> help button
|
||||
local helpButton = CreateFrame ("button", "DetailsMainWindowHelpButton", baseframe, "MainHelpPlateButton")
|
||||
helpButton:SetWidth (28)
|
||||
helpButton:SetHeight (28)
|
||||
helpButton.I:SetWidth (22)
|
||||
helpButton.I:SetHeight (22)
|
||||
helpButton.Ring:SetWidth (28)
|
||||
helpButton.Ring:SetHeight (28)
|
||||
helpButton.Ring:SetPoint ("center", 5, -6)
|
||||
|
||||
helpButton:SetPoint ("topright", baseframe, "topleft", 37, 37)
|
||||
|
||||
helpButton:SetFrameLevel (0)
|
||||
helpButton:SetFrameStrata ("LOW")
|
||||
--[[
|
||||
|
||||
local mainWindowHelp = {
|
||||
FramePos = {x = 0, y = 10},
|
||||
FrameSize = {width = 300, height = 85},
|
||||
|
||||
--> modo, segmento e atributo
|
||||
[1] ={HighLightBox = {x = 25, y = 10, width = 60, height = 20},
|
||||
ButtonPos = { x = 32, y = 40},
|
||||
ToolTipDir = "right",
|
||||
ToolTipText = Loc ["STRING_HELP_MENUS"]
|
||||
},
|
||||
--> delete
|
||||
[2] ={HighLightBox = {x = 195, y = 10, width = 47, height = 20},
|
||||
ButtonPos = { x = 197, y = 5},
|
||||
ToolTipDir = "left",
|
||||
ToolTipText = Loc ["STRING_HELP_ERASE"]
|
||||
},
|
||||
--> menu da instancia
|
||||
[3] ={HighLightBox = {x = 244, y = 10, width = 30, height = 20},
|
||||
ButtonPos = { x = 237, y = 5},
|
||||
ToolTipDir = "right",
|
||||
ToolTipText = Loc ["STRING_HELP_INSTANCE"]
|
||||
},
|
||||
--> stretch
|
||||
[4] ={HighLightBox = {x = 244, y = 30, width = 30, height = 20},
|
||||
ButtonPos = { x = 237, y = 57},
|
||||
ToolTipDir = "right",
|
||||
ToolTipText = Loc ["STRING_HELP_STRETCH"]
|
||||
},
|
||||
--> status bar
|
||||
[5] ={HighLightBox = {x = 0, y = -101, width = 300, height = 20},
|
||||
ButtonPos = { x = 126, y = -88},
|
||||
ToolTipDir = "left",
|
||||
ToolTipText = Loc ["STRING_HELP_STATUSBAR"]
|
||||
},
|
||||
--> switch menu
|
||||
[6] ={HighLightBox = {x = 0, y = -10, width = 300, height = 95},
|
||||
ButtonPos = { x = 127, y = -37},
|
||||
ToolTipDir = "left",
|
||||
ToolTipText = Loc ["STRING_HELP_SWITCH"]
|
||||
},
|
||||
--> resizer
|
||||
[7] ={HighLightBox = {x = 250, y = -81, width = 50, height = 20},
|
||||
ButtonPos = { x = 253, y = -52},
|
||||
ToolTipDir = "right",
|
||||
ToolTipText = Loc ["STRING_HELP_RESIZE"]
|
||||
},
|
||||
}
|
||||
|
||||
helpButton:SetScript ("OnClick", function()
|
||||
if (not HelpPlate_IsShowing (mainWindowHelp)) then
|
||||
|
||||
instancia:SetSize (300, 95)
|
||||
|
||||
HelpPlate_Show (mainWindowHelp, baseframe, helpButton, true)
|
||||
else
|
||||
HelpPlate_Hide (true)
|
||||
end
|
||||
end)
|
||||
|
||||
end
|
||||
--> teste com shadows
|
||||
|
||||
---------> consolidate frame ----------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--modo
|
||||
local shadow = baseframe.cabecalho.modo_selecao:CreateTexture ("sombra", "background")
|
||||
shadow:SetPoint ("center", baseframe.cabecalho.modo_selecao.widget, "center")
|
||||
shadow:SetTexture ("Interface\\PetBattles\\PetBattle-SelectedPetGlow")
|
||||
shadow:SetVertexColor (0, 0, 0, 1)
|
||||
shadow:SetSize (22, 22)
|
||||
--segmentos
|
||||
local shadow = baseframe.cabecalho.segmento:CreateTexture ("sombra2", "background")
|
||||
shadow:SetPoint ("center", baseframe.cabecalho.segmento.widget, "center")
|
||||
shadow:SetTexture ("Interface\\PetBattles\\PetBattle-SelectedPetGlow")
|
||||
shadow:SetVertexColor (0, 0, 0, 1)
|
||||
shadow:SetSize (22, 22)
|
||||
--atributo
|
||||
local shadow = baseframe.cabecalho.atributo:CreateTexture ("sombra3", "background")
|
||||
shadow:SetPoint ("center", baseframe.cabecalho.atributo.widget, "center")
|
||||
shadow:SetTexture ("Interface\\PetBattles\\PetBattle-SelectedPetGlow")
|
||||
shadow:SetVertexColor (0, 0, 0, 1)
|
||||
shadow:SetSize (12, 16)
|
||||
shadow:SetTexCoord (0.0, 0.0, 0.3, 0.3, 0.7, 0.7, 1, 1)
|
||||
--report
|
||||
local shadow = baseframe.cabecalho.report:CreateTexture ("sombra4", "background")
|
||||
shadow:SetPoint ("center", baseframe.cabecalho.report.widget, "center")
|
||||
shadow:SetTexture ("Interface\\PetBattles\\PetBattle-SelectedPetGlow")
|
||||
shadow:SetVertexColor (0, 0, 0, 1)
|
||||
shadow:SetSize (22, 22)
|
||||
|
||||
--baseToolbar.novo, baseToolbar.fechar, baseToolbar.reset}baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report
|
||||
|
||||
local consolidateFrame = CreateFrame ("frame", "DetailsConsolidateFrame" .. instancia.meu_id, _detalhes.listener)
|
||||
consolidateFrame:SetWidth (21)
|
||||
consolidateFrame:SetHeight (83)
|
||||
consolidateFrame:SetFrameLevel (baseframe:GetFrameLevel()-1)
|
||||
--consolidateFrame:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", 0, 20)
|
||||
consolidateFrame:SetFrameStrata ("FULLSCREEN")
|
||||
consolidateFrame:Hide()
|
||||
instancia.consolidateFrame = consolidateFrame
|
||||
|
||||
---------> consolidate texture
|
||||
|
||||
local frameTexture = consolidateFrame:CreateTexture (nil, "background")
|
||||
frameTexture:SetTexture ([[Interface\AddOns\Details\images\consolidate_frame]])
|
||||
frameTexture:SetPoint ("top", consolidateFrame, "top", .5, 0)
|
||||
frameTexture:SetWidth (32)
|
||||
frameTexture:SetHeight (83)
|
||||
frameTexture:SetTexCoord (0, 1, 0, 0.6484375)
|
||||
|
||||
---------> consolidate button
|
||||
|
||||
local consolidateButton = CreateFrame ("button", "DetailsConsolidateButton" .. instancia.meu_id, baseframe)
|
||||
consolidateButton:SetWidth (16)
|
||||
consolidateButton:SetHeight (16)
|
||||
consolidateButton:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1)
|
||||
consolidateButton:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", 6, 2)
|
||||
consolidateFrame:SetPoint ("bottom", consolidateButton, "top", 3, 0)
|
||||
|
||||
local normal_texture = consolidateButton:CreateTexture (nil, "overlay")
|
||||
normal_texture:SetTexture ([[Interface\GossipFrame\HealerGossipIcon]])
|
||||
normal_texture:SetVertexColor (.9, .8, 0)
|
||||
normal_texture:SetWidth (16)
|
||||
normal_texture:SetHeight (16)
|
||||
normal_texture:SetPoint ("center", consolidateButton, "center")
|
||||
|
||||
consolidateButton:Hide()
|
||||
instancia.consolidateButton = consolidateButton
|
||||
instancia.consolidateButtonTexture = normal_texture
|
||||
|
||||
---------> consolidate scripts
|
||||
|
||||
consolidateFrame:SetScript ("OnEnter", function (self)
|
||||
consolidateFrame.mouse_over = true
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end)
|
||||
|
||||
consolidateFrame:SetScript ("OnLeave", function (self)
|
||||
consolidateFrame.mouse_over = false
|
||||
local passou = 0
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.5) then
|
||||
if (not _G.GameCooltip.active and not baseframe.cabecalho.button_mouse_over) then
|
||||
consolidateFrame:Hide()
|
||||
normal_texture:SetBlendMode ("BLEND")
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
passou = 0
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
consolidateButton:SetScript ("OnEnter", function (self)
|
||||
gump:Fade (baseframe.button_stretch, "alpha", 0.3)
|
||||
local passou = 0
|
||||
consolidateFrame:SetScript ("OnUpdate", nil)
|
||||
normal_texture:SetBlendMode ("ADD")
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.3) then
|
||||
consolidateFrame:SetPoint ("bottom", self, "top", 3, 0)
|
||||
consolidateFrame:Show()
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
consolidateButton:SetScript ("OnLeave", function (self)
|
||||
gump:Fade (baseframe.button_stretch, -1)
|
||||
local passou = 0
|
||||
self:SetScript ("OnUpdate", function (self, elapsed)
|
||||
passou = passou+elapsed
|
||||
if (passou > 0.3) then
|
||||
if (not consolidateFrame.mouse_over and not baseframe.cabecalho.button_mouse_over and not _G.GameCooltip.active) then
|
||||
consolidateFrame:Hide()
|
||||
normal_texture:SetBlendMode ("BLEND")
|
||||
end
|
||||
self:SetScript ("OnUpdate", nil)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
local shadow = UIParent:CreateTexture ("SombraTeste", "background")
|
||||
shadow:SetPoint ("center", UIParent, "center", 200, 0)
|
||||
shadow:SetTexture ("Interface\\PetBattles\\PetBattle-SelectedPetGlow")
|
||||
shadow:SetVertexColor (0, 0, 0, 1)
|
||||
shadow:SetSize (300, 300)
|
||||
shadow:SetTexCoord (0.0, 0.0, 0.3, 0.3, 0.7, 0.7, 1, 1)
|
||||
--]]
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -15,17 +15,14 @@ local TimeAttack = _detalhes:NewPluginObject ("Details_TimeAttack")
|
||||
--> Main Frame
|
||||
local TimeAttackFrame = TimeAttack.Frame
|
||||
|
||||
local function CreatePluginFrames (data)
|
||||
local function CreatePluginFrames()
|
||||
|
||||
--> catch Details! main object
|
||||
local _detalhes = _G._detalhes
|
||||
local DetailsFrameWork = _detalhes.gump
|
||||
local instance --> shortcut for details instance wich are holding solo plugins
|
||||
local GameCooltip = GameCooltip
|
||||
|
||||
|
||||
--> default rank table
|
||||
TimeAttack.data = data or {time = 180, dps = 0, history = {}}
|
||||
TimeAttack.try = 1
|
||||
|
||||
--> OnEvent Table
|
||||
@@ -44,7 +41,9 @@ local function CreatePluginFrames (data)
|
||||
elseif (event == "PLUGIN_DISABLED") then
|
||||
|
||||
elseif (event == "PLUGIN_ENABLED") then
|
||||
|
||||
|
||||
elseif (event == "DETAILS_STARTED") then
|
||||
TimeAttack:CheckTimeAttackTutorial()
|
||||
end
|
||||
end
|
||||
|
||||
@@ -111,10 +110,10 @@ local function CreatePluginFrames (data)
|
||||
local TimeDesc = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TimeDesc", Loc ["STRING_TIME_SELECTION"])
|
||||
TimeDesc:SetPoint ("topleft", TimeAttackFrame, 15, -260)
|
||||
--> slider
|
||||
local TimeAmount = DetailsFrameWork:NewSlider (TimeAttackFrame, nil, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 10, TimeAttack.data.time)
|
||||
--local TimeAmount = DetailsFrameWork:NewSlider2 (TimeAttackFrame, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 10, TimeAttack.data.time)
|
||||
|
||||
local TimeAmount = DetailsFrameWork:NewSlider (TimeAttackFrame, nil, "DetailsTimeAttackTimeSelect", "TimeSelect", 270, 20, 30, 330, 1, TimeAttack.db.time)
|
||||
TimeAmount:SetPoint ("topleft", TimeAttackFrame, 15, -270)
|
||||
TimeAmount.OnChangeHook = function (_, _, value) TimeAttack.data.time = value end
|
||||
TimeAmount.OnChangeHook = function (_, _, value) TimeAttack.db.time = value end
|
||||
|
||||
--> main time/damage/dps texts
|
||||
local clock = DetailsFrameWork:NewLabel (TimeAttackFrame, TimeAttackFrame, nil, "TIMER", "00:00:00", "GameFontHighlightLarge")
|
||||
@@ -152,7 +151,7 @@ local function CreatePluginFrames (data)
|
||||
NowShowing = 1, --> 1 for recently 2 for saved
|
||||
LabelsCreated = {},
|
||||
Recently = {},
|
||||
Hystory = TimeAttack.data.history
|
||||
Hystory = TimeAttack.db.history
|
||||
}
|
||||
HistoryPanelObject.__index = HistoryPanelObject
|
||||
|
||||
@@ -189,7 +188,7 @@ local function CreatePluginFrames (data)
|
||||
if (HistoryPanelObject.NowShowing == 1) then --> recently
|
||||
table.remove (HistoryPanelObject.Recently, index)
|
||||
else --> history
|
||||
table.remove (TimeAttack.data.history, index)
|
||||
table.remove (TimeAttack.db.history, index)
|
||||
end
|
||||
HistoryPanelObject:Refresh()
|
||||
end
|
||||
@@ -207,8 +206,8 @@ local function CreatePluginFrames (data)
|
||||
NewSave.Date = ToSaveTimeObject.Date
|
||||
NewSave.note = ToSaveTimeObject.note
|
||||
|
||||
table.insert (TimeAttack.data.history, 1, NewSave)
|
||||
table.remove (TimeAttack.data.history, 25)
|
||||
table.insert (TimeAttack.db.history, 1, NewSave)
|
||||
table.remove (TimeAttack.db.history, 25)
|
||||
HistoryPanelObject:AddHistory (NewSave)
|
||||
ToSaveTimeObject.FinishSaved = true
|
||||
HistoryPanelObject:Refresh()
|
||||
@@ -226,8 +225,8 @@ local function CreatePluginFrames (data)
|
||||
NewSave.ItemLevel = TimeAttack.Time.FinishIlevel
|
||||
NewSave.Date = TimeAttack.Time.Date
|
||||
TimeAttack.Time.FinishSaved = true
|
||||
table.insert (TimeAttack.data.history, 1, NewSave)
|
||||
table.remove (TimeAttack.data.history, 25)
|
||||
table.insert (TimeAttack.db.history, 1, NewSave)
|
||||
table.remove (TimeAttack.db.history, 25)
|
||||
HistoryPanelObject:AddHistory (NewSave)
|
||||
HistoryPanelObject:Refresh()
|
||||
TimeAttackFrame ["SaveButton"]:Disable()
|
||||
@@ -275,9 +274,12 @@ local function CreatePluginFrames (data)
|
||||
function HistoryPanelObject:RefreshLabel (AttemptTable, AlreadySaved, First)
|
||||
|
||||
self.table = AttemptTable
|
||||
|
||||
if (AlreadySaved) then --> showing historic
|
||||
self.remove:SetPoint ("left", self.background.frame, "left")
|
||||
self.note:SetPoint ("left", self.remove.button, "right")
|
||||
|
||||
self.remove:SetPoint ("left", self.background.frame, "left", 20, 0)
|
||||
self.note:SetPoint ("left", self.remove, "right")
|
||||
|
||||
if (AttemptTable.note) then
|
||||
self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
|
||||
self.note.tooltip = AttemptTable.note
|
||||
@@ -289,9 +291,12 @@ local function CreatePluginFrames (data)
|
||||
local diamesano = string.gsub (AttemptTable.Date, "(.-)%s", "")
|
||||
self.text:SetText (diamesano)
|
||||
|
||||
self.rownumber:SetText ("#" .. self.index)
|
||||
|
||||
elseif (not AttemptTable.FinishSaved) then --> não foi salvo ainda
|
||||
self.remove:Show()
|
||||
self.save:Show()
|
||||
self.remove:SetPoint ("left", self.background.frame, "left", 16, 0)
|
||||
self.note:SetPoint ("left", self.save.button, "right")
|
||||
if (AttemptTable.note) then
|
||||
self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
|
||||
@@ -301,12 +306,16 @@ local function CreatePluginFrames (data)
|
||||
self.note.tooltip = Loc ["STRING_SETNOTE"]
|
||||
end
|
||||
if (First) then
|
||||
self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage).." (#"..AttemptTable.N..")")
|
||||
self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage))
|
||||
else
|
||||
self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage).." (#"..AttemptTable.N..")")
|
||||
self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage))
|
||||
end
|
||||
self.rownumber:SetText ("#" .. AttemptTable.N)
|
||||
self.rownumber:SetPoint ("left", self.background.frame)
|
||||
|
||||
else --> ta mostrando recentes e ja foi salvo
|
||||
self.remove:Show()
|
||||
self.remove:SetPoint ("left", self.background.frame, "left", 16, 0)
|
||||
self.note:SetPoint ("left", self.remove.button, "right")
|
||||
if (AttemptTable.note) then
|
||||
self.note:SetNormalTexture ("Interface\\Buttons\\UI-GuildButton-PublicNote-Up")
|
||||
@@ -317,11 +326,14 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
self.save:Hide()
|
||||
if (First) then
|
||||
self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage).." (#"..AttemptTable.N..")")
|
||||
self.text:SetText ("-".. TimeAttack:ToK (First-AttemptTable.FinishDamage))
|
||||
else
|
||||
self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage).." (#"..AttemptTable.N..")")
|
||||
self.text:SetText (TimeAttack:ToK (AttemptTable.FinishDamage))
|
||||
end
|
||||
self.rownumber:SetText ("#" .. AttemptTable.N)
|
||||
self.rownumber:SetPoint ("left", self.background.frame)
|
||||
end
|
||||
|
||||
self.background:Show()
|
||||
end
|
||||
|
||||
@@ -353,7 +365,7 @@ local function CreatePluginFrames (data)
|
||||
|
||||
GameCooltip:Reset()
|
||||
|
||||
local TimeObject = TimeAttack.data.history [self.index]
|
||||
local TimeObject = TimeAttack.db.history [self.index]
|
||||
|
||||
GameCooltip:AddLine (TimeAttack:comma_value (TimeObject.DamageDone))
|
||||
GameCooltip:AddIcon ("Interface\\TARGETINGFRAME\\PetBadge-Undead")
|
||||
@@ -387,7 +399,7 @@ local function CreatePluginFrames (data)
|
||||
if (HistoryPanelObject.NowShowing == 1) then --> recently
|
||||
HistoryPanelObject.Recently [editbox.editing].note = texto
|
||||
else
|
||||
TimeAttack.data.history [editbox.editing].note = texto
|
||||
TimeAttack.db.history [editbox.editing].note = texto
|
||||
end
|
||||
end
|
||||
editbox:SetText ("")
|
||||
@@ -427,8 +439,8 @@ local function CreatePluginFrames (data)
|
||||
|
||||
if (HistoryPanelObject.NowShowing == 1 and HistoryPanelObject.Recently [index].note) then --> recently
|
||||
NoteInsertField:SetText (HistoryPanelObject.Recently [index].note)
|
||||
elseif (HistoryPanelObject.NowShowing == 2 and TimeAttack.data.history [index].note) then
|
||||
NoteInsertField:SetText (TimeAttack.data.history [index].note)
|
||||
elseif (HistoryPanelObject.NowShowing == 2 and TimeAttack.db.history [index].note) then
|
||||
NoteInsertField:SetText (TimeAttack.db.history [index].note)
|
||||
else
|
||||
NoteInsertField:SetText ("")
|
||||
end
|
||||
@@ -470,21 +482,26 @@ local function CreatePluginFrames (data)
|
||||
LabelText:SetPoint ("right", LabelBackground.frame, 0, 0)
|
||||
LabelText:SetJustifyH ("right")
|
||||
|
||||
local RowNumber = DetailsFrameWork:NewLabel (LabelBackground.frame, LabelBackground.frame, nil, "rownumber", "#1", "GameFontHighlightSmall")
|
||||
RowNumber:SetPoint ("left", LabelBackground.frame)
|
||||
RowNumber:SetJustifyH ("left")
|
||||
|
||||
--local LabelRemoveButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, remove, index, index, 10, 10, "Interface\\PetBattles\\DeadPetIcon")
|
||||
local LabelRemoveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackRemoveButton"..index, "RemoveButton"..index, 10, 10, remove, index, index, "Interface\\PetBattles\\DeadPetIcon")
|
||||
LabelRemoveButton:SetPoint ("left", LabelBackground.frame)
|
||||
local LabelRemoveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackRemoveButton"..index, "RemoveButton"..index, 12, 12, remove, index, index, "Interface\\PetBattles\\DeadPetIcon")
|
||||
LabelRemoveButton:SetPoint ("left", LabelBackground.frame, "left", 16, 0)
|
||||
LabelRemoveButton.tooltip = Loc ["STRING_REMOVERECORD"]
|
||||
|
||||
--local LabelSaveButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, save, index, index, 10, 10, "Interface\\Scenarios\\ScenarioIcon-Check")
|
||||
local LabelSaveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSaveButton"..index, "SaveButton"..index, 10, 10, save, index, index, "Interface\\Scenarios\\ScenarioIcon-Check")
|
||||
LabelSaveButton:SetPoint ("left", LabelRemoveButton.button, "right", 0, 0)
|
||||
local LabelSaveButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSaveButton"..index, "SaveButton"..index, 12, 12, save, index, index, "Interface\\Scenarios\\ScenarioIcon-Check")
|
||||
LabelSaveButton:SetPoint ("left", LabelRemoveButton.button, "right", -1, 0)
|
||||
LabelSaveButton.tooltip = Loc ["STRING_SAVERECORD"]
|
||||
|
||||
--local LabelSetnoteButton = DetailsFrameWork:NewDetailsButton (LabelBackground.frame, LabelBackground.frame, _, WriteNoteStart, index, index, 10, 10, "Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
|
||||
local LabelSetnoteButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSetNoteButton"..index, "SetNoteButton"..index, 10, 10, WriteNoteStart, index, index, "Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
|
||||
LabelSetnoteButton:SetPoint ("left", LabelSaveButton.button, "right", 0, 0)
|
||||
local LabelSetnoteButton = DetailsFrameWork:NewButton (LabelBackground.frame, nil, "DetailsTimeAttackSetNoteButton"..index, "SetNoteButton"..index, 12, 12, WriteNoteStart, index, index, "Interface\\Buttons\\UI-GuildButton-PublicNote-Disabled")
|
||||
LabelSetnoteButton:SetPoint ("left", LabelSaveButton.button, "right", -2, 0)
|
||||
LabelSetnoteButton.tooltip = Loc ["STRING_SETNOTE"]
|
||||
|
||||
LabelBoxObject.rownumber = RowNumber
|
||||
LabelBoxObject.text = LabelText
|
||||
LabelBoxObject.background = LabelBackground
|
||||
LabelBoxObject.remove = LabelRemoveButton
|
||||
@@ -523,7 +540,7 @@ local function CreatePluginFrames (data)
|
||||
end
|
||||
|
||||
elseif (self.NowShowing == 2) then
|
||||
for index, AttemptTable in ipairs (TimeAttack.data.history) do
|
||||
for index, AttemptTable in ipairs (TimeAttack.db.history) do
|
||||
local thisLabel = self.LabelsCreated [index]
|
||||
if (not thisLabel) then
|
||||
thisLabel = self:CreateNewLabel (index)
|
||||
@@ -531,7 +548,7 @@ local function CreatePluginFrames (data)
|
||||
thisLabel:RefreshLabel (AttemptTable, true)
|
||||
end
|
||||
|
||||
for amt = #TimeAttack.data.history+1, #self.LabelsCreated do
|
||||
for amt = #TimeAttack.db.history+1, #self.LabelsCreated do
|
||||
local thisLabel = self.LabelsCreated [amt]
|
||||
thisLabel.background:Hide()
|
||||
end
|
||||
@@ -660,21 +677,64 @@ local function CreatePluginFrames (data)
|
||||
|
||||
end
|
||||
|
||||
function TimeAttack:CheckTimeAttackTutorial()
|
||||
--TimeAttack:SetTutorialCVar ("TIME_ATTACK_TUTORIAL1", nil)
|
||||
if (not TimeAttack:GetTutorialCVar ("TIME_ATTACK_TUTORIAL1")) then
|
||||
TimeAttackFrame:RegisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
end
|
||||
end
|
||||
|
||||
function TimeAttack:CheckTargetForTutorial()
|
||||
local guid = UnitGUID ("target")
|
||||
if (guid) then
|
||||
local mobid = tonumber (guid:sub (6, 10), 16)
|
||||
if (mobid == 31144 or mobid == 32666 or mobid == 31146 or mobid == 32667 or mobid == 67127 or mobid == 46647) then
|
||||
TimeAttack:SetTutorialCVar ("TIME_ATTACK_TUTORIAL1", true)
|
||||
TimeAttackFrame:UnregisterEvent ("PLAYER_TARGET_CHANGED")
|
||||
TimeAttack:ShowTargetTutorial()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function TimeAttack:ShowTargetTutorial()
|
||||
if (TimeAttack:GetFreeInstancesAmount() > 0) then
|
||||
local func = function()
|
||||
local newinstance = TimeAttack:CreateInstance (true) --> force create a new one
|
||||
if (newinstance) then
|
||||
newinstance:SetMode (DETAILS_MODE_SOLO)
|
||||
TimeAttack.SoloTables:switch (nil, "DETAILS_PLUGIN_TIME_ATTACK")
|
||||
end
|
||||
end
|
||||
TimeAttack:GetFramework():ShowTutorialAlertFrame ("Open Time Attack", "plugin for measure dps", func)
|
||||
end
|
||||
end
|
||||
|
||||
function TimeAttack:OnEvent (_, event, ...)
|
||||
|
||||
if (event == "ADDON_LOADED") then
|
||||
if (event == "PLAYER_TARGET_CHANGED") then
|
||||
TimeAttack:CheckTargetForTutorial()
|
||||
|
||||
elseif (event == "ADDON_LOADED") then
|
||||
local AddonName = select (1, ...)
|
||||
if (AddonName == "Details_TimeAttack") then
|
||||
|
||||
if (_G._detalhes) then
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames (_detalhes_databaseTimeAttack)
|
||||
|
||||
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
|
||||
|
||||
local default_settings = {
|
||||
time = 60,
|
||||
dps = 0,
|
||||
history = {},
|
||||
}
|
||||
|
||||
if (_detalhes_databaseTimeAttack) then
|
||||
default_settings.history = _detalhes_databaseTimeAttack.history
|
||||
_detalhes_databaseTimeAttack = nil
|
||||
end
|
||||
|
||||
--> Install
|
||||
local install = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.04")
|
||||
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.04", default_settings)
|
||||
if (type (install) == "table" and install.error) then
|
||||
print (install.errortext)
|
||||
return
|
||||
@@ -683,10 +743,10 @@ function TimeAttack:OnEvent (_, event, ...)
|
||||
--> Register needed events
|
||||
_G._detalhes:RegisterEvent (TimeAttack, "COMBAT_PLAYER_ENTER")
|
||||
|
||||
--> create widgets
|
||||
CreatePluginFrames()
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
elseif (event == "PLAYER_LOGOUT") then
|
||||
_detalhes_databaseTimeAttack = TimeAttack.data
|
||||
end
|
||||
end
|
||||
|
||||
@@ -378,14 +378,18 @@ local function CreatePluginFrames (data)
|
||||
thisRow:SetRightText (ThreatMeter:ToK2 (threat_actor [6]) .. " (" .. _cstr ("%.1f", pct) .. "%)")
|
||||
thisRow:SetValue (pct)
|
||||
|
||||
if (index == 2) then
|
||||
thisRow:SetColor (pct*0.01, _math_abs (pct-100)*0.01, 0, 1)
|
||||
if (ThreatMeter.options.useplayercolor and threat_actor [1] == player) then
|
||||
thisRow:SetColor (_unpack (ThreatMeter.options.playercolor))
|
||||
else
|
||||
thisRow:SetColor (pct*0.01, _math_abs (pct-100)*0.01, 0, .3)
|
||||
if (pct >= 50) then
|
||||
thisRow:SetColor ( 1, _math_abs (pct - 100)/100, 0, 1)
|
||||
if (index == 2) then
|
||||
thisRow:SetColor (pct*0.01, _math_abs (pct-100)*0.01, 0, 1)
|
||||
else
|
||||
thisRow:SetColor (pct/100, 1, 0, 1)
|
||||
thisRow:SetColor (pct*0.01, _math_abs (pct-100)*0.01, 0, .3)
|
||||
if (pct >= 50) then
|
||||
thisRow:SetColor ( 1, _math_abs (pct - 100)/100, 0, 1)
|
||||
else
|
||||
thisRow:SetColor (pct/100, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -412,7 +416,11 @@ local function CreatePluginFrames (data)
|
||||
thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role]))
|
||||
thisRow:SetRightText (ThreatMeter:ToK2 (threat_actor [6]) .. " (" .. _cstr ("%.1f", threat_actor [2]) .. "%)")
|
||||
thisRow:SetValue (threat_actor [2])
|
||||
thisRow:SetColor (threat_actor [2]*0.01, _math_abs (threat_actor [2]-100)*0.01, 0, .3)
|
||||
if (ThreatMeter.options.useplayercolor) then
|
||||
thisRow:SetColor (_unpack (ThreatMeter.options.playercolor))
|
||||
else
|
||||
thisRow:SetColor (threat_actor [2]*0.01, _math_abs (threat_actor [2]-100)*0.01, 0, .3)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -535,6 +543,23 @@ local build_options_panel = function()
|
||||
name = "Update Speed",
|
||||
usedecimals = true,
|
||||
},
|
||||
{
|
||||
type = "toggle",
|
||||
get = function() return ThreatMeter.saveddata.useplayercolor end,
|
||||
set = function (self, fixedparam, value) ThreatMeter.saveddata.useplayercolor = value end,
|
||||
desc = "When enabled, your bar get the following color.",
|
||||
name = "Player Color Enabled"
|
||||
},
|
||||
{
|
||||
type = "color",
|
||||
get = function() return ThreatMeter.saveddata.playercolor end,
|
||||
set = function (self, r, g, b, a)
|
||||
local current = ThreatMeter.saveddata.playercolor
|
||||
current[1], current[2], current[3], current[4] = r, g, b, a
|
||||
end,
|
||||
desc = "If Player Color is enabled, your bar have this color.",
|
||||
name = "Color"
|
||||
},
|
||||
}
|
||||
|
||||
_detalhes.gump:BuildMenu (options_frame, menu, 15, -65, 260)
|
||||
@@ -598,6 +623,8 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
ThreatMeter.saveddata.updatespeed = ThreatMeter.saveddata.updatespeed or 1
|
||||
ThreatMeter.saveddata.animate = ThreatMeter.saveddata.animate or false
|
||||
ThreatMeter.saveddata.showamount = ThreatMeter.saveddata.showamount or false
|
||||
ThreatMeter.saveddata.useplayercolor = ThreatMeter.saveddata.useplayercolor or false
|
||||
ThreatMeter.saveddata.playercolor = ThreatMeter.saveddata.playercolor or {1, 1, 1}
|
||||
|
||||
ThreatMeter.options = ThreatMeter.saveddata
|
||||
|
||||
@@ -631,17 +658,12 @@ function ThreatMeter:OnEvent (_, event, ...)
|
||||
elseif (command == Loc ["STRING_SLASH_AMOUNT"]) then
|
||||
|
||||
else
|
||||
|
||||
ThreatMeter:Msg (Loc ["STRING_COMMAND_LIST"])
|
||||
print ("|cffffaeae/tinythreat " .. Loc ["STRING_SLASH_SPEED"] .. "|r: " .. Loc ["STRING_SLASH_SPEED_DESC"])
|
||||
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
ThreatMeter.initialized = true
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+1
-1
@@ -432,6 +432,6 @@ function _G._detalhes:Start()
|
||||
if (self.is_first_run) then
|
||||
_detalhes:OpenWelcomeWindow()
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user