diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua index 690bf8c3..a6240038 100644 --- a/Libs/NickTag-1.0/NickTag-1.0.lua +++ b/Libs/NickTag-1.0/NickTag-1.0.lua @@ -4,7 +4,7 @@ -- NickTag:SetNickname (name) -> set the player nick name, after set nicktag will broadcast the nick over addon guild channel. -- -local major, minor = "NickTag-1.0", 4 +local major, minor = "NickTag-1.0", 5 local NickTag, oldminor = LibStub:NewLibrary (major, minor) if (not NickTag) then @@ -35,6 +35,10 @@ end local CONST_COMM_LOGONREVISION = 2 local CONST_COMM_REQUESTPERSONA = 3 + NICKTAG_DEFAULT_AVATAR = [[Interface\EncounterJournal\UI-EJ-BOSS-Default]] + NICKTAG_DEFAULT_BACKGROUND = [[Interface\PetBattles\Weather-ArcaneStorm]] + NICKTAG_DEFAULT_BACKGROUND_CORDS = {0.129609375, 1, 1, 0} + ------------------------------------------------------------------------------------------------------------------------------------------------------ --> library stuff @@ -878,6 +882,7 @@ end --> choose avatar window do local avatar_pick_frame = CreateFrame ("frame", "AvatarPickFrame", UIParent) + avatar_pick_frame:SetFrameStrata ("DIALOG") avatar_pick_frame:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 32, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}}) avatar_pick_frame:SetWidth (460) avatar_pick_frame:SetHeight (240) diff --git a/boot.lua b/boot.lua index 372efc9f..b484be93 100644 --- a/boot.lua +++ b/boot.lua @@ -8,7 +8,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.userversion = "v1.11.06" + _detalhes.userversion = "v1.11.10" _detalhes.version = "Alpha 016" _detalhes.realversion = 16 @@ -63,6 +63,8 @@ do _detalhes.skins = {} --> armazena os hooks das funções do parser _detalhes.hooks = {} + --> informações sobre a luta do boss atual + _detalhes.encounter_table = {} --> Plugins --> raid ------------------------------------------------------------------- diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index a86eb8c4..fde0c864 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -19,7 +19,9 @@ local _type = type --api locals local _GetSpellInfo = _detalhes.getspellinfo local GameTooltip = GameTooltip - +local _IsInRaid = IsInRaid +local _IsInGroup = IsInGroup + local _detalhes = _G._detalhes local AceLocale = LibStub ("AceLocale-3.0") local Loc = AceLocale:GetLocale ( "Details" ) @@ -295,7 +297,7 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra) if (classe == "UNKNOW") then GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1) else - GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) + GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) end GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3) end @@ -306,13 +308,13 @@ function _detalhes:ToolTipFrags (instancia, frag, esta_barra) else GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white") - GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"])) + GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"])) GameCooltip:ShowCooltip() end else GameCooltip:AddLine (Loc ["STRING_NO_DATA"], nil, 1, "white") - GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"])) + GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords ["UNKNOW"])) GameCooltip:ShowCooltip() end @@ -381,7 +383,7 @@ function atributo_damage:AtualizarFrags (tabela, qual_barra, colocacao, instanci esta_barra.icone_classe:SetTexCoord (.25, .5, 0, 1) esta_barra.icone_classe:SetVertexColor (1, 1, 1) else - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (_detalhes.class_coords [tabela [3]])) esta_barra.icone_classe:SetVertexColor (1, 1, 1) end @@ -906,24 +908,97 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex local combat_time = instancia.showing:GetCombatTime() + local use_total_bar = false + if (instancia.total_bar.enabled) then + + use_total_bar = true + + if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then + use_total_bar = false + end + + if (sub_atributo > 4) then --enemies, frags, void zones + use_total_bar = false + end + + end + if (instancia.bars_sort_direction == 1) then --top to bottom - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + + if (use_total_bar and instancia.barraS[1] == 1) then + + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + + else + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end end elseif (instancia.bars_sort_direction == 2) then --bottom to top - for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado - conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + + if (use_total_bar and instancia.barraS[1] == 1) then + + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + + else + for i = instancia.barraS[2], instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end end end end - - if (instancia.atributo == 5) then --> custom --> zerar o .custom dos Actors for index, player in _ipairs (conteudo) do @@ -1220,12 +1295,12 @@ end esta_barra.icone_classe:SetVertexColor (1, 1, 1) elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) else - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method esta_barra.icone_classe:SetVertexColor (1, 1, 1) end @@ -1569,7 +1644,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra) if (classe == "UNKNOW") then GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1) else - GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\classes_small", nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) + GameCooltip:AddIcon (instancia.row_info.icon_file, nil, nil, 14, 14, _unpack (_detalhes.class_coords [classe])) end GameCooltip:AddStatusBar (100, 1, .1, .1, .1, .3) end diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index c1eec998..1dbe32e9 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -21,6 +21,8 @@ local _type = type --api locals local _GetSpellInfo = _detalhes.getspellinfo local GameTooltip = GameTooltip +local _IsInRaid = IsInRaid +local _IsInGroup = IsInGroup local _detalhes = _G._detalhes local AceLocale = LibStub ("AceLocale-3.0") @@ -278,18 +280,92 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex local qual_barra = 1 local barras_container = instancia.barras + local combat_time = instancia.showing:GetCombatTime() + + local use_total_bar = false + if (instancia.total_bar.enabled) then + + use_total_bar = true + + if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then + use_total_bar = false + end + + if (sub_atributo > 4) then --enemies, frags, void zones + use_total_bar = false + end + + end + if (instancia.bars_sort_direction == 1) then --top to bottom - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + if (use_total_bar and instancia.barraS[1] == 1) then + + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + + else + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end end elseif (instancia.bars_sort_direction == 2) then --bottom to top - for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado - conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 - end + if (use_total_bar and instancia.barraS[1] == 1) then + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + + else + for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + end end if (instancia.atributo == 5) then --> custom @@ -482,12 +558,12 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize) esta_barra.icone_classe:SetVertexColor (1, 1, 1) elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) else - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method esta_barra.icone_classe:SetVertexColor (1, 1, 1) end diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 288d2c48..b3e542b8 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -19,7 +19,8 @@ local _bit_band = bit.band local _math_min = math.min --api locals local _GetSpellInfo = _detalhes.getspellinfo - +local _IsInRaid = IsInRaid +local _IsInGroup = IsInGroup local _detalhes = _G._detalhes local _ @@ -334,10 +335,82 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo local combat_time = instancia.showing:GetCombatTime() + local use_total_bar = false + if (instancia.total_bar.enabled) then + + use_total_bar = true + + if (instancia.total_bar.only_in_group and (not _IsInGroup() and not _IsInRaid())) then + use_total_bar = false + end + + if (sub_atributo > 6) then --enemies, frags, void zones + use_total_bar = false + end + + end + if (instancia.bars_sort_direction == 1) then --top to bottom - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + + if (use_total_bar and instancia.barraS[1] == 1) then + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = instancia.barraS[1], iter_last, 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + else + + if (use_total_bar and instancia.barraS[1] == 1) then + + qual_barra = 2 + local iter_last = instancia.barraS[2] + if (iter_last == instancia.rows_fit_in_window) then + iter_last = iter_last - 1 + end + + local row1 = barras_container [1] + row1.minha_tabela = nil + row1.texto_esquerdo:SetText (Loc ["STRING_TOTAL"]) + row1.texto_direita:SetText (_detalhes:ToK2 (total) .. " (" .. _detalhes:ToK (total / combat_time) .. ")") + + row1.statusbar:SetValue (100) + local r, b, g = unpack (instancia.total_bar.color) + row1.textura:SetVertexColor (r, b, g) + + row1.icone_classe:SetTexture (instancia.total_bar.icon) + row1.icone_classe:SetTexCoord (0.0625, 0.9375, 0.0625, 0.9375) + + gump:Fade (row1, "out") + + for i = iter_last, instancia.barraS[1], -1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + else + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado + conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + end end elseif (instancia.bars_sort_direction == 2) then --bottom to top @@ -618,12 +691,12 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize) esta_barra.icone_classe:SetVertexColor (1, 1, 1) elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) else - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method esta_barra.icone_classe:SetVertexColor (1, 1, 1) end diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 8eebd799..c2cdbe26 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -788,6 +788,31 @@ end new_instance:ShowSideBars() + --> apply standard skin if have one saved + if (_detalhes.standard_skin) then + + local style = _detalhes.standard_skin + local instance = new_instance + local skin = style.skin + + instance.skin = "" + instance:ChangeSkin (skin) + + --> overwrite all instance parameters with saved ones + for key, value in pairs (style) do + if (key ~= "skin") then + if (type (value) == "table") then + instance [key] = table_deepcopy (value) + else + instance [key] = value + end + end + end + + --> apply all changed attributes + instance:ChangeSkin() + end + return new_instance end ------------------------------------------------------------------------------------------------------------------------ @@ -916,7 +941,7 @@ function _detalhes:InstanceReset (instance) self:AtualizaSegmentos (self) self:AtualizaSoloMode_AfertReset() self:ResetaGump() - _detalhes:AtualizaGumpPrincipal (-1, true) --atualiza todas as instancias + _detalhes:AtualizaGumpPrincipal (self, true) --atualiza todas as instancias end function _detalhes:RefreshBars (instance) diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 4d0cfd17..c6cbc11f 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -16,6 +16,17 @@ function _detalhes:LoadInstanceConfig() else self [key] = value end + + elseif (type (value) == "table") then + for key2, value2 in pairs (value) do + if (self [key] [key2] == nil) then + if (type (value2) == "table") then + self [key] [key2] = table_deepcopy (_detalhes.instance_defaults [key] [key2]) + else + self [key] [key2] = value2 + end + end + end end end end @@ -59,12 +70,17 @@ _detalhes.instance_defaults = { menu_anchor = {5, 1}, --instance button anchor store the anchor point of instance and delete button instance_button_anchor = {-27, 1}, + --total bar + total_bar = {enabled = false, color = {1, 1, 1}, only_in_group = true, icon = [[Interface\ICONS\INV_Sigil_Thorim]]}, + --row info row_info = { --if true the texture of the bars will have the color of his actor class texture_class_colors = true, --if texture class color are false, this color will be used fixed_texture_color = {0, 0, 0}, + --row alpha + alpha = 1, --left text class color textL_class_colors = false, --right text class color @@ -98,7 +114,9 @@ _detalhes.instance_defaults = { --fixed texture color for background texture fixed_texture_background_color = {0, 0, 0, 0}, --space between bars - space = {left = 3, right = -5, between = 1} + space = {left = 3, right = -5, between = 1}, + --icon file + icon_file = [[Interface\AddOns\Details\images\classes_small]], }, --instance window color diff --git a/classes/classe_others.lua b/classes/classe_others.lua index ca592daa..e040045a 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -362,7 +362,7 @@ function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instanc gump:Fade (esta_barra, "out") end esta_barra.textura:SetVertexColor (_unpack (_detalhes.class_colors [morte[4]])) - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]])) if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip @@ -777,12 +777,12 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize) esta_barra.icone_classe:SetVertexColor (1, 1, 1) elseif (self.classe == "PET") then - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (0.25, 0.49609375, 0.75, 1) esta_barra.icone_classe:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) else - esta_barra.icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + esta_barra.icone_classe:SetTexture (instancia.row_info.icon_file) esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [self.classe])) --very slow method esta_barra.icone_classe:SetVertexColor (1, 1, 1) end diff --git a/classes/container_pets.lua b/classes/container_pets.lua index 5b2decdd..5ff0f0e8 100644 --- a/classes/container_pets.lua +++ b/classes/container_pets.lua @@ -177,11 +177,21 @@ end -- 4372 = 1114 -> pet control player -> friendly -> aff raid function container_pets:Adicionar (pet_serial, pet_nome, pet_flags, dono_serial, dono_nome, dono_flags) + + --if (pet_nome == "Guardian of Ancient Kings") then --remover + -- print ("Summon GAK 2", dono_nome) + --end if (pet_flags and _bit_band (pet_flags, OBJECT_TYPE_PET) ~= 0 and _bit_band (pet_flags, EM_GRUPO) ~= 0) then self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo, true} + --if (pet_nome == "Guardian of Ancient Kings") then --remover + -- print ("Summon GAK 3 - TRUE", dono_nome) + --end else self.pets [pet_serial] = {dono_nome, dono_serial, dono_flags, _detalhes._tempo} + --if (pet_nome == "Guardian of Ancient Kings") then --remover + -- print ("Summon GAK 3 - FALSE", dono_nome) + --end end --if (fromSearch) then diff --git a/core/control.lua b/core/control.lua index 201092f9..d45d96fe 100644 --- a/core/control.lua +++ b/core/control.lua @@ -87,6 +87,19 @@ return --no need to check end + if (_detalhes.encounter_table.name) then + _detalhes.tabela_vigente.is_boss = { + index = _detalhes.encounter_table.index, + name = _detalhes.encounter_table.name, + zone = _detalhes.encounter_table.zone, + mapid = _detalhes.encounter_table.mapid, + encounter = _detalhes.encounter_table.name, + diff = _detalhes.encounter_table.diff + } + _detalhes:SendEvent ("COMBAT_BOSS_FOUND", nil, _detalhes.tabela_vigente.is_boss.index, _detalhes.tabela_vigente.is_boss.name) + return _detalhes.tabela_vigente.is_boss + end + for index = 1, 5, 1 do if (_UnitExists ("boss"..index)) then local guid = _UnitGUID ("boss"..index) @@ -169,10 +182,21 @@ --try to get the encounter name after the encounter (can be called during the combat as well) function _detalhes:FindBoss() + if (_detalhes.encounter_table.name) then + return { + index = _detalhes.encounter_table.index, + name = _detalhes.encounter_table.name, + zone = _detalhes.encounter_table.zone, + mapid = _detalhes.encounter_table.mapid, + encounter = _detalhes.encounter_table.name, + diff = _detalhes.encounter_table.diff + } + end + local ZoneName, _, DifficultyID, _, _, _, _, ZoneMapID = _GetInstanceInfo() local BossIds = _detalhes:GetBossIds (ZoneMapID) - if (BossIds) then + if (BossIds) then local BossIndex = nil local ActorsContainer = _detalhes.tabela_vigente [class_type_dano]._ActorTable @@ -340,7 +364,7 @@ end end - function _detalhes:SairDoCombate (bossKilled) + function _detalhes:SairDoCombate (bossKilled, from_encounter_end) if (_detalhes.debug) then _detalhes:Msg ("(debug) ended a combat.") @@ -392,6 +416,14 @@ _detalhes.tabela_vigente.verifica_combate = nil end + --> lock timers + _detalhes.tabela_vigente:TravarTempos() + + _detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta + _detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta + _detalhes.tabela_vigente:seta_tempo_decorrido() --> salva o end_time + _detalhes.tabela_overall:seta_tempo_decorrido() --seta o end_time + if (not _detalhes.tabela_vigente.is_boss) then local inimigo = _detalhes:FindEnemy() @@ -424,6 +456,13 @@ if (bossKilled) then _detalhes.tabela_vigente.is_boss.killed = true end + + if (from_encounter_end) then + + --_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"] + _detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"] + + end --> encounter boss function local bossFunction, bossFunctionType = _detalhes:GetBossFunction (_detalhes.tabela_vigente.is_boss.mapid, _detalhes.tabela_vigente.is_boss.index) @@ -456,13 +495,7 @@ end end - --> lock timers - _detalhes.tabela_vigente:TravarTempos() - - _detalhes.tabela_vigente:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta - _detalhes.tabela_overall:seta_data (_detalhes._detalhes_props.DATA_TYPE_END) --> salva hora, minuto, segundo do fim da luta - _detalhes.tabela_vigente:seta_tempo_decorrido() --> salva o end_time - _detalhes.tabela_overall:seta_tempo_decorrido() --seta o end_time + if (_detalhes.solo) then --> debuffs need a checkup, not well functional right now diff --git a/core/parser.lua b/core/parser.lua index 7be621a1..74cd24c0 100644 --- a/core/parser.lua +++ b/core/parser.lua @@ -21,7 +21,7 @@ local _IsInRaid = IsInRaid --wow api local local _IsInGroup = IsInGroup --wow api local local _GetNumGroupMembers = GetNumGroupMembers --wow api local - local _UnitGroupRolesAssigned = UnitGroupRolesAssigned + local _UnitGroupRolesAssigned = UnitGroupRolesAssigned --wow api local local _cstr = string.format --lua local local _table_insert = table.insert --lua local @@ -220,6 +220,10 @@ end + --if (who_name == "Guardian of Ancient Kings") then --remover + -- print ("MELEE GAK 1", meu_dono) + --end + --> damager shadow local shadow = este_jogador.shadow local shadow_of_target = jogador_alvo.shadow @@ -509,9 +513,12 @@ ----------------------------------------------------------------------------------------------------------------------------------------- --> SUMMON serach key: ~summon | ----------------------------------------------------------------------------------------------------------------------------------------- - function parser:summon (token, time, who_serial, who_name, who_flags, alvo_serial, alvo_name, alvo_flags, spellid, spellName) - + + --if (alvo_name == "Guardian of Ancient Kings") then --remover + -- print ("Summon GAK 1", who_name) + --end + --> pet summon another pet local sou_pet = _detalhes.tabela_pets.pets [who_serial] if (sou_pet) then --> okey, ja é um pet @@ -2214,7 +2221,8 @@ _current_combat.frags_need_refresh = true _overall_combat.frags_need_refresh = true - --> encounter end + --> encounter end --[[REMOVED]] it's deprecated since encounter end and start replace this + --[[ local encounter_type = _detalhes.encounter.type if (encounter_type) then if (encounter_type == 1 or encounter_type == 2) then @@ -2254,7 +2262,8 @@ end end - + --]] + --> player death elseif (not _UnitIsFeignDeath (alvo_name)) then if ( @@ -2376,8 +2385,6 @@ end end - - ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> core @@ -2597,6 +2604,85 @@ return + elseif (evento == "ENCOUNTER_START") then + --~encounter + + _table_wipe (_detalhes.encounter_table) + + local encounterID, encounterName, difficultyID, raidSize = _select (1, ...) + local zoneName, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo() + + _detalhes.encounter_table ["start"] = time() + _detalhes.encounter_table ["end"] = nil + + _detalhes.encounter_table.id = encounterID + _detalhes.encounter_table.name = encounterName + _detalhes.encounter_table.diff = difficultyID + _detalhes.encounter_table.size = raidSize + _detalhes.encounter_table.zone = zoneName + _detalhes.encounter_table.mapid = zoneMapID + + local encounter_start_table = _detalhes:GetEncounterStartInfo (zoneMapID, encounterID) + if (encounter_start_table) then + if (encounter_start_table.delay) then + if (type (encounter_start_table.delay) == "function") then + local delay = encounter_start_table.delay() + if (delay) then + _detalhes.encounter_table ["start"] = time() + delay + end + else + _detalhes.encounter_table ["start"] = time() + encounter_start_table.delay + end + end + if (encounter_start_table.func) then + encounter_start_table:func() + end + end + + local encounter_table, boss_index = _detalhes:GetBossEncounterDetailsFromEncounterId (zoneMapID, encounterID) + if (encounter_table) then + _detalhes.encounter_table.index = boss_index + end + + elseif (evento == "ENCOUNTER_END") then + + if (not _detalhes.encounter_table.start) then + return + end + + _detalhes.encounter_table ["end"] = time() + + local encounterID, encounterName, difficultyID, raidSize, endStatus = _select (1, ...) + local _, _, _, _, _, _, _, zoneMapID = _GetInstanceInfo() + + local encounter_end_table = _detalhes:GetEncounterStartInfo (zoneMapID, encounterID) + if (encounter_end_table) then + if (encounter_end_table.delay) then + _detalhes.encounter_table ["end"] = _detalhes.encounter_table ["end"] + encounter_end_table.delay + end + if (encounter_end_table.func) then + encounter_end_table:func (_detalhes.tabela_vigente, endStatus) + end + end + + if (_in_combat) then + if (endStatus == 1) then + _detalhes.encounter_table.kill = true + _detalhes:SairDoCombate (true, true) --killed + else + _detalhes.encounter_table.kill = false + _detalhes:SairDoCombate (false, true) --wipe + end + else + if (_detalhes.tabela_vigente.end_time + 2 >= _detalhes.encounter_table ["end"]) then + --_detalhes.tabela_vigente.start_time = _detalhes.encounter_table ["start"] + _detalhes.tabela_vigente.end_time = _detalhes.encounter_table ["end"] + _detalhes:AtualizaGumpPrincipal (-1, true) + end + end + + _table_wipe (_detalhes.encounter_table) + elseif (evento == "CHAT_MSG_BG_SYSTEM_NEUTRAL") then local frase = _select (1, ...) @@ -2713,7 +2799,7 @@ end _detalhes.listener:SetScript ("OnEvent", _detalhes.OnEvent) - + function _detalhes:OnParserEvent (evento, time, token, hidding, who_serial, who_name, who_flags, who_flags2, alvo_serial, alvo_name, alvo_flags, alvo_flags2, ...) local funcao = token_list [token] if (funcao) then diff --git a/framework/dropdown.lua b/framework/dropdown.lua index b74688e8..e1e9285b 100644 --- a/framework/dropdown.lua +++ b/framework/dropdown.lua @@ -315,6 +315,13 @@ function DropDownMetaFunctions:Selected (_table) else self.icon:SetTexCoord (0, 1, 0, 1) end + + if (_table.iconcolor) then + self.icon:SetVertexColor (unpack (_table.iconcolor)) + else + self.icon:SetVertexColor (1, 1, 1, 1) + end + else self.label:SetPoint ("left", self.label:GetParent(), "left", 4, 0) end @@ -464,12 +471,20 @@ function DetailsDropDownOnMouseDown (button) _this_row.icon:SetTexture (_table.icon) if (_table.icon) then + _this_row.label:SetPoint ("left", _this_row.icon, "right", 5, 0) + if (_table.texcoord) then _this_row.icon:SetTexCoord (unpack (_table.texcoord)) else _this_row.icon:SetTexCoord (0, 1, 0, 1) end + + if (_table.iconcolor) then + _this_row.icon:SetVertexColor (unpack (_table.iconcolor)) + else + _this_row.icon:SetVertexColor (1, 1, 1, 1) + end else _this_row.label:SetPoint ("left", _this_row.statusbar, "left", 2, 0) end diff --git a/framework/panel.lua b/framework/panel.lua index 36120ff0..6240167c 100644 --- a/framework/panel.lua +++ b/framework/panel.lua @@ -594,6 +594,7 @@ function gump:IconPick (callback) gump.IconPickFrame = CreateFrame ("frame", "DetailsIconPickFrame", UIParent) tinsert (UISpecialFrames, "DetailsIconPickFrame") + gump.IconPickFrame:SetFrameStrata ("DIALOG") gump.IconPickFrame:SetPoint ("center", UIParent, "center") gump.IconPickFrame:SetWidth (350) diff --git a/framework/pictureedit.lua b/framework/pictureedit.lua index 827625ad..4ec6458a 100644 --- a/framework/pictureedit.lua +++ b/framework/pictureedit.lua @@ -7,6 +7,7 @@ local _ window:SetResizable (true) window:SetMovable (true) tinsert (UISpecialFrames, "DetailsImageEdit") + window:SetFrameStrata ("TOOLTIP") window.hooks = {} @@ -155,6 +156,7 @@ local _ buttonsBackground:Hide() --buttonsBackground:SetMovable (true) tinsert (UISpecialFrames, "DetailsImageEditButtonsBg") + buttonsBackground:SetFrameStrata ("TOOLTIP") local alphaFrameShown = false diff --git a/functions/boss.lua b/functions/boss.lua index 4cbaf3a9..53d6e85c 100644 --- a/functions/boss.lua +++ b/functions/boss.lua @@ -23,6 +23,30 @@ do return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].trash_ids end + --> return the boss table using a encounter id + function _detalhes:GetBossEncounterDetailsFromEncounterId (mapid, encounterid) + local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid] + if (bossindex) then + return _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex], bossindex + end + end + + --> return the table which contain information about the start of a encounter + function _detalhes:GetEncounterStartInfo (mapid, encounterid) + local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid] + if (bossindex) then + return _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].encounter_start + end + end + + --> return the table which contain information about the end of a encounter + function _detalhes:GetEncounterEndInfo (mapid, encounterid) + local bossindex = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounter_ids and _detalhes.EncounterInformation [mapid].encounter_ids [encounterid] + if (bossindex) then + return _detalhes.EncounterInformation [mapid].encounters [bossindex] and _detalhes.EncounterInformation [mapid].encounters [bossindex].encounter_end + end + end + --> return the function for the boss function _detalhes:GetEncounterEnd (mapid, bossindex) local t = _detalhes.EncounterInformation [mapid] and _detalhes.EncounterInformation [mapid].encounters [bossindex] diff --git a/functions/savedata.lua b/functions/savedata.lua index 00eaf620..c41d0c7f 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -120,6 +120,7 @@ end _detalhes_global = _detalhes_global or {} _detalhes_global.savedStyles = _detalhes.savedStyles + _detalhes_global.standard_skin = _detalhes.standard_skin _detalhes_global.got_first_run = true --max segments _detalhes_global.segments_amount = _detalhes.segments_amount @@ -340,7 +341,10 @@ end --]] if (_detalhes_global) then --saved styles --vardump (_detalhes_global.savedStyles) + _detalhes.savedStyles = _detalhes_global.savedStyles or _detalhes.savedStyles + _detalhes.standard_skin = _detalhes_global.standard_skin + if (not _detalhes_global.got_first_run) then _detalhes.is_first_run = true end @@ -398,7 +402,7 @@ function _detalhes:ApplyConfigDataOnLoad() self.deadlog_limit = self.deadlog_limit or 12 self.minimum_combat_time = self.minimum_combat_time or 5 self.update_speed = self.update_speed or 1 - self.time_type = self.time_type or 1 + self.time_type = self.time_type or 2 self.row_fade_in = self.row_fade_in or {"in", 0.2} self.row_fade_out = self.row_fade_out or {"out", 0.2} self.windows_fade_in = self.windows_fade_in or {"in", 0.2} @@ -467,7 +471,7 @@ function _detalhes:ApplyConfigDataOnLoad() self.trash_concatenate = false end if (type (self.trash_auto_remove) ~= "boolean") then - self.trash_auto_remove = false + self.trash_auto_remove = true end if (type (self.only_pvp_frags) ~= "boolean") then diff --git a/functions/skins.lua b/functions/skins.lua index c75f70cd..8d9c4b78 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -327,4 +327,85 @@ local _ t:SetTexCoord (.4, 1, 0, 1) t2:SetTexCoord (0, .4, 0, 1) --]] + + + _detalhes:InstallSkin ("ElvUI Frame Style", { + file = [[Interface\AddOns\Details\images\skins\elvui]], + author = "Details!", + version = "1.0", + site = "unknown", + desc = "a flat skin", + + --general + can_change_alpha_head = true, + + --icon anchors + icon_anchor_main = {-1, -5}, + icon_anchor_plugins = {-7, -13}, + icon_plugins_size = {19, 18}, + + --micro frames + micro_frames = {color = {.7, .7, .7, 1}, font = "Arial Narrow", size = 11}, + + --reset button + reset_button_coords = {0.01904296875, 0.0673828125, 0.50244140625, 0.51708984375}, + reset_button_small_coords = {0.11669921875, 0.13720703125, 0.50244140625, 0.51708984375}, + + --instance button + instance_button_coords = {0.01904296875, 0.04736328125, 0.48388671875, 0.49853515625}, + + --close button + close_button_coords = {0.01904296875, 0.03369140625, 0.52197265625, 0.53662109375}, + close_button_size = {18, 18}, + + -- the four anchors (for when the toolbar is on the top side) + icon_point_anchor = {-35, -0.5}, + left_corner_anchor = {-107, 0}, + close_button_anchor = {-2, 0}, + right_corner_anchor = {96, 0}, + + -- the four anchors (for when the toolbar is on the bottom side) + icon_point_anchor_bottom = {-37, 12}, + left_corner_anchor_bottom = {-107, 0}, + close_button_anchor_bottom = {-2, 0}, + right_corner_anchor_bottom = {96, 0}, + + --[[ callback function execute after all changes on the window, first argument is this skin table, second is the instance where the skin was applied --]] + callback = function (self, instance) end, + --[[ control_script is a OnUpdate script, it start right after all changes on the window and also after the callback --]] + --[[ control_script_on_start run before the control_script, use it to reset values if needed --]] + control_script_on_start = nil, + control_script = nil, + + --instance overwrites + --[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]] + --[[ for the complete cprop list see the file classe_instancia_include.lua]] + instance_cprops = { + resetbutton_info = {text_color = {0.7, 0.7, 0.7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}}, + instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}}, + menu_anchor = {-18, 1}, + instance_button_anchor = {-27, 3}, + hide_icon = true, + desaturated_menu = true, + bg_alpha = 0.3, + row_info = {texture = "Details D'ictum", + texture_class_colors = false, + alpha = 1, + texture_background_class_color = false, + fixed_texture_color = {0, 0, 0}, + fixed_texture_background_color = {0, 0, 0, 0.30}, + space = {left = 1, right = -2, between = 0}, + }, + wallpaper = { + overlay = {0, 0, 0, 0.498038113117218}, + width = 227.1267691385938, + texcoord = {0.001000000014901161, 0.1710000038146973, 0.001000000014901161, 0.3539316177368164}, + enabled = true, + anchor = "all", + height = 89.00001440917025, + alpha = 0.4980392451398075, + texture = "Interface\\Glues\\CREDITS\\Badlands3", + } + } + }) \ No newline at end of file diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 23109ebc..9ea769db 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -1728,120 +1728,117 @@ function _detalhes.janela_info:monta_relatorio (botao) return instancia:envia_relatorio (report_lines) end +local row_on_enter = function (self) + if (info.fading_in or info.faded) then + return + end + + self.mouse_over = true + + --> aumenta o tamanho da barra + self:SetHeight (17) --> altura determinada pela instância + --> poe a barra com alfa 1 ao invés de 0.9 + self:SetAlpha(1) + + --> troca a cor da barra enquanto o mouse estiver em cima dela + self:SetBackdrop({ + --bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + self:SetBackdropBorderColor (0.666, 0.666, 0.666) + self:SetBackdropColor (0.0941, 0.0941, 0.0941) + + if (self.isAlvo) then --> monta o tooltip do alvo + --> talvez devesse escurecer a janela no fundo... pois o tooltip é transparente e pode confundir + GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + + -- ~erro + if (self.spellid == "enemies") then --> damage taken enemies + if (not self.minha_tabela or not self.minha_tabela:MontaTooltipDamageTaken (self, self._index)) then -- > poderia ser aprimerado para uma tailcall + return + end + + elseif (not self.minha_tabela or not self.minha_tabela:MontaTooltipAlvos (self, self._index)) then -- > poderia ser aprimerado para uma tailcall + return + + end + GameTooltip:Show() + + elseif (self.isMain) then + + if (IsShiftKeyDown()) then + if (type (self.show) == "number") then + GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") + GameTooltip:AddLine (Loc ["ABILITY_ID"] .. ": " .. self.show) + GameTooltip:Show() + end + end + + --> da zoom no icone + self.icone:SetWidth (17) + self.icone:SetHeight (17) + --> poe a alfa do icone em 1.0 + self.icone:SetAlpha (1) + + --> mostrar temporariamente o conteudo da barra nas caixas de detalhes + if (not info.mostrando) then --> não esta mostrando nada na direita + info.mostrando = self --> agora o mostrando é igual a esta barra + info.mostrando_mouse_over = true --> o conteudo da direta esta sendo mostrado pq o mouse esta passando por cima do bagulho e não pq foi clicado + info.showing = self._index --> diz o index da barra que esta sendo mostrado na direita + + info.jogador.detalhes = self.show --> minha tabela = jogador = jogador.detales = spellid ou nome que esta sendo mostrado na direita + info.jogador:MontaDetalhes (self.show, self) --> passa a spellid ou nome e a barra + end + end +end + +local row_on_leave = function (self) + if (self.fading_in or self.faded or not self:IsShown() or self.hidden) then + return + end + + self.mouse_over = false + + --> diminui o tamanho da barra + self:SetHeight (16) + --> volta com o alfa antigo da barra que era de 0.9 + self:SetAlpha(0.9) + + --> volto o background ao normal + self:SetBackdrop({ + bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + self:SetBackdropBorderColor (0, 0, 0, 0) + self:SetBackdropColor (0, 0, 0, 0) + + GameTooltip:Hide() + + if (self.isMain) then + --> retira o zoom no icone + self.icone:SetWidth (14) + self.icone:SetHeight (14) + --> volta com a alfa antiga da barra + self.icone:SetAlpha (0.8) + + --> remover o conteúdo que estava sendo mostrado na direita + if (info.mostrando_mouse_over) then + info.mostrando = nil + info.mostrando_mouse_over = false + info.showing = nil + + info.jogador.detalhes = nil + gump:HidaAllDetalheInfo() + end + end +end + local function SetBarraScripts (esta_barra, instancia, i) - esta_barra:SetScript ("OnEnter", --> MOUSE OVER - function (self) + esta_barra._index = i - if (info.fading_in or info.faded) then - return - end - - self.mouse_over = true + esta_barra:SetScript ("OnEnter", row_on_enter) + esta_barra:SetScript ("OnLeave", row_on_leave) - --> aumenta o tamanho da barra - self:SetHeight (17) --> altura determinada pela instância - --> poe a barra com alfa 1 ao invés de 0.9 - self:SetAlpha(1) - - --> troca a cor da barra enquanto o mouse estiver em cima dela - self:SetBackdrop({ - --bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", - edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", tile = true, tileSize = 16, edgeSize = 10, - insets = {left = 1, right = 1, top = 0, bottom = 1},}) - self:SetBackdropBorderColor (0.666, 0.666, 0.666) - self:SetBackdropColor (0.0941, 0.0941, 0.0941) - - if (self.isAlvo) then --> monta o tooltip do alvo - --> talvez devesse escurecer a janela no fundo... pois o tooltip é transparente e pode confundir - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") - - -- ~erro - if (self.spellid == "enemies") then --> damage taken enemies - if (not self.minha_tabela or not self.minha_tabela:MontaTooltipDamageTaken (self, i)) then -- > poderia ser aprimerado para uma tailcall - return - end - - elseif (not self.minha_tabela or not self.minha_tabela:MontaTooltipAlvos (self, i)) then -- > poderia ser aprimerado para uma tailcall - return - - end - GameTooltip:Show() - - elseif (self.isMain) then - - if (IsShiftKeyDown()) then - if (type (self.show) == "number") then - GameTooltip:SetOwner (self, "ANCHOR_TOPRIGHT") - GameTooltip:AddLine (Loc ["ABILITY_ID"] .. ": " .. self.show) - GameTooltip:Show() - end - end - - --> da zoom no icone - self.icone:SetWidth (17) - self.icone:SetHeight (17) - --> poe a alfa do icone em 1.0 - self.icone:SetAlpha (1) - - --> mostrar temporariamente o conteudo da barra nas caixas de detalhes - if (not info.mostrando) then --> não esta mostrando nada na direita - info.mostrando = self --> agora o mostrando é igual a esta barra - info.mostrando_mouse_over = true --> o conteudo da direta esta sendo mostrado pq o mouse esta passando por cima do bagulho e não pq foi clicado - info.showing = i --> diz o index da barra que esta sendo mostrado na direita - - --self:SetAlpha (1) -- não precisa isso pq ja tem la em cima - --self.minha_tabela.detalhes = self.show --> minha tabela = jogador = jogador.detales = spellid ou nome que esta sendo mostrado na direita - info.jogador.detalhes = self.show --> minha tabela = jogador = jogador.detales = spellid ou nome que esta sendo mostrado na direita - info.jogador:MontaDetalhes (self.show, self) --> passa a spellid ou nome e a barra - end - end - - end) - - esta_barra:SetScript ("OnLeave", --> MOUSE OUT - function (self) - - if (self.fading_in or self.faded or not self:IsShown() or self.hidden) then - return - end - - self.mouse_over = false - - --> diminui o tamanho da barra - self:SetHeight (16) - --> volta com o alfa antigo da barra que era de 0.9 - self:SetAlpha(0.9) - - --> volto o background ao normal - self:SetBackdrop({ - bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, - insets = {left = 1, right = 1, top = 0, bottom = 1},}) - self:SetBackdropBorderColor (0, 0, 0, 0) - self:SetBackdropColor (0, 0, 0, 0) - - GameTooltip:Hide() - - if (self.isMain) then - --> retira o zoom no icone - self.icone:SetWidth (14) - self.icone:SetHeight (14) - --> volta com a alfa antiga da barra - self.icone:SetAlpha (0.8) - - --> remover o conteúdo que estava sendo mostrado na direita - if (info.mostrando_mouse_over) then - info.mostrando = nil - info.mostrando_mouse_over = false - info.showing = nil - - info.jogador.detalhes = nil - gump:HidaAllDetalheInfo() - end - end - - end) - esta_barra:SetScript ("OnMouseDown", function (self) if (self.fading_in) then @@ -1947,6 +1944,26 @@ local function CriaTexturaBarra (instancia, barra) barra.textura:Show() end +local miniframe_func_on_enter = function (self) + local barra = self:GetParent() + if (barra.show and type (barra.show) == "number") then + local spellname = GetSpellInfo (barra.show) + if (spellname) then + GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetSpellByID (barra.show) + GameTooltip:Show() + end + end + + barra:GetScript("OnEnter")(barra) + +end + +local miniframe_func_on_leave = function (self) + GameTooltip:Hide() + self:GetParent():GetScript("OnLeave")(self:GetParent()) +end + function gump:CriaNovaBarraInfo1 (instancia, index) if (_detalhes.janela_info.barras1 [index]) then @@ -1974,6 +1991,13 @@ function gump:CriaNovaBarraInfo1 (instancia, index) CriaTexturaBarra (instancia, esta_barra) --> icone + esta_barra.miniframe = CreateFrame ("frame", nil, esta_barra) + esta_barra.miniframe:SetSize (14, 14) + esta_barra.miniframe:SetPoint ("RIGHT", esta_barra.textura, "LEFT", 20, 0) + + esta_barra.miniframe:SetScript ("OnEnter", miniframe_func_on_enter) + esta_barra.miniframe:SetScript ("OnLeave", miniframe_func_on_leave) + esta_barra.icone = esta_barra.textura:CreateTexture (nil, "OVERLAY") esta_barra.icone:SetWidth (14) esta_barra.icone:SetHeight (14) diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 13544339..f4f2f752 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -8,7 +8,7 @@ local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true) local g = _detalhes.gump local _ -local preset_version = 2 +local preset_version = 3 function _detalhes:OpenOptionsWindow (instance) @@ -20,28 +20,32 @@ function _detalhes:OpenOptionsWindow (instance) -- Details Overall ------------------------------------------------------------------------------------------------------------------------------------------------- local SLIDER_WIDTH = 130 - local DROPDOWN_WIDTH = 120 - local COLOR_BUTTON_WIDTH = 55 + local DROPDOWN_WIDTH = 160 + local COLOR_BUTTON_WIDTH = 160 -- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height - window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 717, 434) + window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 897, 592) window.instance = instance tinsert (UISpecialFrames, "DetailsOptionsWindow") + window:SetFrameStrata ("HIGH") window:SetPoint ("center", UIParent, "Center") window.locked = false window.close_with_right = true window.backdrop = nil - local background = g:NewImage (window, _, "$parentBackground", "background", 717, 434, [[Interface\AddOns\Details\images\options_window]]) + --x 9 897 y 9 592 + + local background = g:NewImage (window, _, "$parentBackground", "background", 897, 592, [[Interface\AddOns\Details\images\options_window]]) background:SetPoint (0, 0) background:SetDrawLayer ("border") - background:SetTexCoord (0, 0.699707, 0, 0.423828125) + --background:SetTexCoord (0.0087890625, 0.8759765625, 0.0087890625, 0.578125) + background:SetTexCoord (0, 0.8759765625, 0, 0.578125) local bigdog = g:NewImage (window, _, "$parentBackgroundBigDog", "backgroundBigDog", 180, 200, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]]) - bigdog:SetPoint ("bottomright", window, "bottomright", -8, 36) - bigdog:SetAlpha (.1) + bigdog:SetPoint ("bottomright", window, "bottomright", -8, 31) + bigdog:SetAlpha (.15) bigdog:SetTexCoord (1, 0, 0, 1) local window_icon = g:NewImage (window, _, "$parentWindowIcon", "windowicon", 58, 58, [[Interface\AddOns\Details\images\options_window]]) @@ -83,18 +87,19 @@ function _detalhes:OpenOptionsWindow (instance) local close_button = CreateFrame ("button", nil, window.widget, "UIPanelCloseButton") close_button:SetWidth (32) close_button:SetHeight (32) - close_button:SetPoint ("TOPRIGHT", window.widget, "TOPRIGHT", -3, -19) + close_button:SetPoint ("TOPRIGHT", window.widget, "TOPRIGHT", 0, -19) close_button:SetText ("X") close_button:SetFrameLevel (close_button:GetFrameLevel()+2) --> desc text (on the right) local info_text = g:NewLabel (window, nil, nil, "infotext", "", "GameFontNormal", 12) - info_text:SetPoint ("topleft", window, "topleft", 470, -97) - info_text.width = 200 + info_text:SetPoint ("topleft", window, "topleft", 560, -109) + info_text.width = 300 info_text.height = 280 info_text.align = "<" info_text.valign = "^" info_text.active = false + info_text.color = "white" --> select instance dropbox local onSelectInstance = function (_, _, instance) @@ -160,103 +165,191 @@ function _detalhes:OpenOptionsWindow (instance) local instances_string = g:NewLabel (window, nil, nil, "instancetext", Loc ["STRING_OPTIONS_EDITINSTANCE"], "GameFontNormal", 12) instances_string:SetPoint ("right", instances, "left", -2) - instances:Hide() - instances_string:Hide() + --instances:Hide() + --instances_string:Hide() --> left panel buttons local select_options = function (options_type) - - window:hide_options (1) - window:hide_options (2) - window:hide_options (3) - window:hide_options (4) + + window:hide_all_options() window:un_hide_options (options_type) editing.text = editing.options [options_type] - if (options_type == 1 or options_type == 2) then - instances:Show() - instances_string:Show() - else - instances:Hide() - instances_string:Hide() - end - -- ~altura - - if (options_type == 1) then - window.options [1][1].slider:SetMinMaxValues (0, 320) - elseif (options_type == 2) then - window.options [2][1].slider:SetMinMaxValues (0, 1300) - window.options [2][1].slider.scrollMax = 1300 - elseif (options_type == 3) then - window.options [3][1].slider:SetMinMaxValues (0, 180) - elseif (options_type == 4) then - window.options [4][1].slider:SetMinMaxValues (0, 320) + if (options_type == 12) then + window.options [12][1].slider:SetMinMaxValues (0, 320) info_text.text = "" end end local mouse_over_texture = g:NewImage (window, _, "$parentButtonMouseOver", "buttonMouseOver", 156, 22, [[Interface\AddOns\Details\images\options_window]]) - mouse_over_texture:SetTexCoord (0.006347, 0.170410, 0.528808, 0.563964) + --mouse_over_texture:SetTexCoord (0.006347, 0.170410, 0.528808, 0.563964) + mouse_over_texture:SetTexCoord (0.1044921875, 0.26953125, 0.6259765625, 0.662109375) mouse_over_texture:SetWidth (169) mouse_over_texture:SetHeight (37) mouse_over_texture:Hide() mouse_over_texture:SetBlendMode ("ADD") + + --> menu anchor textures - local g_settings_texture = {Normal = {0.006347, 0.150878, 0.406738, 0.436035}, Highlight = {0.006347, 0.150878, 0.437011, 0.467285}, Pushed = {0.006347, 0.150878, 0.469238, 0.499511}} - local g_settings = g:NewButton (window, _, "$parentGeneralSettingsButton", "g_settings", 150, 18, select_options, 0x1, nil, nil, Loc ["STRING_OPTIONS_GENERAL"]) - g_settings:SetPoint ("topleft", window, "topleft", 35, -140) - g_settings:SetHook ("OnEnter", function() - mouse_over_texture:SetPoint ("topleft", g_settings, "topleft", -10, 8) - mouse_over_texture:Show() - end) - g_settings:SetHook ("OnLeave", function() - mouse_over_texture:Hide() - end) - --g_settings:InstallCustomTexture () + --general settings + local g_settings = g:NewButton (window, _, "$parentGeneralSettingsButton", "g_settings", 150, 33, function() end, 0x1) + + g:NewLabel (window, _, "$parentgeneral_settings_text", "GeneralSettingsLabel", Loc ["STRING_OPTIONS_GENERAL"], "GameFontNormal", 12) + window.GeneralSettingsLabel:SetPoint ("topleft", g_settings, "topleft", 35, -11) - local g_appearance = g:NewButton (window, _, "$parentAppearanceButton", "g_appearance", 150, 18, select_options, 0x2, nil, nil, Loc ["STRING_OPTIONS_APPEARANCE"]) - g_appearance:SetPoint ("topleft", window, "topleft", 35, -200) - g_appearance:SetHook ("OnEnter", function() - mouse_over_texture:SetPoint ("topleft", g_appearance, "topleft", -10, 8) - mouse_over_texture:Show() - end) - g_appearance:SetHook ("OnLeave", function() - mouse_over_texture:Hide() - end) - --g_appearance:InstallCustomTexture () + local g_settings_texture = g:NewImage (window, _, "$parentGeneralSettingsTexture", "GeneralSettingsTexture", 160, 33, [[Interface\AddOns\Details\images\options_window]]) + g_settings_texture:SetTexCoord (0, 0.15625, 0.685546875, 0.7177734375) + g_settings_texture:SetPoint ("topleft", g_settings, "topleft", 0, 0) + + --apparance + local g_appearance = g:NewButton (window, _, "$parentAppearanceButton", "g_appearance", 150, 33, function() end, 0x2) + + g:NewLabel (window, _, "$parentappearance_settings_text", "AppearanceSettingsLabel", Loc ["STRING_OPTIONS_APPEARANCE"], "GameFontNormal", 12) + window.AppearanceSettingsLabel:SetPoint ("topleft", g_appearance, "topleft", 35, -11) - local g_performance = g:NewButton (window, _, "$parentPerformanceButton", "g_appearance", 150, 18, select_options, 0x3, nil, nil, Loc ["STRING_OPTIONS_PERFORMANCE"]) - g_performance:SetPoint ("topleft", window, "topleft", 35, -260) - g_performance:SetHook ("OnEnter", function() - mouse_over_texture:SetPoint ("topleft", g_performance, "topleft", -10, 8) - mouse_over_texture:Show() - end) - g_performance:SetHook ("OnLeave", function() - mouse_over_texture:Hide() - end) - --g_performance:InstallCustomTexture () + local g_appearance_texture = g:NewImage (window, _, "$parentAppearanceSettingsTexture", "AppearanceSettingsTexture", 160, 33, [[Interface\AddOns\Details\images\options_window]]) + g_appearance_texture:SetTexCoord (0, 0.15625, 0.71875, 0.7509765625) + g_appearance_texture:SetPoint ("topleft", g_appearance, "topleft", 0, 0) - local g_plugin = g:NewButton (window, _, "$parentPluginButton", "g_plugin", 150, 18, select_options, 0x4, nil, nil, Loc ["STRING_OPTIONS_PLUGINS"]) - g_plugin:SetPoint ("topleft", window, "topleft", 35, -320) - g_plugin:SetHook ("OnEnter", function() - mouse_over_texture:SetPoint ("topleft", g_plugin, "topleft", -10, 8) - mouse_over_texture:Show() - end) - g_plugin:SetHook ("OnLeave", function() - mouse_over_texture:Hide() - end) + --performance + local g_performance = g:NewButton (window, _, "$parentPerformanceButton", "g_appearance", 150, 33, function() end, 0x3) + + g:NewLabel (window, _, "$parentperformance_settings_text", "PerformanceSettingsLabel", Loc ["STRING_OPTIONS_PERFORMANCE"], "GameFontNormal", 12) + window.PerformanceSettingsLabel:SetPoint ("topleft", g_performance, "topleft", 35, -11) + + local g_performance_texture = g:NewImage (window, _, "$parentPerformanceSettingsTexture", "PerformanceSettingsTexture", 160, 33, [[Interface\AddOns\Details\images\options_window]]) + g_performance_texture:SetTexCoord (0, 0.15625, 0.751953125, 0.7841796875) + g_performance_texture:SetPoint ("topleft", g_performance, "topleft", 0, 0) + + --plugins + local g_plugin = g:NewButton (window, _, "$parentPluginButton", "g_plugin", 150, 33, function() end, 0x4) + + g:NewLabel (window, _, "$parentperplugins_settings_text", "PluginsSettingsLabel", Loc ["STRING_OPTIONS_PLUGINS"], "GameFontNormal", 12) + window.PluginsSettingsLabel:SetPoint ("topleft", g_plugin, "topleft", 35, -11) + + local g_performance_texture = g:NewImage (window, _, "$parentPluginsSettingsTexture", "PluginsSettingsTexture", 160, 33, [[Interface\AddOns\Details\images\options_window]]) + g_performance_texture:SetTexCoord (0, 0.15625, 0.78515625, 0.8173828125) + g_performance_texture:SetPoint ("topleft", g_plugin, "topleft", 0, 0) + + local menus = { + {"Display", "Combat"}, + {"Skin", "Row", "Row Texts", "Window Settings", "Top Menu Bar", "Reset/Instance/Close", "Wallpaper"}, + {"Performance Tweaks", "Data Collector"}, + {"Plugins Management"} + } + + --> create menus + local anchors = {g_settings, g_appearance, g_performance, g_plugin} + local y = -110 + local sub_menu_index = 1 + + local textcolor = {.8, .8, .8, 1} + + local button_onenter = function (self) + self.MyObject.my_bg_texture:SetVertexColor (1, 1, 1, 1) + self.MyObject.textcolor = "yellow" + end + local button_onleave = function (self) + self.MyObject.my_bg_texture:SetVertexColor (1, 1, 1, .5) + self.MyObject.textcolor = textcolor + end + + local true_index = 1 + + for index, menulist in ipairs (menus) do + + anchors [index]:SetPoint (23, y) + local amount = #menulist + + y = y - 37 + + for i = 1, amount do + + local texture = g:NewImage (window, _, "$parentButton_" .. index .. "_" .. i .. "_texture", nil, 130, 14, [[Interface\ARCHEOLOGY\ArchaeologyParts]]) + texture:SetTexCoord (0.146484375, 0.591796875, 0.0546875, 0.26171875) + texture:SetPoint (38, y-2) + texture:SetVertexColor (1, 1, 1, .5) + + local button = g:NewButton (window, _, "$parentButton_" .. index .. "_" .. i, nil, 150, 18, select_options, true_index, nil, "", menus [index] [i]) + button:SetPoint (40, y) + button.textalign = "<" + button.textcolor = textcolor + button.textsize = 11 + button.my_bg_texture = texture + y = y - 16 + + button:SetHook ("OnEnter", button_onenter) + button:SetHook ("OnLeave", button_onleave) + + true_index = true_index + 1 + + end + + y = y - 10 + + end window.options = { [1] = {}, [2] = {}, [3] = {}, - [4] = {} + [4] = {}, + [5] = {}, + [6] = {}, + [7] = {}, + [8] = {}, + [9] = {}, + [10] = {}, + [11] = {}, + [12] = {}, } --> vai armazenar os frames das opções + + function window:create_box_no_scroll (n) + local container = CreateFrame ("Frame", "DetailsOptionsWindow" .. n, window.widget) + + container:SetScript ("OnMouseDown", function() + if (not window.widget.isMoving) then + window.widget:StartMoving() + window.widget.isMoving = true + end + end) + container:SetScript ("OnMouseUp", function() + if (window.widget.isMoving) then + window.widget:StopMovingOrSizing() + window.widget.isMoving = false + end + end) + + container:SetBackdrop({ + edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, + insets = {left = 1, right = 1, top = 0, bottom = 1},}) + container:SetBackdropBorderColor (0, 0, 0, 0) + container:SetBackdropColor (0, 0, 0, 0) + + container:SetWidth (663) + container:SetHeight (500) + container:SetPoint ("TOPLEFT", window.widget, "TOPLEFT", 198, -88) + + g:NewScrollBar (container, container, 8, -10) + container.slider:Altura (449) + container.slider:cimaPoint (0, 1) + container.slider:baixoPoint (0, -3) + container.wheel_jump = 80 + + container.slider:Disable() + container.baixo:Disable() + container.cima:Disable() + container:EnableMouseWheel (false) + + return container + end + + function window:create_box (n) local container_window = CreateFrame ("ScrollFrame", "Details_Options_ContainerScroll" .. n, window.widget) local container_slave = CreateFrame ("Frame", "DetailsOptionsWindow" .. n, container_window) @@ -292,13 +385,13 @@ function _detalhes:OpenOptionsWindow (instance) container_slave:SetResizable (false) container_slave:SetMovable (true) - container_window:SetWidth (480) - container_window:SetHeight (311) + container_window:SetWidth (663) + container_window:SetHeight (500) container_window:SetScrollChild (container_slave) container_window:SetPoint ("TOPLEFT", window.widget, "TOPLEFT", 198, -88) g:NewScrollBar (container_window, container_slave, 8, -10) - container_window.slider:Altura (292) + container_window.slider:Altura (449) container_window.slider:cimaPoint (0, 1) container_window.slider:baixoPoint (0, -3) container_window.wheel_jump = 80 @@ -310,11 +403,27 @@ function _detalhes:OpenOptionsWindow (instance) return container_window end - table.insert (window.options [1], window:create_box (1)) - table.insert (window.options [2], window:create_box (2)) - table.insert (window.options [3], window:create_box (3)) - table.insert (window.options [4], window:create_box (4)) + table.insert (window.options [1], window:create_box_no_scroll (1)) + table.insert (window.options [2], window:create_box_no_scroll (2)) + table.insert (window.options [3], window:create_box_no_scroll (3)) + table.insert (window.options [4], window:create_box_no_scroll (4)) + table.insert (window.options [5], window:create_box_no_scroll (5)) + table.insert (window.options [6], window:create_box_no_scroll (6)) + table.insert (window.options [7], window:create_box_no_scroll (7)) + table.insert (window.options [8], window:create_box_no_scroll (8)) + table.insert (window.options [9], window:create_box_no_scroll (9)) + table.insert (window.options [10], window:create_box_no_scroll (10)) + table.insert (window.options [11], window:create_box_no_scroll (11)) + table.insert (window.options [12], window:create_box (12)) + function window:hide_all_options() + for _, frame in ipairs (window.options) do + for _, widget in ipairs (frame) do + widget:Hide() + end + end + end + function window:hide_options (options) for _, widget in ipairs (window.options [options]) do widget:Hide() @@ -364,32 +473,34 @@ function _detalhes:OpenOptionsWindow (instance) end end - window:hide_options (2) - window:hide_options (3) - window:hide_options (4) + select_options (1) - --> general settings: - local frame1 = window.options [1][1].gump - - --> nickname avatar +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- General Settings - Display +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + --> general settings: + local frame1 = window.options [1][1] + + --> nickname avatar local onPressEnter = function (_, _, text) local accepted, errortext = _detalhes:SetNickname (text) if (not accepted) then _detalhes:Msg (errortext) end --> we call again here, because if not accepted the box return the previous value and if successful accepted, update the value for formated string. - frame1.nicknameEntry.text = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true) + local nick = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true) + frame1.nicknameEntry.text = nick + _G.DetailsOptionsWindow1AvatarNicknameLabel:SetText (nick) end local titulo_persona = g:NewLabel (frame1, _, "$parentTituloPersona", "tituloPersonaLabel", Loc ["STRING_OPTIONS_SOCIAL"], "GameFontNormal", 16) - titulo_persona:SetPoint (10, -10) local titulo_persona_desc = g:NewLabel (frame1, _, "$parentTituloPersona2", "tituloPersona2Label", Loc ["STRING_OPTIONS_SOCIAL_DESC"], "GameFontNormal", 9, "white") - titulo_persona_desc.width = 250 - titulo_persona_desc:SetPoint (10, -30) + titulo_persona_desc.width = 350 - --> persona - g:NewLabel (frame1, _, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"]) - frame1.nicknameLabel:SetPoint (10, -70) + --> persona + + g:NewLabel (frame1, _, "$parentNickNameLabel", "nicknameLabel", Loc ["STRING_OPTIONS_NICKNAME"], "GameFontHighlightLeft") g:NewTextEntry (frame1, _, "$parentNicknameEntry", "nicknameEntry", SLIDER_WIDTH, 20, onPressEnter) frame1.nicknameEntry:SetPoint ("left", frame1.nicknameLabel, "right", 2, 0) @@ -402,6 +513,12 @@ function _detalhes:OpenOptionsWindow (instance) local avatarcallback = function (textureAvatar, textureAvatarTexCoord, textureBackground, textureBackgroundTexCoord, textureBackgroundColor) _detalhes:SetNicknameBackground (textureBackground, textureBackgroundTexCoord, textureBackgroundColor, true) _detalhes:SetNicknameAvatar (textureAvatar, textureAvatarTexCoord) + + _G.DetailsOptionsWindow1AvatarPreviewTexture.MyObject.texture = textureAvatar + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texture = textureBackground + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texcoord = textureBackgroundTexCoord + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject:SetVertexColor (unpack (textureBackgroundColor)) + _G.AvatarPickFrame.callback = nil end @@ -412,21 +529,28 @@ function _detalhes:OpenOptionsWindow (instance) g:NewButton (frame1, _, "$parentAvatarFrame", "chooseAvatarButton", frame1.nicknameLabel:GetStringWidth() + SLIDER_WIDTH + 2, 14, openAtavarPickFrame, nil, nil, nil, Loc ["STRING_OPTIONS_AVATAR"]) frame1.chooseAvatarButton:InstallCustomTexture() - frame1.chooseAvatarButton:SetPoint (11, -90) frame1.chooseAvatarButton.info = Loc ["STRING_OPTIONS_AVATAR_DESC"] window:create_line_background (frame1, frame1.chooseAvatarButton, frame1.chooseAvatarButton) frame1.chooseAvatarButton:SetHook ("OnEnter", background_on_enter) frame1.chooseAvatarButton:SetHook ("OnLeave", background_on_leave) - -- realm name -------------------------------------------------------------------------------------------------------------------------------------------- + --> avatar preview + g:NewImage (frame1, _, "$parentAvatarPreviewTexture", "avatarPreview", 128, 64) + g:NewImage (frame1, _, "$parentAvatarPreviewTexture2", "avatarPreview2", 275, 60) + g:NewLabel (frame1, _, "$parentAvatarNicknameLabel", "avatarNickname", UnitName ("player"), "GameFontHighlightSmall") - g:NewLabel (frame1, _, "$parentRealmNameLabel", "realmNameLabel", Loc ["STRING_OPTIONS_REALMNAME"]) - frame1.realmNameLabel:SetPoint (10, -110) - + _detalhes:SetFontSize (frame1.avatarNickname.widget, 18) + + frame1.avatarPreview:SetDrawLayer ("overlay", 3) + frame1.avatarNickname:SetDrawLayer ("overlay", 3) + frame1.avatarPreview2:SetDrawLayer ("overlay", 2) + + --> realm name -------------------------------------------------------------------------------------------------------------------------------------------- + + g:NewLabel (frame1, _, "$parentRealmNameLabel", "realmNameLabel", Loc ["STRING_OPTIONS_REALMNAME"], "GameFontHighlightLeft") g:NewSwitch (frame1, _, "$parentRealmNameSlider", "realmNameSlider", 60, 20, _, _, _detalhes.remove_realm_from_name) frame1.realmNameSlider:SetPoint ("left", frame1.realmNameLabel, "right", 2) - --frame1.realmNameSlider.tooltip = Loc ["STRING_OPTIONS_SWITCHINFO"] frame1.realmNameSlider.info = Loc ["STRING_OPTIONS_REALMNAME_DESC"] frame1.realmNameSlider.OnSwitch = function (self, _, value) _detalhes.remove_realm_from_name = value @@ -435,18 +559,14 @@ function _detalhes:OpenOptionsWindow (instance) window:create_line_background (frame1, frame1.realmNameLabel, frame1.realmNameSlider) frame1.realmNameSlider:SetHook ("OnEnter", background_on_enter) frame1.realmNameSlider:SetHook ("OnLeave", background_on_leave) - - ------- Max Segments - + + --> Max Segments + local titulo_display = g:NewLabel (frame1, _, "$parentTituloDisplay", "tituloDisplayLabel", "Display", "GameFontNormal", 16) --> localize-me - titulo_display:SetPoint (10, -150) local titulo_display_desc = g:NewLabel (frame1, _, "$parentTituloDisplay2", "tituloDisplay2Label", "Preferencial adjustments of instances (windows).", "GameFontNormal", 9, "white") --> localize-me - titulo_display_desc.width = 250 - titulo_display_desc:SetPoint (10, -170) + titulo_display_desc.width = 320 - g:NewLabel (frame1, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_OPTIONS_MAXSEGMENTS"]) - frame1.segmentsLabel:SetPoint (10, -210) - -- + g:NewLabel (frame1, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_OPTIONS_MAXSEGMENTS"], "GameFontHighlightLeft") g:NewSlider (frame1, _, "$parentSlider", "segmentsSlider", SLIDER_WIDTH, 20, 1, 25, 1, _detalhes.segments_amount) frame1.segmentsSlider:SetPoint ("left", frame1.segmentsLabel, "right", 2, 0) frame1.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue @@ -458,9 +578,8 @@ function _detalhes:OpenOptionsWindow (instance) frame1.segmentsSlider:SetHook ("OnEnter", background_on_enter) frame1.segmentsSlider:SetHook ("OnLeave", background_on_leave) - --------------- Use Scroll Bar - g:NewLabel (frame1, _, "$parentUseScrollLabel", "scrollLabel", Loc ["STRING_OPTIONS_SCROLLBAR"]) - frame1.scrollLabel:SetPoint (10, -230) + --> Use Scroll Bar + g:NewLabel (frame1, _, "$parentUseScrollLabel", "scrollLabel", Loc ["STRING_OPTIONS_SCROLLBAR"], "GameFontHighlightLeft") -- g:NewSwitch (frame1, _, "$parentUseScrollSlider", "scrollSlider", 60, 20, _, _, _detalhes.use_scroll) frame1.scrollSlider:SetPoint ("left", frame1.scrollLabel, "right", 2, 0) @@ -487,9 +606,8 @@ function _detalhes:OpenOptionsWindow (instance) frame1.scrollSlider:SetHook ("OnEnter", background_on_enter) frame1.scrollSlider:SetHook ("OnLeave", background_on_leave) - --------------- Max Instances - g:NewLabel (frame1, _, "$parentLabelMaxInstances", "maxInstancesLabel", Loc ["STRING_OPTIONS_MAXINSTANCES"]) - frame1.maxInstancesLabel:SetPoint (10, -250) + --> Max Instances + g:NewLabel (frame1, _, "$parentLabelMaxInstances", "maxInstancesLabel", Loc ["STRING_OPTIONS_MAXINSTANCES"], "GameFontHighlightLeft") -- g:NewSlider (frame1, _, "$parentSliderMaxInstances", "maxInstancesSlider", SLIDER_WIDTH, 20, 12, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv frame1.maxInstancesSlider:SetPoint ("left", frame1.maxInstancesLabel, "right", 2, 0) @@ -502,56 +620,9 @@ function _detalhes:OpenOptionsWindow (instance) frame1.maxInstancesSlider:SetHook ("OnEnter", background_on_enter) frame1.maxInstancesSlider:SetHook ("OnLeave", background_on_leave) - --------------- Frags PVP Mode - g:NewLabel (frame1, _, "$parentLabelFragsPvP", "fragsPvpLabel", Loc ["STRING_OPTIONS_PVPFRAGS"]) - frame1.fragsPvpLabel:SetPoint (10, -270) - -- - g:NewSwitch (frame1, _, "$parentFragsPvpSlider", "fragsPvpSlider", 60, 20, _, _, _detalhes.only_pvp_frags) - frame1.fragsPvpSlider:SetPoint ("left", frame1.fragsPvpLabel, "right", 2, 0) - frame1.fragsPvpSlider.OnSwitch = function (self, _, amount) --> slider, fixedValue, sliderValue - _detalhes.only_pvp_frags = amount - end - frame1.fragsPvpSlider.info = Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] - - window:create_line_background (frame1, frame1.fragsPvpLabel, frame1.fragsPvpSlider) - frame1.fragsPvpSlider:SetHook ("OnEnter", background_on_enter) - frame1.fragsPvpSlider:SetHook ("OnLeave", background_on_leave) - - --------------- Time Type - - --hide on combat - g:NewSwitch (frame1, _, "$parentHideOnCombatSlider", "hideOnCombatSlider", 60, 20, _, _, window.instance.hide_in_combat) - --mini map + --> Minimap Icon g:NewSwitch (frame1, _, "$parentMinimapSlider", "minimapSlider", 60, 20, _, _, not _detalhes.minimap.hide) - - --time type - g:NewLabel (frame1, _, "$parentTimeTypeLabel", "timetypeLabel", Loc ["STRING_OPTIONS_TIMEMEASURE"]) - frame1.timetypeLabel:SetPoint (10, -290) - -- - local onSelectTimeType = function (_, _, timetype) - _detalhes.time_type = timetype - _detalhes:AtualizaGumpPrincipal (-1, true) - end - local timetypeOptions = { - {value = 1, label = "Activity Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\INV_Misc_PocketWatch_01"}, --, desc = "" - {value = 2, label = "Effective Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\INV_Misc_Gear_03"} --, desc = "" - } - local buildTimeTypeMenu = function() - return timetypeOptions - end - g:NewDropDown (frame1, _, "$parentTTDropdown", "timetypeDropdown", 160, 20, buildTimeTypeMenu, nil) -- func, default - frame1.timetypeDropdown:SetPoint ("left", frame1.timetypeLabel, "right", 2, 0) - frame1.timetypeDropdown:SetFrameStrata ("DIALOG") - - frame1.timetypeDropdown.info = Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] - - window:create_line_background (frame1, frame1.timetypeLabel, frame1.timetypeDropdown) - frame1.timetypeDropdown:SetHook ("OnEnter", background_on_enter) - frame1.timetypeDropdown:SetHook ("OnLeave", background_on_leave) - - --------------- Minimap Icon - g:NewLabel (frame1, _, "$parentMinimapLabel", "minimapLabel", Loc ["STRING_OPTIONS_MINIMAP"]) - frame1.minimapLabel:SetPoint (10, -310) + g:NewLabel (frame1, _, "$parentMinimapLabel", "minimapLabel", Loc ["STRING_OPTIONS_MINIMAP"], "GameFontHighlightLeft") -- frame1.minimapSlider:SetPoint ("left", frame1.minimapLabel, "right", 2, 0) frame1.minimapSlider.OnSwitch = function (self, _, value) @@ -571,38 +642,8 @@ function _detalhes:OpenOptionsWindow (instance) frame1.minimapSlider:SetHook ("OnEnter", background_on_enter) frame1.minimapSlider:SetHook ("OnLeave", background_on_leave) - --------------- hide in combat - g:NewLabel (frame1, _, "$parentHideOnCombatLabel", "hideOnCombatLabel", Loc ["STRING_OPTIONS_HIDECOMBAT"]) - frame1.hideOnCombatLabel:SetPoint (10, -350) - - g:NewLabel (frame1, _, "$parentHideOnCombatAlphaLabel", "hideOnCombatAlphaLabel", Loc ["STRING_OPTIONS_HIDECOMBATALPHA"]) - frame1.hideOnCombatAlphaLabel:SetPoint (10, -370) - - frame1.hideOnCombatSlider:SetPoint ("left", frame1.hideOnCombatLabel, "right", 2, 0) - frame1.hideOnCombatSlider.OnSwitch = function (self, instance, value) - instance.hide_in_combat = value - end - - g:NewSlider (frame1, _, "$parentHideOnCombatAlphaSlider", "hideOnCombatAlphaSlider", SLIDER_WIDTH, 20, 0, 100, 1, window.instance.hide_in_combat_alpha) -- min, max, step, defaultv - frame1.hideOnCombatAlphaSlider:SetPoint ("left", frame1.hideOnCombatAlphaLabel, "right", 2, 0) - frame1.hideOnCombatAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue - instance.hide_in_combat_alpha = amount - end) - - frame1.hideOnCombatSlider.info = Loc ["STRING_OPTIONS_HIDECOMBAT_DESC"] - frame1.hideOnCombatAlphaSlider.info = Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] - - window:create_line_background (frame1, frame1.hideOnCombatLabel, frame1.hideOnCombatSlider) - frame1.hideOnCombatSlider:SetHook ("OnEnter", background_on_enter) - frame1.hideOnCombatSlider:SetHook ("OnLeave", background_on_leave) - - window:create_line_background (frame1, frame1.hideOnCombatAlphaLabel, frame1.hideOnCombatAlphaSlider) - frame1.hideOnCombatAlphaSlider:SetHook ("OnEnter", background_on_enter) - frame1.hideOnCombatAlphaSlider:SetHook ("OnLeave", background_on_leave) - - --------------- abbreviation type - g:NewLabel (frame1, _, "$parentDpsAbbreviateLabel", "dpsAbbreviateLabel", Loc ["STRING_OPTIONS_PS_ABBREVIATE"]) - frame1.dpsAbbreviateLabel:SetPoint (10, -410) + ---> Abbreviation Type + g:NewLabel (frame1, _, "$parentDpsAbbreviateLabel", "dpsAbbreviateLabel", Loc ["STRING_OPTIONS_PS_ABBREVIATE"], "GameFontHighlightLeft") -- local onSelectTimeAbbreviation = function (_, _, abbreviationtype) _detalhes.ps_abbreviation = abbreviationtype @@ -616,12 +657,125 @@ function _detalhes:OpenOptionsWindow (instance) local buildAbbreviationMenu = function() return abbreviationOptions end + + g:NewDropDown (frame1, _, "$parentAbbreviateDropdown", "dpsAbbreviateDropdown", 160, 20, buildAbbreviationMenu, _detalhes.ps_abbreviation) -- func, default + frame1.dpsAbbreviateDropdown:SetPoint ("left", frame1.dpsAbbreviateLabel, "right", 2, 0) + + frame1.dpsAbbreviateDropdown.info = Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] - --------------- auto switch - g:NewLabel (frame1, _, "$parentAutoSwitchLabel", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH"]) - frame1.autoSwitchLabel:SetPoint (10, -450) + window:create_line_background (frame1, frame1.dpsAbbreviateLabel, frame1.dpsAbbreviateDropdown) + frame1.dpsAbbreviateDropdown:SetHook ("OnEnter", background_on_enter) + frame1.dpsAbbreviateDropdown:SetHook ("OnLeave", background_on_leave) + + titulo_persona:SetPoint (10, -10) + titulo_persona_desc:SetPoint (10, -30) + frame1.nicknameLabel:SetPoint (10, -70) + frame1.chooseAvatarButton:SetPoint (11, -90) + + frame1.avatarPreview:SetPoint (-8, -107) + frame1.avatarPreview2:SetPoint (-8, -107) + frame1.avatarNickname:SetPoint (100, -142) + + local avatar = NickTag:GetNicknameAvatar (UnitGUID ("player"), NICKTAG_DEFAULT_AVATAR, true) + local background, cords, color = NickTag:GetNicknameBackground (UnitGUID ("player"), NICKTAG_DEFAULT_BACKGROUND, NICKTAG_DEFAULT_BACKGROUND_CORDS, {1, 1, 1, 1}, true) + + frame1.avatarPreview.texture = avatar + frame1.avatarPreview2.texture = background + frame1.avatarPreview2.texcoord = cords + frame1.avatarPreview2:SetVertexColor (unpack (color)) + + titulo_display:SetPoint (10, -200) + titulo_display_desc:SetPoint (10, -220) + + frame1.segmentsLabel:SetPoint (10, -260) + frame1.scrollLabel:SetPoint (10, -285) + frame1.maxInstancesLabel:SetPoint (10, -310) + frame1.minimapLabel:SetPoint (10, -335) + frame1.dpsAbbreviateLabel:SetPoint (10, -360) + frame1.realmNameLabel:SetPoint (10, -385) + + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- General Settings - Combat +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + --> general settings: + local frame2 = window.options [2][1] + + --> titles + local titulo_combattweeks = g:NewLabel (frame2, _, "$parentTituloCombatTweeks", "tituloCombatTweeksLabel", Loc ["STRING_OPTIONS_COMBATTWEEKS"], "GameFontNormal", 16) + titulo_combattweeks:SetPoint (10, -10) + local titulo_combattweeks_desc = g:NewLabel (frame2, _, "$parentCombatTweeks2", "tituloCombatTweeks2Label", Loc ["STRING_OPTIONS_COMBATTWEEKS_DESC"], "GameFontNormal", 9, "white") + titulo_combattweeks_desc.width = 320 + titulo_combattweeks_desc:SetPoint (10, -30) + + --> Frags PVP Mode + g:NewLabel (frame2, _, "$parentLabelFragsPvP", "fragsPvpLabel", Loc ["STRING_OPTIONS_PVPFRAGS"], "GameFontHighlightLeft") -- + g:NewSwitch (frame2, _, "$parentFragsPvpSlider", "fragsPvpSlider", 60, 20, _, _, _detalhes.only_pvp_frags) + frame2.fragsPvpSlider:SetPoint ("left", frame2.fragsPvpLabel, "right", 2, 0) + frame2.fragsPvpSlider.OnSwitch = function (self, _, amount) --> slider, fixedValue, sliderValue + _detalhes.only_pvp_frags = amount + end + frame2.fragsPvpSlider.info = Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] + + window:create_line_background (frame2, frame2.fragsPvpLabel, frame2.fragsPvpSlider) + frame2.fragsPvpSlider:SetHook ("OnEnter", background_on_enter) + frame2.fragsPvpSlider:SetHook ("OnLeave", background_on_leave) + + --> Time Type + g:NewLabel (frame2, _, "$parentTimeTypeLabel", "timetypeLabel", Loc ["STRING_OPTIONS_TIMEMEASURE"], "GameFontHighlightLeft") + -- + local onSelectTimeType = function (_, _, timetype) + _detalhes.time_type = timetype + _detalhes:AtualizaGumpPrincipal (-1, true) + end + local timetypeOptions = { + {value = 1, label = "Activity Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\INV_Misc_PocketWatch_01"}, --, desc = "" + {value = 2, label = "Effective Time", onclick = onSelectTimeType, icon = "Interface\\Icons\\INV_Misc_Gear_03"} --, desc = "" + } + local buildTimeTypeMenu = function() + return timetypeOptions + end + g:NewDropDown (frame2, _, "$parentTTDropdown", "timetypeDropdown", 160, 20, buildTimeTypeMenu, nil) -- func, default + frame2.timetypeDropdown:SetPoint ("left", frame2.timetypeLabel, "right", 2, 0) + + frame2.timetypeDropdown.info = Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] + window:create_line_background (frame2, frame2.timetypeLabel, frame2.timetypeDropdown) + frame2.timetypeDropdown:SetHook ("OnEnter", background_on_enter) + frame2.timetypeDropdown:SetHook ("OnLeave", background_on_leave) + + --> hide in combat + g:NewLabel (frame2, _, "$parentHideOnCombatLabel", "hideOnCombatLabel", Loc ["STRING_OPTIONS_HIDECOMBAT"], "GameFontHighlightLeft") + g:NewLabel (frame2, _, "$parentHideOnCombatAlphaLabel", "hideOnCombatAlphaLabel", Loc ["STRING_OPTIONS_HIDECOMBATALPHA"], "GameFontHighlightLeft") + + g:NewSwitch (frame2, _, "$parentHideOnCombatSlider", "hideOnCombatSlider", 60, 20, _, _, window.instance.hide_in_combat) + frame2.hideOnCombatSlider:SetPoint ("left", frame2.hideOnCombatLabel, "right", 2, 0) + frame2.hideOnCombatSlider.OnSwitch = function (self, instance, value) + instance.hide_in_combat = value + end + + g:NewSlider (frame2, _, "$parentHideOnCombatAlphaSlider", "hideOnCombatAlphaSlider", SLIDER_WIDTH, 20, 0, 100, 1, window.instance.hide_in_combat_alpha) -- min, max, step, defaultv + frame2.hideOnCombatAlphaSlider:SetPoint ("left", frame2.hideOnCombatAlphaLabel, "right", 2, 0) + frame2.hideOnCombatAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue + instance.hide_in_combat_alpha = amount + end) + + frame2.hideOnCombatSlider.info = Loc ["STRING_OPTIONS_HIDECOMBAT_DESC"] + frame2.hideOnCombatAlphaSlider.info = Loc ["STRING_OPTIONS_HIDECOMBATALPHA_DESC"] + + window:create_line_background (frame2, frame2.hideOnCombatLabel, frame2.hideOnCombatSlider) + frame2.hideOnCombatSlider:SetHook ("OnEnter", background_on_enter) + frame2.hideOnCombatSlider:SetHook ("OnLeave", background_on_leave) + + window:create_line_background (frame2, frame2.hideOnCombatAlphaLabel, frame2.hideOnCombatAlphaSlider) + frame2.hideOnCombatAlphaSlider:SetHook ("OnEnter", background_on_enter) + frame2.hideOnCombatAlphaSlider:SetHook ("OnLeave", background_on_leave) + + --> auto switch + g:NewLabel (frame2, _, "$parentAutoSwitchLabel", "autoSwitchLabel", Loc ["STRING_OPTIONS_AUTO_SWITCH"], "GameFontHighlightLeft") + -- local onSelectAutoSwitch = function (_, _, switch_to) if (switch_to == 0) then window.instance.auto_switch_to = nil @@ -667,97 +821,57 @@ function _detalhes:OpenOptionsWindow (instance) return t end - g:NewDropDown (frame1, _, "$parentAutoSwitchDropdown", "autoSwitchDropdown", 160, 20, buildSwitchMenu, 1) -- func, default - frame1.autoSwitchDropdown:SetPoint ("left", frame1.autoSwitchLabel, "right", 2, 0) - frame1.autoSwitchDropdown:SetFrameStrata ("DIALOG") + g:NewDropDown (frame2, _, "$parentAutoSwitchDropdown", "autoSwitchDropdown", 160, 20, buildSwitchMenu, 1) -- func, default + frame2.autoSwitchDropdown:SetPoint ("left", frame2.autoSwitchLabel, "right", 2, 0) - frame1.autoSwitchDropdown.info = Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] + frame2.autoSwitchDropdown.info = Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] - window:create_line_background (frame1, frame1.autoSwitchLabel, frame1.autoSwitchDropdown) - frame1.autoSwitchDropdown:SetHook ("OnEnter", background_on_enter) - frame1.autoSwitchDropdown:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame2, frame2.autoSwitchLabel, frame2.autoSwitchDropdown) + frame2.autoSwitchDropdown:SetHook ("OnEnter", background_on_enter) + frame2.autoSwitchDropdown:SetHook ("OnLeave", background_on_leave) + --> auto current segment + g:NewSwitch (frame2, _, "$parentAutoCurrentSlider", "autoCurrentSlider", 60, 20, _, _, instance.auto_current) - --abbreviation - g:NewDropDown (frame1, _, "$parentAbbreviateDropdown", "dpsAbbreviateDropdown", 160, 20, buildAbbreviationMenu, _detalhes.ps_abbreviation) -- func, default - frame1.dpsAbbreviateDropdown:SetPoint ("left", frame1.dpsAbbreviateLabel, "right", 2, 0) - frame1.dpsAbbreviateDropdown:SetFrameStrata ("DIALOG") - - frame1.dpsAbbreviateDropdown.info = Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] - - window:create_line_background (frame1, frame1.dpsAbbreviateLabel, frame1.dpsAbbreviateDropdown) - frame1.dpsAbbreviateDropdown:SetHook ("OnEnter", background_on_enter) - frame1.dpsAbbreviateDropdown:SetHook ("OnLeave", background_on_leave) - ----------------- appearance - local frame2 = window.options [2][1].gump - - --skin - local titulo_skin = g:NewLabel (frame2, _, "$parentTituloSkin", "tituloSkinLabel", Loc ["STRING_OPTIONS_SKIN_A"], "GameFontNormal", 16) - local titulo_skin_desc = g:NewLabel (frame2, _, "$parentTituloSkin2", "tituloSkin2Label", Loc ["STRING_OPTIONS_SKIN_A_DESC"], "GameFontNormal", 9, "white") - titulo_skin_desc.width = 250 - - --bars general - local titulo_bars = g:NewLabel (frame2, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_BARS"], "GameFontNormal", 16) - local titulo_bars_desc = g:NewLabel (frame2, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_BARS_DESC"], "GameFontNormal", 9, "white") - titulo_bars_desc.width = 250 - - --bars text - local titulo_texts = g:NewLabel (frame2, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_TEXT"], "GameFontNormal", 16) - local titulo_texts_desc = g:NewLabel (frame2, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_TEXT_DESC"], "GameFontNormal", 9, "white") - titulo_texts_desc.width = 250 - - --window - local titulo_instance = g:NewLabel (frame2, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_INSTANCE"], "GameFontNormal", 16) - local titulo_instance_desc = g:NewLabel (frame2, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_INSTANCE_DESC"], "GameFontNormal", 9, "white") - titulo_instance_desc.width = 250 - - --toolbar - local titulo_toolbar = g:NewLabel (frame2, _, "$parentTituloToolbar", "tituloToolbarLabel", Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS"], "GameFontNormal", 16) - local titulo_toolbar_desc = g:NewLabel (frame2, _, "$parentTituloToolbar2", "tituloToolbar2Label", Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS_DESC"], "GameFontNormal", 9, "white") - titulo_toolbar_desc.width = 250 - - --wallpaper - local titulo_wallpaper = g:NewLabel (frame2, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_WP"], "GameFontNormal", 16) - local titulo_wallpaper_desc = g:NewLabel (frame2, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_WP_DESC"], "GameFontNormal", 9, "white") - titulo_wallpaper_desc.width = 250 - - --save load - local titulo_save = g:NewLabel (frame2, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_SAVELOAD"], "GameFontNormal", 16) - local titulo_save_desc = g:NewLabel (frame2, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_SAVELOAD_DESC"], "GameFontNormal", 9, "white") - titulo_save_desc.width = 250 + -- Auto Current Segment + g:NewLabel (frame2, _, "$parentAutoCurrentLabel", "autoCurrentLabel", Loc ["STRING_OPTIONS_INSTANCE_CURRENT"], "GameFontHighlightLeft") + + frame2.autoCurrentSlider:SetPoint ("left", frame2.autoCurrentLabel, "right", 2) + frame2.autoCurrentSlider.OnSwitch = function (self, instance, value) + instance.auto_current = value + end + + frame2.autoCurrentSlider.info = Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] + window:create_line_background (frame2, frame2.autoCurrentLabel, frame2.autoCurrentSlider) + frame2.autoCurrentSlider:SetHook ("OnEnter", background_on_enter) + frame2.autoCurrentSlider:SetHook ("OnLeave", background_on_leave) + + frame2.fragsPvpLabel:SetPoint (10, -75) + frame2.timetypeLabel:SetPoint (10, -100) + frame2.hideOnCombatLabel:SetPoint (10, -135) + frame2.hideOnCombatAlphaLabel:SetPoint (10, -160) + frame2.autoSwitchLabel:SetPoint (10, -195) + frame2.autoCurrentLabel:SetPoint (10, -220) --auto current + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Skin +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame3 = window.options [3][1] + + --> Skin + 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: - local function saveStyleFunc (temp) - if ((not frame2.saveStyleName.text or frame2.saveStyleName.text == "") and not temp) then - _detalhes:Msg (Loc ["STRING_OPTIONS_PRESETNONAME"]) - return - end - - local savedObject = { - version = 2, - name = frame2.saveStyleName.text, --> preset name - } - - for key, value in pairs (window.instance) do - if (_detalhes.instance_defaults [key]) then - if (type (value) == "table") then - savedObject [key] = table_deepcopy (value) - else - savedObject [key] = value - end - end - end - - if (temp) then - return savedObject - end - - _detalhes.savedStyles [#_detalhes.savedStyles+1] = savedObject - frame2.saveStyleName.text = "" - end - local loadStyle = function (_, instance, index) local style @@ -794,322 +908,318 @@ function _detalhes:OpenOptionsWindow (instance) _detalhes:OpenOptionsWindow (instance) end + _detalhes.loadStyleFunc = loadStyle local resetToDefaults = function() loadStyle (nil, window.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) + end + + local buildSkinMenu = function() + local skinOptions = {} + for skin_name, skin_table in pairs (_detalhes.skins) do + skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc} + end + return skinOptions + end + + -- skin + g:NewDropDown (frame3, _, "$parentSkinDropdown", "skinDropdown", 160, 20, buildSkinMenu, 1) + g:NewLabel (frame3, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"], "GameFontHighlightLeft") - ------ apply to all button + frame3.skinDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] + window:create_line_background (frame3, frame3.skinLabel, frame3.skinDropdown) + frame3.skinDropdown:SetHook ("OnEnter", background_on_enter) + frame3.skinDropdown:SetHook ("OnLeave", background_on_leave) + frame3.skinDropdown:SetPoint ("left", frame3.skinLabel, "right", 2) + + --> Create New Skin + + local function saveStyleFunc (temp) + if ((not frame3.saveStyleName.text or frame3.saveStyleName.text == "") and not temp) then + _detalhes:Msg (Loc ["STRING_OPTIONS_PRESETNONAME"]) + return + end + + local savedObject = { + version = preset_version, + name = frame3.saveStyleName.text, --> preset name + } + + for key, value in pairs (window.instance) do + if (_detalhes.instance_defaults [key]) then + if (type (value) == "table") then + savedObject [key] = table_deepcopy (value) + else + savedObject [key] = value + end + end + end + + if (temp) then + return savedObject + end + + _detalhes.savedStyles [#_detalhes.savedStyles+1] = savedObject + frame3.saveStyleName.text = "" + + _detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_SKINCREATED"]) + + end + + g:NewTextEntry (frame3, _, "$parentSaveStyleName", "saveStyleName", 120, 20) + g:NewLabel (frame3, _, "$parentSaveSkinLabel", "saveSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_PNAME"], "GameFontHighlightLeft") + frame3.saveStyleName:SetPoint ("left", frame3.saveSkinLabel, "right", 2) + g:NewButton (frame3, _, "$parentSaveStyleButton", "saveStyle", 50, 19, saveStyleFunc, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"]) + frame3.saveStyle:InstallCustomTexture() + + frame3.saveStyleName.info = Loc ["STRING_OPTIONS_SAVELOAD_CREATE_DESC"] + window:create_line_background (frame3, frame3.saveSkinLabel, frame3.saveStyleName) + frame3.saveStyleName:SetHook ("OnEnter", background_on_enter) + frame3.saveStyleName:SetHook ("OnLeave", background_on_leave) + + --> apply to all button local applyToAll = function() local temp_preset = saveStyleFunc (true) local current_instance = window.instance for _, this_instance in ipairs (_detalhes.tabela_instancias) do - if (this_instance:IsAtiva() and this_instance.meu_id ~= window.instance.meu_id) then - loadStyle (nil, this_instance, temp_preset) + if (this_instance.meu_id ~= window.instance.meu_id) then + if (not this_instance.iniciada) then + this_instance:RestauraJanela() + loadStyle (nil, this_instance, temp_preset) + this_instance:DesativarInstancia() + else + loadStyle (nil, this_instance, temp_preset) + end end end _detalhes:OpenOptionsWindow (current_instance) + _detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"]) + + end + + local makeDefault = function() + local temp_preset = saveStyleFunc (true) + _detalhes.standard_skin = temp_preset + _detalhes:Msg (Loc ["STRING_OPTIONS_SAVELOAD_STDSAVE"]) end - --> save and load stuff - g:NewTextEntry (frame2, _, "$parentSaveStyleName", "saveStyleName", nil, 20, _, _, _, 178) --width will be auto adjusted if space parameter is passed - g:NewButton (frame2, _, "$parentSaveStyleButton", "saveStyle", 32, 19, saveStyleFunc, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_SAVE"]) - g:NewButton (frame2, _, "$parentLoadStyleButton", "loadStyle", 32, 19, nil, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_LOAD"]) - g:NewButton (frame2, _, "$parentRemoveStyleButton", "removeStyle", 12, 19, nil, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_REMOVE"]) - g:NewButton (frame2, _, "$parentToAllStyleButton", "applyToAll", 140, 14, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"]) - g:NewButton (frame2, _, "$parentResetToDefaultButton", "resetToDefaults", 100, 14, resetToDefaults, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_RESET"]) + g:NewButton (frame3, _, "$parentToAllStyleButton", "applyToAll", 160, 18, applyToAll, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"]) + frame3.applyToAll:InstallCustomTexture() + g:NewButton (frame3, _, "$parentMakeDefaultButton", "makeDefault", 160, 18, makeDefault, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"]) + frame3.makeDefault:InstallCustomTexture() - --> text size - g:NewSlider (frame2, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.row_info.font_size)) - - --> instance color - local selectedColor = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - - frame2.instancecolortexture:SetTexture (r, g, b) - frame2.instancecolortexture:SetAlpha (a) - - window.instance:InstanceColor (r, g, b, a) - end - - local canceledColor = function() - local c = ColorPickerFrame.previousValues - frame2.instancecolortexture:SetTexture (c [1], c [2], c [3]) - frame2.instancecolortexture:SetAlpha (c [4]) - - window.instance:InstanceColor (c [1], c [2], c [3], c [4]) - - ColorPickerFrame.func = nil - ColorPickerFrame.opacityFunc = nil - ColorPickerFrame.cancelFunc = nil - end - - local selectedAlpha = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - - --a = _detalhes:Scale (0, 1, 0.5, 1, a) - 0.5 - --print (a) - - frame2.instancecolortexture:SetTexture (r, g, b) - frame2.instancecolortexture:SetAlpha (a) - - window.instance:InstanceColor (r, g, b, a) - - end - - local colorpick = function() - ColorPickerFrame.func = selectedColor - ColorPickerFrame.opacityFunc = selectedAlpha - ColorPickerFrame.cancelFunc = canceledColor - ColorPickerFrame.hasOpacity = true --false - ColorPickerFrame.opacity = window.instance.color[4] or 1 - ColorPickerFrame.previousValues = window.instance.color - ColorPickerFrame:SetParent (window.widget) - ColorPickerFrame:SetColorRGB (unpack (window.instance.color)) - ColorPickerFrame:Show() - end - - g:NewImage (frame2, _, "$parentInstanceColorTexture", "instancecolortexture", COLOR_BUTTON_WIDTH, 12) - g:NewButton (frame2, _, "$parentInstanceColorButton", "instancecolorbutton", COLOR_BUTTON_WIDTH, 14, colorpick, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) + g:NewLabel (frame3, _, "$parentToAllStyleLabel", "toAllStyleLabel", "", "GameFontHighlightLeft") + g:NewLabel (frame3, _, "$parentmakeDefaultLabel", "makeDefaultLabel", "", "GameFontHighlightLeft") - --> bar background color - local selectedRowBackgroundColor = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - frame2.rowBackgroundColorTexture:SetTexture (r, g, b, a) - - window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) - end - - local canceledRowBackgroundColor = function() - frame2.rowBackgroundColorTexture:SetTexture (unpack (ColorPickerFrame.previousValues)) - window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, ColorPickerFrame.previousValues) - - ColorPickerFrame.func = nil - ColorPickerFrame.opacityFunc = nil - ColorPickerFrame.cancelFunc = nil - end - - local selectedRowBackgroundAlpha = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - local a = OpacitySliderFrame:GetValue() - frame2.rowBackgroundColorTexture:SetTexture (r, g, b, a) - window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) - end - - local colorpickRowBackground = function() - ColorPickerFrame.func = selectedRowBackgroundColor - ColorPickerFrame.opacityFunc = selectedRowBackgroundAlpha - ColorPickerFrame.cancelFunc = canceledRowBackgroundColor - ColorPickerFrame.hasOpacity = true --false - ColorPickerFrame.opacity = window.instance.row_info.fixed_texture_background_color[4] - ColorPickerFrame.previousValues = window.instance.row_info.fixed_texture_background_color - ColorPickerFrame:SetParent (window.widget) - ColorPickerFrame:SetColorRGB (unpack (window.instance.row_info.fixed_texture_background_color)) - ColorPickerFrame:Show() - end - - g:NewImage (frame2, _, "$parentRowBackgroundColor", "rowBackgroundColorTexture", COLOR_BUTTON_WIDTH, 12) - g:NewButton (frame2, _, "$parentRowBackgroundColorButton", "rowBackgroundColorButton", COLOR_BUTTON_WIDTH, 14, colorpickRowBackground, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) - - --> background with class color - g:NewSwitch (frame2, _, "$parentBackgroundClassColorSlider", "rowBackgroundColorByClassSlider", 60, 20, _, _, instance.row_info.texture_background_class_color) + frame3.toAllStyleLabel:SetPoint ("left", frame3.applyToAll, "left") + frame3.makeDefaultLabel:SetPoint ("left", frame3.makeDefault, "left") - --> bar height - g:NewSlider (frame2, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, 20, 10, 30, 1, tonumber (instance.row_info.height)) - - --> transparency - g:NewSlider (frame2, _, "$parentAlphaSlider", "alphaSlider", SLIDER_WIDTH, 20, 0.02, 1, 0.02, instance.bg_alpha, true) - - local selectedBackgroundColor = function() - local r, g, b = ColorPickerFrame:GetColorRGB() - window.instance:SetBackgroundColor (r, g, b) - frame2.backgroundColorTexture:SetTexture (r, g, b) - end - - local canceledBackgroundColor = function() - local c = ColorPickerFrame.previousValues - window.instance:SetBackgroundColor (unpack (c)) - frame2.backgroundColorTexture:SetTexture (unpack (c)) - ColorPickerFrame.func = nil - ColorPickerFrame.cancelFunc = nil - end - - local colorpickBackgroundColor = function() - ColorPickerFrame.func = selectedBackgroundColor - ColorPickerFrame.cancelFunc = canceledBackgroundColor - ColorPickerFrame.opacityFunc = nil - ColorPickerFrame.hasOpacity = false - ColorPickerFrame.previousValues = {window.instance.bg_r, window.instance.bg_g, window.instance.bg_b} - ColorPickerFrame:SetParent (window.widget) - ColorPickerFrame:SetColorRGB (window.instance.bg_r, window.instance.bg_g, window.instance.bg_b) - ColorPickerFrame:Show() - end - - g:NewImage (frame2, _, "$parentBackgroundColorTexture", "backgroundColorTexture", COLOR_BUTTON_WIDTH, 12) - g:NewButton (frame2, _, "$parentBackgroundColorButton", "backgroundColorButton", COLOR_BUTTON_WIDTH, 14, colorpickBackgroundColor, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) + frame3.applyToAll.info = Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"] + window:create_line_background (frame3, frame3.toAllStyleLabel, frame3.applyToAll) + frame3.applyToAll:SetHook ("OnEnter", background_on_enter) + frame3.applyToAll:SetHook ("OnLeave", background_on_leave) - --> auto current segment - g:NewSwitch (frame2, _, "$parentAutoCurrentSlider", "autoCurrentSlider", 60, 20, _, _, instance.auto_current) - - --> sidebars statusbar - g:NewSwitch (frame2, _, "$parentSideBarsSlider", "sideBarsSlider", 60, 20, _, _, instance.show_sidebars) - g:NewSwitch (frame2, _, "$parentStatusbarSlider", "statusbarSlider", 60, 20, _, _, instance.show_statusbar) - - --> desaturate - g:NewSwitch (frame2, _, "$parentDesaturateMenuSlider", "desaturateMenuSlider", 60, 20, _, _, instance.desaturated_menu) - - --> hide icon - g:NewSwitch (frame2, _, "$parentHideIconSlider", "hideIconSlider", 60, 20, _, _, instance.hide_icon) - - --> instance button anchor - g:NewSlider (frame2, _, "$parentInstanceButtonAnchorXSlider", "instanceButtonAnchorXSlider", SLIDER_WIDTH, 20, -200, 20, 1, instance.instance_button_anchor[1]) - g:NewSlider (frame2, _, "$parentInstanceButtonAnchorYSlider", "instanceButtonAnchorYSlider", SLIDER_WIDTH, 20, -10, 10, 1, instance.instance_button_anchor[2]) - - --> menu anchor - g:NewSlider (frame2, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, 20, -20, 200, 1, instance.menu_anchor[1]) - g:NewSlider (frame2, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, 20, -10, 10, 1, instance.menu_anchor[2]) - - --> close button - --button overlay - local close_overlay_color_callback = function (_, r, g, b, a) - frame2.closeOverlayColorImage:SetTexture (r, g, b, a) - window.instance:SetCloseButtonSettings ({r, g, b, a}) - end - local close_overlay_color_onclick = function() - local color_table = window.instance.closebutton_info.color_overlay - g:ColorPick (frame2.closeOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], close_overlay_color_callback) - end - g:NewImage (frame2, nil, "$parentCloseOverlayColorImage", "closeOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.closebutton_info.color_overlay) - g:NewButton (frame2, nil, "$parentCloseOverlayColorButton", "closeOverlayColorButton", COLOR_BUTTON_WIDTH, 14, close_overlay_color_onclick, nil, nil, nil, "color") - - --> reset button - --text color pick - local reset_text_color_callback = function (_, r, g, b, a) - frame2.resetTextColorImage:SetTexture (r, g, b, a) - window.instance:SetDeleteButtonSettings (nil, nil, {r, g, b, a}, nil) - end - local reset_text_color_onclick = function() - local color_table = window.instance.resetbutton_info.text_color - g:ColorPick (frame2.resetTextColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], reset_text_color_callback) - end - g:NewImage (frame2, nil, "$parentResetTextColorImage", "resetTextColorImage", COLOR_BUTTON_WIDTH, 12, instance.resetbutton_info.text_color) - g:NewButton (frame2, nil, "$parentResetTextColorButton", "resetTextColorButton", COLOR_BUTTON_WIDTH, 14, reset_text_color_onclick, nil, nil, nil, "color") - - --text size - g:NewSlider (frame2, _, "$parentResetTextSizeSlider", "resetTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.resetbutton_info.text_size)) - frame2.resetTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance:SetDeleteButtonSettings (nil, amount) - end) - - --button overlay - local reset_overlay_color_callback = function (_, r, g, b, a) - frame2.resetOverlayColorImage:SetTexture (r, g, b, a) - window.instance:SetDeleteButtonSettings (nil, nil, nil, {r, g, b, a}) - end - local reset_overlay_color_onclick = function() - local color_table = window.instance.resetbutton_info.color_overlay - g:ColorPick (frame2.resetOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], reset_overlay_color_callback) - end - g:NewImage (frame2, nil, "$parentResetOverlayColorImage", "resetOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.resetbutton_info.color_overlay) - g:NewButton (frame2, nil, "$parentResetOverlayColorButton", "resetOverlayColorButton", COLOR_BUTTON_WIDTH, 14, reset_overlay_color_onclick, nil, nil, nil, "color") - --reset always small - g:NewSwitch (frame2, _, "$parentResetAlwaysSmallSlider", "resetAlwaysSmallSlider", 60, 20, _, _, instance.resetbutton_info.always_small) - - --text face - local reset_text_color_onselectfont = function (_, instance, fontName) - window.instance:SetDeleteButtonSettings (fontName) - end - local reset_text_color_build_font_menu = function() - local fontObjects = SharedMedia:HashTable ("font") - local fontTable = {} - for name, fontPath in pairs (fontObjects) do - fontTable[#fontTable+1] = {value = name, label = name, onclick = reset_text_color_onselectfont, font = fontPath} + frame3.makeDefault.info = Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"] + window:create_line_background (frame3, frame3.makeDefaultLabel, frame3.makeDefault) + frame3.makeDefault:SetHook ("OnEnter", background_on_enter) + frame3.makeDefault:SetHook ("OnLeave", background_on_leave) + + --> Load Custom Skin + g:NewLabel (frame3, _, "$parentLoadCustomSkinLabel", "loadCustomSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_LOAD"], "GameFontHighlightLeft") + -- + local onSelectCustomSkin = function (_, _, index) + local style + + if (type (index) == "table") then + style = index + else + style = _detalhes.savedStyles [index] + if (not style.version or preset_version > style.version) then + return _detalhes:Msg (Loc ["STRING_OPTIONS_PRESETTOOLD"]) end - return fontTable end - g:NewDropDown (frame2, _, "$parentResetTextFontDropdown", "resetTextFontDropdown", DROPDOWN_WIDTH, 20, reset_text_color_build_font_menu, nil) - --> stretch button anchor - g:NewSwitch (frame2, _, "$parentStretchAnchorSlider", "stretchAnchorSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.stretch_button_side, true) + --> set skin preset + local skin = style.skin + instance.skin = "" + instance:ChangeSkin (skin) - --> plugins icons grow direction - g:NewSwitch (frame2, _, "$parentPluginIconsDirectionSlider", "pluginIconsDirectionSlider", 80, 20, Loc ["STRING_LEFT"], Loc ["STRING_RIGHT"], instance.plugins_grow_direction) - - --> instance toolbar side - g:NewSwitch (frame2, _, "$parentInstanceToolbarSideSlider", "instanceToolbarSideSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.toolbar_side, true) - - --> bars grow direction - g:NewSwitch (frame2, _, "$parentBarGrowDirectionSlider", "barGrowDirectionSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.bars_grow_direction, true) - - --> bars sort direction - g:NewSwitch (frame2, _, "$parentBarSortDirectionSlider", "barSortDirectionSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.bars_sort_direction, true) - - --> instance button - --text color pick - local instance_text_color_callback = function (_, r, g, b, a) - frame2.instanceTextColorImage:SetTexture (r, g, b, a) - window.instance:SetInstanceButtonSettings (nil, nil, {r, g, b, a}) - end - local instance_text_color_onclick = function() - local color_table = window.instance.instancebutton_info.text_color - g:ColorPick (frame2.instanceTextColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], instance_text_color_callback) - end - g:NewImage (frame2, nil, "$parentInstanceTextColorImage", "instanceTextColorImage", COLOR_BUTTON_WIDTH, 12, instance.instancebutton_info.text_color) - g:NewButton (frame2, nil, "$parentInstanceTextColorButton", "instanceTextColorButton", COLOR_BUTTON_WIDTH, 14, instance_text_color_onclick, nil, nil, nil, "color") - --text size - g:NewSlider (frame2, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_info.text_size)) - frame2.instanceTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance:SetInstanceButtonSettings (nil, amount) - end) - --button overlay - local instance_overlay_color_callback = function (_, r, g, b, a) - frame2.instanceOverlayColorImage:SetTexture (r, g, b, a) - window.instance:SetInstanceButtonSettings (nil, nil, nil, {r, g, b, a}) - end - local instance_overlay_color_onclick = function() - local color_table = window.instance.instancebutton_info.color_overlay - g:ColorPick (frame2.instanceOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], instance_overlay_color_callback) - end - g:NewImage (frame2, nil, "$parentInstanceOverlayColorImage", "instanceOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.instancebutton_info.color_overlay) - g:NewButton (frame2, nil, "$parentInstanceOverlayColorButton", "instanceOverlayColorButton", COLOR_BUTTON_WIDTH, 14, instance_overlay_color_onclick, nil, nil, nil, "color") - --text face - local instance_text_color_onselectfont = function (_, instance, fontName) - instance:SetInstanceButtonSettings (fontName) - end - local instance_text_color_build_font_menu = function() - 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} + --> overwrite all instance parameters with saved ones + for key, value in pairs (style) do + if (key ~= "skin") then + if (type (value) == "table") then + instance [key] = table_deepcopy (value) + else + instance [key] = value + end end - return fontTable end - g:NewDropDown (frame2, _, "$parentInstanceTextFontDropdown", "instanceTextFontDropdown", DROPDOWN_WIDTH, 20, instance_text_color_build_font_menu, nil) + + --> apply all changed attributes + instance:ChangeSkin() + + --> reload options panel + _detalhes:OpenOptionsWindow (window.instance) + end + + local loadtable = {} + local buildCustomSkinMenu = function() + table.wipe (loadtable) + for index, _table in ipairs (_detalhes.savedStyles) do + tinsert (loadtable, {value = index, label = _table.name, onclick = onSelectCustomSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", iconcolor = {.7, .7, .5, 1}}) + end + return loadtable + end + + g:NewDropDown (frame3, _, "$parentCustomSkinLoadDropdown", "customSkinSelectDropdown", 160, 20, buildCustomSkinMenu, nil) -- func, default + frame3.customSkinSelectDropdown:SetPoint ("left", frame3.loadCustomSkinLabel, "right", 2, 0) + + frame3.customSkinSelectDropdown.info = Loc ["STRING_OPTIONS_SAVELOAD_LOAD_DESC"] + window:create_line_background (frame3, frame3.loadCustomSkinLabel, frame3.customSkinSelectDropdown) + frame3.customSkinSelectDropdown:SetHook ("OnEnter", background_on_enter) + frame3.customSkinSelectDropdown:SetHook ("OnLeave", background_on_leave) + + --> Remove Custom Skin + g:NewLabel (frame3, _, "$parentRemoveCustomSkinLabel", "removeCustomSkinLabel", Loc ["STRING_OPTIONS_SAVELOAD_REMOVE"], "GameFontHighlightLeft") + -- + local onSelectCustomSkinToErase = function (_, _, index) + table.remove (_detalhes.savedStyles, index) + frame3.customSkinSelectToRemoveDropdown:Select (1) + end + + local loadtable2 = {} + local buildCustomSkinToEraseMenu = function() + table.wipe (loadtable2) + for index, _table in ipairs (_detalhes.savedStyles) do + tinsert (loadtable2, {value = index, label = _table.name, onclick = onSelectCustomSkinToErase, icon = [[Interface\COMMON\VOICECHAT-MUTED]], iconcolor = {.7, .7, .5, 1}}) + end + return loadtable2 + end + + g:NewDropDown (frame3, _, "$parentCustomSkinRemoveDropdown", "customSkinSelectToRemoveDropdown", 160, 20, buildCustomSkinToEraseMenu, nil) -- func, default + frame3.customSkinSelectToRemoveDropdown:SetPoint ("left", frame3.removeCustomSkinLabel, "right", 2, 0) + frame3.customSkinSelectToRemoveDropdown.info = Loc ["STRING_OPTIONS_SAVELOAD_LOAD_DESC"] + + frame3.customSkinSelectToRemoveDropdown.info = Loc ["STRING_OPTIONS_SAVELOAD_ERASE_DESC"] + + window:create_line_background (frame3, frame3.removeCustomSkinLabel, frame3.customSkinSelectToRemoveDropdown) + frame3.customSkinSelectToRemoveDropdown:SetHook ("OnEnter", background_on_enter) + frame3.customSkinSelectToRemoveDropdown:SetHook ("OnLeave", background_on_leave) + + + --title + titulo_skin:SetPoint (10, -10) + titulo_skin_desc:SetPoint (10, -30) + --skin select + frame3.skinLabel:SetPoint (10, -70) + --title + titulo_save:SetPoint (10, -105) + titulo_save_desc:SetPoint (10, -125) + + --saving + frame3.saveSkinLabel:SetPoint (10, -160) + frame3.saveStyle:SetPoint ("left", frame3.saveStyleName, "right", 2) + + --loading + frame3.loadCustomSkinLabel:SetPoint (10, -185) + + --removing + frame3.removeCustomSkinLabel:SetPoint (10, -210) + + frame3.makeDefault:SetPoint (10, -245) + --frame3.resetToDefaults:SetPoint (10, -270) + frame3.applyToAll:SetPoint (10, -270) + + + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Row +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame4 = window.options [4][1] + + --> bars general + local titulo_bars = g:NewLabel (frame4, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_BARS"], "GameFontNormal", 16) + local titulo_bars_desc = g:NewLabel (frame4, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_BARS_DESC"], "GameFontNormal", 9, "white") + titulo_bars_desc.width = 320 + + --> bar background color + local selectedRowBackgroundColor = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + frame4.rowBackgroundColorTexture:SetTexture (r, g, b, a) + + window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) + end + + local canceledRowBackgroundColor = function() + frame4.rowBackgroundColorTexture:SetTexture (unpack (ColorPickerFrame.previousValues)) + window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, ColorPickerFrame.previousValues) + + ColorPickerFrame.func = nil + ColorPickerFrame.opacityFunc = nil + ColorPickerFrame.cancelFunc = nil + end + + local selectedRowBackgroundAlpha = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + frame4.rowBackgroundColorTexture:SetTexture (r, g, b, a) + window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) + end + + local colorpickRowBackground = function() + ColorPickerFrame.func = selectedRowBackgroundColor + ColorPickerFrame.opacityFunc = selectedRowBackgroundAlpha + ColorPickerFrame.cancelFunc = canceledRowBackgroundColor + ColorPickerFrame.hasOpacity = true --false + ColorPickerFrame.opacity = window.instance.row_info.fixed_texture_background_color[4] + ColorPickerFrame.previousValues = window.instance.row_info.fixed_texture_background_color + ColorPickerFrame:SetParent (window.widget) + ColorPickerFrame:SetColorRGB (unpack (window.instance.row_info.fixed_texture_background_color)) + ColorPickerFrame:Show() + end --> bar texture by class color - g:NewSwitch (frame2, _, "$parentClassColorSlider", "classColorSlider", 60, 20, _, _, instance.row_info.texture_class_colors) - --> left text and right class color - g:NewSwitch (frame2, _, "$parentUseClassColorsLeftTextSlider", "classColorsLeftTextSlider", 60, 20, _, _, instance.row_info.textL_class_colors) - g:NewSwitch (frame2, _, "$parentUseClassColorsRightTextSlider", "classColorsRightTextSlider", 60, 20, _, _, instance.row_info.textR_class_colors) + g:NewSwitch (frame4, _, "$parentClassColorSlider", "classColorSlider", 60, 20, _, _, instance.row_info.texture_class_colors) + + + --> background with class color + g:NewSwitch (frame4, _, "$parentBackgroundClassColorSlider", "rowBackgroundColorByClassSlider", 60, 20, _, _, instance.row_info.texture_background_class_color) + + --> bar height + g:NewSlider (frame4, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, 20, 10, 30, 1, tonumber (instance.row_info.height)) + + --> bars grow direction + g:NewSwitch (frame4, _, "$parentBarGrowDirectionSlider", "barGrowDirectionSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.bars_grow_direction, true) + + --> bars sort direction + g:NewSwitch (frame4, _, "$parentBarSortDirectionSlider", "barSortDirectionSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.bars_sort_direction, true) + --> row texture color local selectedColorClass = function() local r, g, b = ColorPickerFrame:GetColorRGB() - frame2.fixedRowColorTexture:SetTexture (r, g, b) + frame4.fixedRowColorTexture:SetTexture (r, g, b) window.instance:SetBarSettings (nil, nil, nil, {r, g, b, 1}) end local canceledColorClass = function() local c = ColorPickerFrame.previousValues - frame2.fixedRowColorTexture:SetTexture (c[1], c[2], c[3]) + frame4.fixedRowColorTexture:SetTexture (c[1], c[2], c[3]) window.instance:SetBarSettings (nil, nil, nil, {c[1], c[2], c[3], 1}) @@ -1128,19 +1238,249 @@ function _detalhes:OpenOptionsWindow (instance) ColorPickerFrame:Show() end - g:NewImage (frame2, _, "$parentFixedRowColorTexture", "fixedRowColorTexture", COLOR_BUTTON_WIDTH, 12) - g:NewButton (frame2, _, "$parentFixedRowColorButton", "fixedRowColorButton", COLOR_BUTTON_WIDTH, 14, colorpickClass, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) + g:NewImage (frame4, _, "$parentFixedRowColorTexture", "fixedRowColorTexture", 160, 14) + g:NewButton (frame4, _, "$parentFixedRowColorButton", "fixedRowColorButton", 160, 16, colorpickClass, nil, nil, nil, Loc ["STRING_OPTIONS_COLOR"]) + + frame4.fixedRowColorButton.info = Loc ["STRING_OPTIONS_BAR_COLOR_DESC"] + window:create_line_background (frame4, frame4.fixedRowColorTexture, frame4.fixedRowColorButton) + frame4.fixedRowColorButton:SetHook ("OnEnter", background_on_enter) + frame4.fixedRowColorButton:SetHook ("OnLeave", background_on_leave) + + --> bar background + local onSelectTextureBackground = function (_, instance, textureName) + instance:SetBarSettings (nil, nil, nil, nil, textureName) + end + + 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} + end + local buildTextureMenu2 = function() return texTable2 end + + g:NewDropDown (frame4, _, "$parentRowBackgroundTextureDropdown", "rowBackgroundDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu2, nil) + + --> bar texture + local onSelectTexture = function (_, instance, textureName) + instance:SetBarSettings (nil, textureName) + end + + 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} + end + + local buildTextureMenu = function() return texTable end + g:NewDropDown (frame4, _, "$parentTextureDropdown", "textureDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu, nil) + + -- bar grow direction + g:NewLabel (frame4, _, "$parentBarGrowDirectionLabel", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION"], "GameFontHighlightLeft") + + frame4.barGrowDirectionSlider:SetPoint ("left", frame4.barGrowDirectionLabel, "right", 2) + frame4.barGrowDirectionSlider.OnSwitch = function (self, instance, value) + instance:SetBarGrowDirection (value and 2 or 1) + end + frame4.barGrowDirectionSlider.thumb:SetSize (50, 12) + + frame4.barGrowDirectionSlider.info = Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"] + window:create_line_background (frame4, frame4.barGrowDirectionLabel, frame4.barGrowDirectionSlider) + frame4.barGrowDirectionSlider:SetHook ("OnEnter", background_on_enter) + frame4.barGrowDirectionSlider:SetHook ("OnLeave", background_on_leave) + + -- bar sort direction + g:NewLabel (frame4, _, "$parentBarSortDirectionLabel", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION"], "GameFontHighlightLeft") + + frame4.barSortDirectionSlider:SetPoint ("left", frame4.barSortDirectionLabel, "right", 2) + frame4.barSortDirectionSlider.OnSwitch = function (self, instance, value) + instance.bars_sort_direction = value and 2 or 1 + _detalhes:AtualizaGumpPrincipal (-1, true) + end + frame4.barSortDirectionSlider.thumb:SetSize (50, 12) + + frame4.barSortDirectionSlider.info = Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] + window:create_line_background (frame4, frame4.barSortDirectionLabel, frame4.barSortDirectionSlider) + frame4.barSortDirectionSlider:SetHook ("OnEnter", background_on_enter) + frame4.barSortDirectionSlider:SetHook ("OnLeave", background_on_leave) + + + g:NewImage (frame4, _, "$parentRowBackgroundColor", "rowBackgroundColorTexture", 160, 14) + g:NewButton (frame4, _, "$parentRowBackgroundColorButton", "rowBackgroundColorButton", 160, 16, colorpickRowBackground, nil, nil, nil, Loc ["STRING_OPTIONS_COLORANDALPHA"]) + + frame4.rowBackgroundColorButton.info = Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] + window:create_line_background (frame4, frame4.rowBackgroundColorTexture, frame4.rowBackgroundColorButton) + frame4.rowBackgroundColorButton:SetHook ("OnEnter", background_on_enter) + frame4.rowBackgroundColorButton:SetHook ("OnLeave", background_on_leave) + + + -- Bar Settings + + g:NewLabel (frame4, _, "$parentRowUpperTextureAnchor", "rowUpperTextureLabel", "Top Texture", "GameFontNormal") + g:NewLabel (frame4, _, "$parentRowLowerTextureAnchor", "rowLowerTextureLabel", "Bottom Texture (background)", "GameFontNormal") + + --alpha + g:NewLabel (frame4, _, "$parentRowAlphaLabel", "rowAlphaLabel", "Alpha", "GameFontHighlightLeft") + g:NewSlider (frame4, _, "$parentRowAlphaSlider", "rowAlphaSlider", SLIDER_WIDTH, 20, 0.02, 1, 0.02, instance.row_info.alpha, true) + frame4.rowAlphaSlider:SetPoint ("left", frame4.rowAlphaLabel, "right", 2, 0) + frame4.rowAlphaSlider.useDecimals = true + frame4.rowAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount) + self.amt:SetText (string.format ("%.2f", amount)) + instance.row_info.alpha = amount --precisa atualizar a barra + instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, amount) + return true + end) + frame4.rowAlphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2) + + frame4.rowAlphaSlider.info = "Change the alpha of the row" + window:create_line_background (frame4, frame4.rowAlphaLabel, frame4.rowAlphaSlider) + frame4.rowAlphaSlider:SetHook ("OnEnter", background_on_enter) + frame4.rowAlphaSlider:SetHook ("OnLeave", background_on_leave) + + -- texture + g:NewLabel (frame4, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft") + -- + frame4.textureDropdown:SetPoint ("left", frame4.textureLabel, "right", 2) + + frame4.textureDropdown.info = Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] + window:create_line_background (frame4, frame4.textureLabel, frame4.textureDropdown) + frame4.textureDropdown:SetHook ("OnEnter", background_on_enter) + frame4.textureDropdown:SetHook ("OnLeave", background_on_leave) + + -- background texture + g:NewLabel (frame4, _, "$parentRowBackgroundTextureLabel", "rowBackgroundLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"], "GameFontHighlightLeft") + -- + frame4.rowBackgroundDropdown:SetPoint ("left", frame4.rowBackgroundLabel, "right", 2) + + frame4.rowBackgroundDropdown.info = Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] + window:create_line_background (frame4, frame4.rowBackgroundLabel, frame4.rowBackgroundDropdown) + frame4.rowBackgroundDropdown:SetHook ("OnEnter", background_on_enter) + frame4.rowBackgroundDropdown:SetHook ("OnLeave", background_on_leave) + + -- background color + g:NewLabel (frame4, _, "$parentRowBackgroundColorLabel", "rowBackgroundColorLabel", Loc ["STRING_OPTIONS_BAR_BCOLOR"], "GameFontHighlightLeft") + + frame4.rowBackgroundColorTexture:SetTexture (1, 1, 1) + frame4.rowBackgroundColorButton:SetPoint ("left", frame4.rowBackgroundColorTexture, "left") + frame4.rowBackgroundColorButton:InstallCustomTexture() + + -- back background with class color + g:NewLabel (frame4, _, "$parentRowBackgroundClassColorLabel", "rowBackgroundColorByClassLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"], "GameFontHighlightLeft") + + frame4.rowBackgroundColorByClassSlider:SetPoint ("left", frame4.rowBackgroundColorByClassLabel, "right", 2) + frame4.rowBackgroundColorByClassSlider.OnSwitch = function (self, instance, value) + instance:SetBarSettings (nil, nil, nil, nil, nil, value) + end + + frame4.rowBackgroundColorByClassSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] + window:create_line_background (frame4, frame4.rowBackgroundColorByClassLabel, frame4.rowBackgroundColorByClassSlider) + frame4.rowBackgroundColorByClassSlider:SetHook ("OnEnter", background_on_enter) + frame4.rowBackgroundColorByClassSlider:SetHook ("OnLeave", background_on_leave) + + -- height + g:NewLabel (frame4, _, "$parentRowHeightLabel", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"], "GameFontHighlightLeft") + -- + frame4.rowHeightSlider:SetPoint ("left", frame4.rowHeightLabel, "right", 2) + frame4.rowHeightSlider:SetThumbSize (50) + frame4.rowHeightSlider:SetHook ("OnValueChange", function (self, instance, amount) + instance.row_info.height = amount + instance.row_height = instance.row_info.height+instance.row_info.space.between + instance:RefreshBars() + instance:InstanceReset() + instance:ReajustaGump() + end) + + frame4.rowHeightSlider.info = Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] + window:create_line_background (frame4, frame4.rowHeightLabel, frame4.rowHeightSlider) + frame4.rowHeightSlider:SetHook ("OnEnter", background_on_enter) + frame4.rowHeightSlider:SetHook ("OnLeave", background_on_leave) + + -- texture color by class color + g:NewLabel (frame4, _, "$parentUseClassColorsLabel", "classColorsLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"], "GameFontHighlightLeft") + frame4.classColorSlider:SetPoint ("left", frame4.classColorsLabel, "right", 2) + frame4.classColorSlider.OnSwitch = function (self, instance, value) + instance:SetBarSettings (nil, nil, value) + end + + frame4.classColorSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] + window:create_line_background (frame4, frame4.classColorsLabel, frame4.classColorSlider) + frame4.classColorSlider:SetHook ("OnEnter", background_on_enter) + frame4.classColorSlider:SetHook ("OnLeave", background_on_leave) + + frame4.fixedRowColorButton:InstallCustomTexture() + frame4.fixedRowColorTexture:SetTexture (1, 1, 1) + + --icon file + g:NewLabel (frame4, _, "$parentIconFileLabel", "iconFileLabel", Loc ["STRING_OPTIONS_BAR_ICONFILE"], "GameFontHighlightLeft") + g:NewTextEntry (frame4, _, "$parentIconFileEntry", "iconFileEntry", 260, 20) + frame4.iconFileEntry:SetPoint ("left", frame4.iconFileLabel, "right", 2, 0) + + frame4.iconFileEntry.tooltip = "press escape to restore default value" + frame4.iconFileEntry:SetHook ("OnEnterPressed", function() + instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, frame4.iconFileEntry.text) + end) + frame4.iconFileEntry:SetHook ("OnEscapePressed", function() + frame4.iconFileEntry:SetText ([[Interface\AddOns\Details\images\classes_small]]) + frame4.iconFileEntry:ClearFocus() + instance:SetBarSettings (nil, nil, nil, nil, nil, nil, nil, nil, [[Interface\AddOns\Details\images\classes_small]]) + return true + end) + + frame4.iconFileEntry.info = Loc ["STRING_OPTIONS_BAR_ICONFILE_DESC"] + window:create_line_background (frame4, frame4.iconFileLabel, frame4.iconFileEntry) + frame4.iconFileEntry:SetHook ("OnEnter", background_on_enter) + frame4.iconFileEntry:SetHook ("OnLeave", background_on_leave) + + frame4.iconFileEntry.text = instance.row_info.icon_file + + --anchors: + titulo_bars:SetPoint (10, -10) + titulo_bars_desc:SetPoint (10, -30) + + frame4.rowHeightLabel:SetPoint (10, -70) --bar height + frame4.barGrowDirectionLabel:SetPoint (10, -95) --grow direction + frame4.barSortDirectionLabel:SetPoint (10, -120) --sort direction + + frame4.rowUpperTextureLabel:SetPoint (10, -155) --anchor + + frame4.textureLabel:SetPoint (10, -180) --bar texture + frame4.rowAlphaLabel:SetPoint (10, -205) --bar alpha slider + frame4.classColorsLabel:SetPoint (10, -230) --class color + frame4.fixedRowColorTexture:SetPoint (10, -255) + frame4.fixedRowColorButton:SetPoint (10, -255) + + frame4.rowLowerTextureLabel:SetPoint (10, -290) + + frame4.rowBackgroundLabel:SetPoint (10, -315) --select background + frame4.rowBackgroundColorByClassLabel:SetPoint (10, -340) --class color background + frame4.rowBackgroundColorTexture:SetPoint (10, -365) --bar color background + + frame4.iconFileLabel:SetPoint (10, -405) + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Texts +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame5 = window.options [5][1] + + --> bars text + local titulo_texts = g:NewLabel (frame5, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_TEXT"], "GameFontNormal", 16) + local titulo_texts_desc = g:NewLabel (frame5, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_TEXT_DESC"], "GameFontNormal", 9, "white") + titulo_texts_desc.width = 320 + + --> text size + g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.row_info.font_size)) + --> text color local selectedTextColor = function() local r, g, b = ColorPickerFrame:GetColorRGB() - frame2.fixedRowColorText:SetTexture (r, g, b) + frame5.fixedRowColorText:SetTexture (r, g, b) window.instance:SetBarTextSettings (nil, nil, {r, g, b, 1}) end local canceledTextColor = function() local c = ColorPickerFrame.previousValues - frame2.fixedRowColorText:SetTexture (c [1], c [2], c [3]) + frame5.fixedRowColorText:SetTexture (c [1], c [2], c [3]) window.instance:SetBarTextSettings (nil, nil, {c [1], c [2], c [3], 1}) ColorPickerFrame.func = nil @@ -1158,24 +1498,830 @@ function _detalhes:OpenOptionsWindow (instance) ColorPickerFrame:Show() end - g:NewImage (frame2, _, "$parentFixedRowColorTTexture", "fixedRowColorText", COLOR_BUTTON_WIDTH, 12) - g:NewButton (frame2, _, "$parentFixedRowColorTButton", "fixedRowColorTButton", COLOR_BUTTON_WIDTH, 14, colorpickTextColor, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) + g:NewImage (frame5, _, "$parentFixedRowColorTTexture", "fixedRowColorText", 160, 14) + g:NewButton (frame5, _, "$parentFixedRowColorTButton", "fixedRowColorTButton", 160, 16, colorpickTextColor, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) --> outline - g:NewSwitch (frame2, _, "$parentTextLeftOutlineSlider", "textLeftOutlineSlider", 60, 20, _, _, instance.row_info.textL_outline) - g:NewSwitch (frame2, _, "$parentTextRightOutlineSlider", "textRightOutlineSlider", 60, 20, _, _, instance.row_info.textR_outline) + g:NewSwitch (frame5, _, "$parentTextLeftOutlineSlider", "textLeftOutlineSlider", 60, 20, _, _, instance.row_info.textL_outline) + g:NewSwitch (frame5, _, "$parentTextRightOutlineSlider", "textRightOutlineSlider", 60, 20, _, _, instance.row_info.textR_outline) + + --> text font + local onSelectFont = function (_, instance, fontName) + instance:SetBarTextSettings (nil, fontName) + end + 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} + end + local buildFontMenu = function() return fontTable end + g:NewDropDown (frame5, _, "$parentFontDropdown", "fontDropdown", DROPDOWN_WIDTH, 20, buildFontMenu, nil) + + -- Text Settings + + -- Text Sizes + g:NewLabel (frame5, _, "$parentFontSizeLabel", "fonsizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"], "GameFontHighlightLeft") + frame5.fonsizeSlider:SetPoint ("left", frame5.fonsizeLabel, "right", 2) + frame5.fonsizeSlider:SetThumbSize (50) + frame5.fonsizeSlider:SetHook ("OnValueChange", function (self, instance, amount) + instance:SetBarTextSettings (amount) + end) + frame5.fonsizeSlider.info = Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"] + window:create_line_background (frame5, frame5.fonsizeLabel, frame5.fonsizeSlider) + frame5.fonsizeSlider:SetHook ("OnEnter", background_on_enter) + frame5.fonsizeSlider:SetHook ("OnLeave", background_on_leave) + + -- Text Fonts + g:NewLabel (frame5, _, "$parentFontLabel", "fontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"], "GameFontHighlightLeft") + frame5.fontDropdown:SetPoint ("left", frame5.fontLabel, "right", 2) + + frame5.fontDropdown.info = Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] + window:create_line_background (frame5, frame5.fontLabel, frame5.fontDropdown) + frame5.fontDropdown:SetHook ("OnEnter", background_on_enter) + frame5.fontDropdown:SetHook ("OnLeave", background_on_leave) + + -- left text by class color + --> left text and right class color + g:NewSwitch (frame5, _, "$parentUseClassColorsLeftTextSlider", "classColorsLeftTextSlider", 60, 20, _, _, instance.row_info.textL_class_colors) + g:NewSwitch (frame5, _, "$parentUseClassColorsRightTextSlider", "classColorsRightTextSlider", 60, 20, _, _, instance.row_info.textR_class_colors) + g:NewLabel (frame5, _, "$parentUseClassColorsLeftText", "classColorsLeftTextLabel", Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"], "GameFontHighlightLeft") + + frame5.classColorsLeftTextSlider:SetPoint ("left", frame5.classColorsLeftTextLabel, "right", 2) + frame5.classColorsLeftTextSlider.OnSwitch = function (self, instance, value) + instance:SetBarTextSettings (nil, nil, nil, value) + end + + frame5.classColorsLeftTextSlider.info = Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] + window:create_line_background (frame5, frame5.classColorsLeftTextLabel, frame5.classColorsLeftTextSlider) + frame5.classColorsLeftTextSlider:SetHook ("OnEnter", background_on_enter) + frame5.classColorsLeftTextSlider:SetHook ("OnLeave", background_on_leave) + + -- right text by class color + g:NewLabel (frame5, _, "$parentUseClassColorsRightText", "classColorsRightTextLabel", Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"], "GameFontHighlightLeft") + + frame5.classColorsRightTextSlider:SetPoint ("left", frame5.classColorsRightTextLabel, "right", 2) + frame5.classColorsRightTextSlider.OnSwitch = function (self, instance, value) + instance:SetBarTextSettings (nil, nil, nil, nil, value) + end + + frame5.classColorsRightTextSlider.info = Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] + window:create_line_background (frame5, frame5.classColorsRightTextLabel, frame5.classColorsRightTextSlider) + frame5.classColorsRightTextSlider:SetHook ("OnEnter", background_on_enter) + frame5.classColorsRightTextSlider:SetHook ("OnLeave", background_on_leave) + + frame5.fixedRowColorText:SetTexture (1, 1, 1) + frame5.fixedRowColorTButton:InstallCustomTexture() + + -- left outline + g:NewLabel (frame5, _, "$parentTextLeftOutlineLabel", "textLeftOutlineLabel", Loc ["STRING_OPTIONS_TEXT_LOUTILINE"], "GameFontHighlightLeft") + + frame5.textLeftOutlineSlider:SetPoint ("left", frame5.textLeftOutlineLabel, "right", 2) + frame5.textLeftOutlineSlider.OnSwitch = function (self, instance, value) + instance:SetBarTextSettings (nil, nil, nil, nil, nil, value) + end + + frame5.textLeftOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] + window:create_line_background (frame5, frame5.textLeftOutlineLabel, frame5.textLeftOutlineSlider) + frame5.textLeftOutlineSlider:SetHook ("OnEnter", background_on_enter) + frame5.textLeftOutlineSlider:SetHook ("OnLeave", background_on_leave) + + -- right outline + g:NewLabel (frame5, _, "$parentTextRightOutlineLabel", "textRightOutlineLabel", Loc ["STRING_OPTIONS_TEXT_ROUTILINE"], "GameFontHighlightLeft") + + frame5.textRightOutlineSlider:SetPoint ("left", frame5.textRightOutlineLabel, "right", 2) + frame5.textRightOutlineSlider.OnSwitch = function (self, instance, value) + instance:SetBarTextSettings (nil, nil, nil, nil, nil, nil, value) + end + + frame5.textRightOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] + window:create_line_background (frame5, frame5.textRightOutlineLabel, frame5.textRightOutlineSlider) + frame5.textRightOutlineSlider:SetHook ("OnEnter", background_on_enter) + frame5.textRightOutlineSlider:SetHook ("OnLeave", background_on_leave) + + titulo_texts:SetPoint (10, -10) + titulo_texts_desc:SetPoint (10, -30) + + frame5.fonsizeLabel:SetPoint (10, -70) --text size + frame5.fontLabel:SetPoint (10, -95) --text fontface + frame5.textLeftOutlineLabel:SetPoint (10, -120) --left outline + frame5.textRightOutlineLabel:SetPoint (10, -145) --right outline + frame5.classColorsLeftTextLabel:SetPoint (10, -170) --left color by class + frame5.classColorsRightTextLabel:SetPoint (10, -195) --right color by class + + frame5.fixedRowColorText:SetPoint (10, -220) --right color by class + frame5.fixedRowColorTButton:SetPoint (10, -220) --right color by class + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Window Settings +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame6 = window.options [6][1] + + --> window + local titulo_instance = g:NewLabel (frame6, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_INSTANCE"], "GameFontNormal", 16) + local titulo_instance_desc = g:NewLabel (frame6, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_INSTANCE_DESC"], "GameFontNormal", 9, "white") + titulo_instance_desc.width = 320 + + --> instance color + local selectedColor = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + + frame6.instancecolortexture:SetTexture (r, g, b) + frame6.instancecolortexture:SetAlpha (a) + + window.instance:InstanceColor (r, g, b, a) + end + + local canceledColor = function() + local c = ColorPickerFrame.previousValues + frame6.instancecolortexture:SetTexture (c [1], c [2], c [3]) + frame6.instancecolortexture:SetAlpha (c [4]) + + window.instance:InstanceColor (c [1], c [2], c [3], c [4]) + + ColorPickerFrame.func = nil + ColorPickerFrame.opacityFunc = nil + ColorPickerFrame.cancelFunc = nil + end + + local selectedAlpha = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + local a = OpacitySliderFrame:GetValue() + + --a = _detalhes:Scale (0, 1, 0.5, 1, a) - 0.5 + --print (a) + + frame6.instancecolortexture:SetTexture (r, g, b) + frame6.instancecolortexture:SetAlpha (a) + + window.instance:InstanceColor (r, g, b, a) + + end + + local colorpick = function() + ColorPickerFrame.func = selectedColor + ColorPickerFrame.opacityFunc = selectedAlpha + ColorPickerFrame.cancelFunc = canceledColor + ColorPickerFrame.hasOpacity = true --false + ColorPickerFrame.opacity = window.instance.color[4] or 1 + ColorPickerFrame.previousValues = window.instance.color + ColorPickerFrame:SetParent (window.widget) + ColorPickerFrame:SetColorRGB (unpack (window.instance.color)) + ColorPickerFrame:Show() + end + + g:NewImage (frame6, _, "$parentInstanceColorTexture", "instancecolortexture", COLOR_BUTTON_WIDTH, 12) + g:NewButton (frame6, _, "$parentInstanceColorButton", "instancecolorbutton", COLOR_BUTTON_WIDTH, 14, colorpick, nil, nil, nil, Loc ["STRING_OPTIONS_COLORANDALPHA"]) + + --> Transparency + g:NewSlider (frame6, _, "$parentAlphaSlider", "alphaSlider", SLIDER_WIDTH, 20, 0.02, 1, 0.02, instance.bg_alpha, true) + + local selectedBackgroundColor = function() + local r, g, b = ColorPickerFrame:GetColorRGB() + window.instance:SetBackgroundColor (r, g, b) + frame6.backgroundColorTexture:SetTexture (r, g, b) + end + + local canceledBackgroundColor = function() + local c = ColorPickerFrame.previousValues + window.instance:SetBackgroundColor (unpack (c)) + frame6.backgroundColorTexture:SetTexture (unpack (c)) + ColorPickerFrame.func = nil + ColorPickerFrame.cancelFunc = nil + end + + local colorpickBackgroundColor = function() + ColorPickerFrame.func = selectedBackgroundColor + ColorPickerFrame.cancelFunc = canceledBackgroundColor + ColorPickerFrame.opacityFunc = nil + ColorPickerFrame.hasOpacity = false + ColorPickerFrame.previousValues = {window.instance.bg_r, window.instance.bg_g, window.instance.bg_b} + ColorPickerFrame:SetParent (window.widget) + ColorPickerFrame:SetColorRGB (window.instance.bg_r, window.instance.bg_g, window.instance.bg_b) + ColorPickerFrame:Show() + end + + g:NewImage (frame6, _, "$parentBackgroundColorTexture", "backgroundColorTexture", COLOR_BUTTON_WIDTH, 12) + g:NewButton (frame6, _, "$parentBackgroundColorButton", "backgroundColorButton", COLOR_BUTTON_WIDTH, 14, colorpickBackgroundColor, nil, nil, nil, Loc ["STRING_OPTIONS_COLOR"]) + + --> sidebars statusbar + g:NewSwitch (frame6, _, "$parentSideBarsSlider", "sideBarsSlider", 60, 20, _, _, instance.show_sidebars) + g:NewSwitch (frame6, _, "$parentStatusbarSlider", "statusbarSlider", 60, 20, _, _, instance.show_statusbar) + + --> stretch button anchor + g:NewSwitch (frame6, _, "$parentStretchAnchorSlider", "stretchAnchorSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.stretch_button_side, true) + + -- Instance Settings + + -- Instance Color + g:NewLabel (frame6, _, "$parentInstanceColorLabel", "instancecolor", Loc ["STRING_OPTIONS_INSTANCE_COLOR"], "GameFontHighlightLeft") + + frame6.instancecolortexture:SetPoint ("left", frame6.instancecolor, "right", 2) + frame6.instancecolortexture:SetTexture (1, 1, 1) + + frame6.instancecolorbutton:SetPoint ("left", frame6.instancecolor, "right", 2) + frame6.instancecolorbutton:InstallCustomTexture() + + frame6.instancecolorbutton.info = Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] + window:create_line_background (frame6, frame6.instancecolor, frame6.instancecolorbutton) + frame6.instancecolorbutton:SetHook ("OnEnter", background_on_enter) + frame6.instancecolorbutton:SetHook ("OnLeave", background_on_leave) + + -- Color and Alpha + g:NewLabel (frame6, _, "$parentAlphaLabel", "alphaLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA"], "GameFontHighlightLeft") + g:NewLabel (frame6, _, "$parentBackgroundColorLabel", "backgroundColorLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"], "GameFontHighlightLeft") + -- alpha background + frame6.alphaSlider:SetPoint ("left", frame6.alphaLabel, "right", 2, 0) + frame6.alphaSlider.useDecimals = true + frame6.alphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue + self.amt:SetText (string.format ("%.2f", amount)) + instance:SetBackgroundAlpha (amount) + return true + end) + frame6.alphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2) + frame6.backgroundColorTexture:SetPoint ("left", frame6.backgroundColorLabel, "right", 2) + frame6.backgroundColorTexture:SetTexture (1, 1, 1) + frame6.backgroundColorButton:SetPoint ("left", frame6.backgroundColorLabel, "right", 2) + frame6.backgroundColorButton:InstallCustomTexture() + + frame6.alphaSlider.info = Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] + window:create_line_background (frame6, frame6.alphaLabel, frame6.alphaSlider) + frame6.alphaSlider:SetHook ("OnEnter", background_on_enter) + frame6.alphaSlider:SetHook ("OnLeave", background_on_leave) + + -- stretch button anchor + g:NewLabel (frame6, _, "$parentStretchAnchorLabel", "stretchAnchorLabel", Loc ["STRING_OPTIONS_STRETCH"], "GameFontHighlightLeft") + + frame6.stretchAnchorSlider:SetPoint ("left", frame6.stretchAnchorLabel, "right", 2) + frame6.stretchAnchorSlider.OnSwitch = function (self, instance, value) + instance:StretchButtonAnchor (value and 2 or 1) + end + frame6.stretchAnchorSlider.thumb:SetSize (40, 12) + + frame6.stretchAnchorSlider.info = Loc ["STRING_OPTIONS_STRETCH_DESC"] + window:create_line_background (frame6, frame6.stretchAnchorLabel, frame6.stretchAnchorSlider) + frame6.stretchAnchorSlider:SetHook ("OnEnter", background_on_enter) + frame6.stretchAnchorSlider:SetHook ("OnLeave", background_on_leave) + + -- instance toolbar side + g:NewLabel (frame6, _, "$parentInstanceToolbarSideLabel", "instanceToolbarSideLabel", Loc ["STRING_OPTIONS_TOOLBARSIDE"], "GameFontHighlightLeft") + g:NewSwitch (frame6, _, "$parentInstanceToolbarSideSlider", "instanceToolbarSideSlider", 80, 20, Loc ["STRING_TOP"], Loc ["STRING_BOTTOM"], instance.toolbar_side, true) + frame6.instanceToolbarSideSlider:SetPoint ("left", frame6.instanceToolbarSideLabel, "right", 2) + frame6.instanceToolbarSideSlider.OnSwitch = function (self, instance, value) + instance.toolbar_side = value and 2 or 1 + instance:ToolbarSide (side) + + end + frame6.instanceToolbarSideSlider.thumb:SetSize (50, 12) + + frame6.instanceToolbarSideSlider.info = Loc ["STRING_OPTIONS_TOOLBARSIDE_DESC"] + window:create_line_background (frame6, frame6.instanceToolbarSideLabel, frame6.instanceToolbarSideSlider) + frame6.instanceToolbarSideSlider:SetHook ("OnEnter", background_on_enter) + frame6.instanceToolbarSideSlider:SetHook ("OnLeave", background_on_leave) + + -- show side bars + + g:NewLabel (frame6, _, "$parentSideBarsLabel", "sideBarsLabel", Loc ["STRING_OPTIONS_SHOW_SIDEBARS"], "GameFontHighlightLeft") + + frame6.sideBarsSlider:SetPoint ("left", frame6.sideBarsLabel, "right", 2) + frame6.sideBarsSlider.OnSwitch = function (self, instance, value) + if (value) then + instance:ShowSideBars() + else + instance:HideSideBars() + end + end + + frame6.sideBarsSlider.info = Loc ["STRING_OPTIONS_SHOW_SIDEBARS_DESC"] + window:create_line_background (frame6, frame6.sideBarsLabel, frame6.sideBarsSlider) + frame6.sideBarsSlider:SetHook ("OnEnter", background_on_enter) + frame6.sideBarsSlider:SetHook ("OnLeave", background_on_leave) + + -- show statusbar + + g:NewLabel (frame6, _, "$parentStatusbarLabel", "statusbarLabel", Loc ["STRING_OPTIONS_SHOW_STATUSBAR"], "GameFontHighlightLeft") + + frame6.statusbarSlider:SetPoint ("left", frame6.statusbarLabel, "right", 2) + frame6.statusbarSlider.OnSwitch = function (self, instance, value) + if (value) then + instance:ShowStatusBar() + else + instance:HideStatusBar() + end + end + + frame6.statusbarSlider.info = Loc ["STRING_OPTIONS_SHOW_STATUSBAR_DESC"] + window:create_line_background (frame6, frame6.statusbarLabel, frame6.statusbarSlider) + frame6.statusbarSlider:SetHook ("OnEnter", background_on_enter) + frame6.statusbarSlider:SetHook ("OnLeave", background_on_leave) + + --show total bar + + g:NewLabel (frame6, _, "$parentTotalBarLabel", "totalBarLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR"], "GameFontHighlightLeft") + g:NewSwitch (frame6, _, "$parentTotalBarSlider", "totalBarSlider", 60, 20, _, _, instance.total_bar.enabled) + + frame6.totalBarSlider:SetPoint ("left", frame6.totalBarLabel, "right", 2) + frame6.totalBarSlider.OnSwitch = function (self, instance, value) + instance.total_bar.enabled = value + instance:InstanceReset() + end + + frame6.totalBarSlider.info = Loc ["STRING_OPTIONS_SHOW_TOTALBAR_DESC"] + window:create_line_background (frame6, frame6.totalBarLabel, frame6.totalBarSlider) + frame6.totalBarSlider:SetHook ("OnEnter", background_on_enter) + frame6.totalBarSlider:SetHook ("OnLeave", background_on_leave) + + --total bar color + local totalbar_color_callback = function (_, r, g, b) + window.instance.total_bar.color[1] = r + window.instance.total_bar.color[2] = g + window.instance.total_bar.color[3] = b + frame6.totalBarColorTexture:SetTexture (r, g, b) + instance:InstanceReset() + end + local totalbar_color = function() + local r, gg, b = unpack (window.instance.total_bar.color) + g:ColorPick (frame6.totalBarColorButton.widget, r, gg, b, false, totalbar_color_callback) + end + g:NewLabel (frame6, _, "$parentTotalBarColorLabel", "totalBarColorLabel", Loc ["STRING_OPTIONS_COLOR"], "GameFontHighlightLeft") + g:NewImage (frame6, _, "$parentTotalBarColorTexture", "totalBarColorTexture", COLOR_BUTTON_WIDTH, 14) + g:NewButton (frame6, _, "$parentTotalBarColorButton", "totalBarColorButton", COLOR_BUTTON_WIDTH, 16, totalbar_color, nil, nil, nil, Loc ["STRING_OPTIONS_COLOR"]) + frame6.totalBarColorButton:InstallCustomTexture() + frame6.totalBarColorTexture:SetPoint ("left", frame6.totalBarColorLabel, "right", 2, 0) + frame6.totalBarColorButton:SetPoint ("left", frame6.totalBarColorLabel, "right", 2, 0) + + --total bar only in group + g:NewLabel (frame6, _, "$parentTotalBarOnlyInGroupLabel", "totalBarOnlyInGroupLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP"], "GameFontHighlightLeft") + g:NewSwitch (frame6, _, "$parentTotalBarOnlyInGroupSlider", "totalBarOnlyInGroupSlider", 60, 20, _, _, instance.total_bar.only_in_group) + + frame6.totalBarOnlyInGroupSlider:SetPoint ("left", frame6.totalBarOnlyInGroupLabel, "right", 2) + frame6.totalBarOnlyInGroupSlider.OnSwitch = function (self, instance, value) + instance.total_bar.only_in_group = value + instance:InstanceReset() + end + + frame6.totalBarOnlyInGroupSlider.info = Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP_DESC"] + window:create_line_background (frame6, frame6.totalBarOnlyInGroupLabel, frame6.totalBarOnlyInGroupSlider) + frame6.totalBarOnlyInGroupSlider:SetHook ("OnEnter", background_on_enter) + frame6.totalBarOnlyInGroupSlider:SetHook ("OnLeave", background_on_leave) + + --total bar icon + local totalbar_pickicon_callback = function (texture) + instance.total_bar.icon = texture + frame6.totalBarIconTexture:SetTexture (texture) + instance:InstanceReset() + end + local totalbar_pickicon = function() + g:IconPick (totalbar_pickicon_callback) + end + g:NewLabel (frame6, _, "$parentTotalBarIconLabel", "totalBarIconLabel", Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON"], "GameFontHighlightLeft") + g:NewImage (frame6, _, "$parentTotalBarIconTexture", "totalBarIconTexture", 20, 20) + g:NewButton (frame6, _, "$parentTotalBarIconButton", "totalBarIconButton", 20, 20, totalbar_pickicon) + frame6.totalBarIconButton:InstallCustomTexture() + frame6.totalBarIconButton:SetPoint ("left", frame6.totalBarIconLabel, "right", 2, 0) + frame6.totalBarIconTexture:SetPoint ("left", frame6.totalBarIconLabel, "right", 2, 0) + + frame6.totalBarIconButton.info = Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON_DESC"] + window:create_line_background (frame6, frame6.totalBarIconLabel, frame6.totalBarIconButton) + frame6.totalBarIconButton:SetHook ("OnEnter", background_on_enter) + frame6.totalBarIconButton:SetHook ("OnLeave", background_on_leave) + + --anchors + titulo_instance:SetPoint (10, -10) + titulo_instance_desc:SetPoint (10, -30) + + frame6.instancecolor:SetPoint (10, -70) --window color + frame6.alphaLabel:SetPoint (10, -95) --background alpha + frame6.backgroundColorLabel:SetPoint (10, -120) --background color + + frame6.instanceToolbarSideLabel:SetPoint (10, -145) + frame6.sideBarsLabel:SetPoint (10, -170) --borders + frame6.statusbarLabel:SetPoint (10, -195) --statusbar + frame6.stretchAnchorLabel:SetPoint (10, -220) --stretch direction + + g:NewLabel (frame6, _, "$parentTotalBarAnchor", "totalBarAnchorLabel", "Total Bar", "GameFontNormal") + frame6.totalBarAnchorLabel:SetPoint (10, -255) + frame6.totalBarLabel:SetPoint (10, -280) + frame6.totalBarOnlyInGroupLabel:SetPoint (10, -305) + frame6.totalBarIconLabel:SetPoint (10, -330) + frame6.totalBarColorLabel:SetPoint (10, -355) + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Top Menu Bar +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame7 = window.options [7][1] + + local titulo_toolbar = g:NewLabel (frame7, _, "$parentTituloToolbar", "tituloToolbarLabel", Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS"], "GameFontNormal", 16) + local titulo_toolbar_desc = g:NewLabel (frame7, _, "$parentTituloToolbar2", "tituloToolbar2Label", Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS_DESC"], "GameFontNormal", 9, "white") + titulo_toolbar_desc.width = 320 + + --> instance button anchor + g:NewSlider (frame7, _, "$parentInstanceButtonAnchorXSlider", "instanceButtonAnchorXSlider", SLIDER_WIDTH, 20, -200, 20, 1, instance.instance_button_anchor[1]) + g:NewSlider (frame7, _, "$parentInstanceButtonAnchorYSlider", "instanceButtonAnchorYSlider", SLIDER_WIDTH, 20, -10, 10, 1, instance.instance_button_anchor[2]) + + --> desaturate + g:NewSwitch (frame7, _, "$parentDesaturateMenuSlider", "desaturateMenuSlider", 60, 20, _, _, instance.desaturated_menu) + + --> hide icon + g:NewSwitch (frame7, _, "$parentHideIconSlider", "hideIconSlider", 60, 20, _, _, instance.hide_icon) + + --> menu anchor + g:NewSlider (frame7, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, 20, -20, 200, 1, instance.menu_anchor[1]) + g:NewSlider (frame7, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, 20, -10, 10, 1, instance.menu_anchor[2]) + + --> plugins icons grow direction + g:NewSwitch (frame7, _, "$parentPluginIconsDirectionSlider", "pluginIconsDirectionSlider", 80, 20, Loc ["STRING_LEFT"], Loc ["STRING_RIGHT"], instance.plugins_grow_direction) + + + -- menu anchors + g:NewLabel (frame7, _, "$parentMenuAnchorXLabel", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU_X"], "GameFontHighlightLeft") + frame7.menuAnchorXSlider:SetPoint ("left", frame7.menuAnchorXLabel, "right", 2) + frame7.menuAnchorXSlider:SetThumbSize (50) + frame7.menuAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x) + instance:MenuAnchor (x, nil) + end) + + frame7.menuAnchorXSlider.info = Loc ["STRING_OPTIONS_MENU_X_DESC"] + window:create_line_background (frame7, frame7.menuAnchorXLabel, frame7.menuAnchorXSlider) + frame7.menuAnchorXSlider:SetHook ("OnEnter", background_on_enter) + frame7.menuAnchorXSlider:SetHook ("OnLeave", background_on_leave) + + g:NewLabel (frame7, _, "$parentMenuAnchorYLabel", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU_Y"], "GameFontHighlightLeft") + frame7.menuAnchorYSlider:SetPoint ("left", frame7.menuAnchorYLabel, "right", 2) + frame7.menuAnchorYSlider:SetThumbSize (50) + frame7.menuAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y) + instance:MenuAnchor (nil, y) + end) + + frame7.menuAnchorYSlider.info = Loc ["STRING_OPTIONS_MENU_Y_DESC"] + window:create_line_background (frame7, frame7.menuAnchorYLabel, frame7.menuAnchorYSlider) + frame7.menuAnchorYSlider:SetHook ("OnEnter", background_on_enter) + frame7.menuAnchorYSlider:SetHook ("OnLeave", background_on_leave) + + -- instance button anchors + g:NewLabel (frame7, _, "$parentInstanceButtonAnchorXLabel", "instanceButtonAnchorXLabel", Loc ["STRING_OPTIONS_INSBUTTON_X"], "GameFontHighlightLeft") + frame7.instanceButtonAnchorXSlider:SetPoint ("left", frame7.instanceButtonAnchorXLabel, "right", 2) + frame7.instanceButtonAnchorXSlider:SetThumbSize (50) + frame7.instanceButtonAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x) + instance:InstanceButtonAnchor (x, nil) + end) + + frame7.instanceButtonAnchorXSlider.info = Loc ["STRING_OPTIONS_INSBUTTON_X_DESC"] + window:create_line_background (frame7, frame7.instanceButtonAnchorXLabel, frame7.instanceButtonAnchorXSlider) + frame7.instanceButtonAnchorXSlider:SetHook ("OnEnter", background_on_enter) + frame7.instanceButtonAnchorXSlider:SetHook ("OnLeave", background_on_leave) + + g:NewLabel (frame7, _, "$parentInstanceButtonAnchorYLabel", "instanceButtonAnchorYLabel", Loc ["STRING_OPTIONS_INSBUTTON_Y"], "GameFontHighlightLeft") + frame7.instanceButtonAnchorYSlider:SetPoint ("left", frame7.instanceButtonAnchorYLabel, "right", 2) + frame7.instanceButtonAnchorYSlider:SetThumbSize (50) + frame7.instanceButtonAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y) + instance:InstanceButtonAnchor (nil, y) + end) + + frame7.instanceButtonAnchorYSlider.info =Loc ["STRING_OPTIONS_INSBUTTON_Y_DESC"] + window:create_line_background (frame7, frame7.instanceButtonAnchorYLabel, frame7.instanceButtonAnchorYSlider) + frame7.instanceButtonAnchorYSlider:SetHook ("OnEnter", background_on_enter) + frame7.instanceButtonAnchorYSlider:SetHook ("OnLeave", background_on_leave) + + --> instance toolbar side + + -- desaturate + g:NewLabel (frame7, _, "$parentDesaturateMenuLabel", "desaturateMenuLabel", Loc ["STRING_OPTIONS_DESATURATE_MENU"], "GameFontHighlightLeft") + + frame7.desaturateMenuSlider:SetPoint ("left", frame7.desaturateMenuLabel, "right", 2) + frame7.desaturateMenuSlider.OnSwitch = function (self, instance, value) + instance:DesaturateMenu (value) + end + + frame7.desaturateMenuSlider.info = Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"] + window:create_line_background (frame7, frame7.desaturateMenuLabel, frame7.desaturateMenuSlider) + frame7.desaturateMenuSlider:SetHook ("OnEnter", background_on_enter) + frame7.desaturateMenuSlider:SetHook ("OnLeave", background_on_leave) + + -- hide icon + g:NewLabel (frame7, _, "$parentHideIconLabel", "hideIconLabel", Loc ["STRING_OPTIONS_HIDE_ICON"], "GameFontHighlightLeft") + + frame7.hideIconSlider:SetPoint ("left", frame7.hideIconLabel, "right", 2) + frame7.hideIconSlider.OnSwitch = function (self, instance, value) + instance:HideMainIcon (value) + end + + frame7.hideIconSlider.info = Loc ["STRING_OPTIONS_HIDE_ICON_DESC"] + window:create_line_background (frame7, frame7.hideIconLabel, frame7.hideIconSlider) + frame7.hideIconSlider:SetHook ("OnEnter", background_on_enter) + frame7.hideIconSlider:SetHook ("OnLeave", background_on_leave) + + -- plugin icons direction + g:NewLabel (frame7, _, "$parentPluginIconsDirectionLabel", "pluginIconsDirectionLabel", Loc ["STRING_OPTIONS_PICONS_DIRECTION"], "GameFontHighlightLeft") + + frame7.pluginIconsDirectionSlider:SetPoint ("left", frame7.pluginIconsDirectionLabel, "right", 2) + frame7.pluginIconsDirectionSlider.OnSwitch = function (self, instance, value) + instance.plugins_grow_direction = value and 2 or 1 + instance:DefaultIcons() + end + frame7.pluginIconsDirectionSlider.thumb:SetSize (40, 12) + + frame7.pluginIconsDirectionSlider.info = Loc ["STRING_OPTIONS_PICONS_DIRECTION_DESC"] + window:create_line_background (frame7, frame7.pluginIconsDirectionLabel, frame7.pluginIconsDirectionSlider) + frame7.pluginIconsDirectionSlider:SetHook ("OnEnter", background_on_enter) + frame7.pluginIconsDirectionSlider:SetHook ("OnLeave", background_on_leave) + + titulo_toolbar:SetPoint (10, -10) + titulo_toolbar_desc:SetPoint (10, -30) + frame7.instanceButtonAnchorXLabel:SetPoint (10, -70) + frame7.instanceButtonAnchorYLabel:SetPoint (10, -95) + frame7.menuAnchorXLabel:SetPoint (10, -120) + frame7.menuAnchorYLabel:SetPoint (10, -145) + frame7.desaturateMenuLabel:SetPoint (10, -170) + frame7.hideIconLabel:SetPoint (10, -195) + frame7.pluginIconsDirectionLabel:SetPoint (10, -220) + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Reset Instance Close +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame8 = window.options [8][1] + + local titulo_toolbar2 = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbarLabel", Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS"], "GameFontNormal", 16) + local titulo_toolbar2_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS_DESC"], "GameFontNormal", 9, "white") + titulo_toolbar2_desc.width = 320 + + --> close button + --button overlay + local close_overlay_color_callback = function (_, r, g, b, a) + frame8.closeOverlayColorImage:SetTexture (r, g, b, a) + window.instance:SetCloseButtonSettings ({r, g, b, a}) + end + local close_overlay_color_onclick = function() + local color_table = window.instance.closebutton_info.color_overlay + g:ColorPick (frame8.closeOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], close_overlay_color_callback) + end + g:NewImage (frame8, nil, "$parentCloseOverlayColorImage", "closeOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.closebutton_info.color_overlay) + g:NewButton (frame8, nil, "$parentCloseOverlayColorButton", "closeOverlayColorButton", COLOR_BUTTON_WIDTH, 14, close_overlay_color_onclick, nil, nil, nil, "color") + + --> reset button + --text color pick + local reset_text_color_callback = function (_, r, g, b, a) + frame8.resetTextColorImage:SetTexture (r, g, b, a) + window.instance:SetDeleteButtonSettings (nil, nil, {r, g, b, a}, nil) + end + local reset_text_color_onclick = function() + local color_table = window.instance.resetbutton_info.text_color + g:ColorPick (frame8.resetTextColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], reset_text_color_callback) + end + g:NewImage (frame8, nil, "$parentResetTextColorImage", "resetTextColorImage", COLOR_BUTTON_WIDTH, 12, instance.resetbutton_info.text_color) + g:NewButton (frame8, nil, "$parentResetTextColorButton", "resetTextColorButton", COLOR_BUTTON_WIDTH, 14, reset_text_color_onclick, nil, nil, nil, "color") + + --text size + g:NewSlider (frame8, _, "$parentResetTextSizeSlider", "resetTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.resetbutton_info.text_size)) + frame8.resetTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount) + instance:SetDeleteButtonSettings (nil, amount) + end) + + --button overlay + local reset_overlay_color_callback = function (_, r, g, b, a) + frame8.resetOverlayColorImage:SetTexture (r, g, b, a) + window.instance:SetDeleteButtonSettings (nil, nil, nil, {r, g, b, a}) + end + local reset_overlay_color_onclick = function() + local color_table = window.instance.resetbutton_info.color_overlay + g:ColorPick (frame8.resetOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], reset_overlay_color_callback) + end + g:NewImage (frame8, nil, "$parentResetOverlayColorImage", "resetOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.resetbutton_info.color_overlay) + g:NewButton (frame8, nil, "$parentResetOverlayColorButton", "resetOverlayColorButton", COLOR_BUTTON_WIDTH, 14, reset_overlay_color_onclick, nil, nil, nil, "color") + --reset always small + g:NewSwitch (frame8, _, "$parentResetAlwaysSmallSlider", "resetAlwaysSmallSlider", 60, 20, _, _, instance.resetbutton_info.always_small) + + --text face + local reset_text_color_onselectfont = function (_, instance, fontName) + window.instance:SetDeleteButtonSettings (fontName) + end + local reset_text_color_build_font_menu = function() + local fontObjects = SharedMedia:HashTable ("font") + local fontTable = {} + for name, fontPath in pairs (fontObjects) do + fontTable[#fontTable+1] = {value = name, label = name, onclick = reset_text_color_onselectfont, font = fontPath} + end + return fontTable + end + g:NewDropDown (frame8, _, "$parentResetTextFontDropdown", "resetTextFontDropdown", DROPDOWN_WIDTH, 20, reset_text_color_build_font_menu, nil) + + --> instance button + --text color pick + local instance_text_color_callback = function (_, r, g, b, a) + frame8.instanceTextColorImage:SetTexture (r, g, b, a) + window.instance:SetInstanceButtonSettings (nil, nil, {r, g, b, a}) + end + local instance_text_color_onclick = function() + local color_table = window.instance.instancebutton_info.text_color + g:ColorPick (frame8.instanceTextColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], instance_text_color_callback) + end + g:NewImage (frame8, nil, "$parentInstanceTextColorImage", "instanceTextColorImage", COLOR_BUTTON_WIDTH, 12, instance.instancebutton_info.text_color) + g:NewButton (frame8, nil, "$parentInstanceTextColorButton", "instanceTextColorButton", COLOR_BUTTON_WIDTH, 14, instance_text_color_onclick, nil, nil, nil, "color") + --text size + g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_info.text_size)) + frame8.instanceTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount) + instance:SetInstanceButtonSettings (nil, amount) + end) + --button overlay + local instance_overlay_color_callback = function (_, r, g, b, a) + frame8.instanceOverlayColorImage:SetTexture (r, g, b, a) + window.instance:SetInstanceButtonSettings (nil, nil, nil, {r, g, b, a}) + end + local instance_overlay_color_onclick = function() + local color_table = window.instance.instancebutton_info.color_overlay + g:ColorPick (frame8.instanceOverlayColorButton.widget, color_table[1], color_table[2], color_table[3], color_table[4], instance_overlay_color_callback) + end + g:NewImage (frame8, nil, "$parentInstanceOverlayColorImage", "instanceOverlayColorImage", COLOR_BUTTON_WIDTH, 12, instance.instancebutton_info.color_overlay) + g:NewButton (frame8, nil, "$parentInstanceOverlayColorButton", "instanceOverlayColorButton", COLOR_BUTTON_WIDTH, 14, instance_overlay_color_onclick, nil, nil, nil, "color") + --text face + local instance_text_color_onselectfont = function (_, instance, fontName) + instance:SetInstanceButtonSettings (fontName) + end + local instance_text_color_build_font_menu = function() + 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} + end + return fontTable + end + g:NewDropDown (frame8, _, "$parentInstanceTextFontDropdown", "instanceTextFontDropdown", DROPDOWN_WIDTH, 20, instance_text_color_build_font_menu, nil) + + + + -- reset button + -- text color + g:NewLabel (frame8, _, "$parentResetTextColorLabel", "resetTextColorLabel", Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"], "GameFontHighlightLeft") + + frame8.resetTextColorImage:SetPoint ("left", frame8.resetTextColorLabel, "right", 2) + + frame8.resetTextColorButton:SetPoint ("left", frame8.resetTextColorLabel, "right", 2) + frame8.resetTextColorButton:InstallCustomTexture() + + frame8.resetTextColorButton.info = Loc ["STRING_OPTIONS_RESET_TEXTCOLOR_DESC"] + window:create_line_background (frame8, frame8.resetTextColorLabel, frame8.resetTextColorButton) + frame8.resetTextColorButton:SetHook ("OnEnter", background_on_enter) + frame8.resetTextColorButton:SetHook ("OnLeave", background_on_leave) + + -- text font + g:NewLabel (frame8, _, "$parentResetTextFontLabel", "resetTextFontLabel", Loc ["STRING_OPTIONS_RESET_TEXTFONT"], "GameFontHighlightLeft") + frame8.resetTextFontDropdown:SetPoint ("left", frame8.resetTextFontLabel, "right", 2) + + frame8.resetTextFontDropdown.info = Loc ["STRING_OPTIONS_RESET_TEXTFONT_DESC"] + window:create_line_background (frame8, frame8.resetTextFontLabel, frame8.resetTextFontDropdown) + frame8.resetTextFontDropdown:SetHook ("OnEnter", background_on_enter) + frame8.resetTextFontDropdown:SetHook ("OnLeave", background_on_leave) + + -- text size + g:NewLabel (frame8, _, "$parentResetTextSizeLabel", "resetTextSizeLabel", Loc ["STRING_OPTIONS_RESET_TEXTSIZE"], "GameFontHighlightLeft") + frame8.resetTextSizeSlider:SetPoint ("left", frame8.resetTextSizeLabel, "right", 2) + + frame8.resetTextSizeSlider.info = Loc ["STRING_OPTIONS_RESET_TEXTSIZE_DESC"] + window:create_line_background (frame8, frame8.resetTextSizeLabel, frame8.resetTextSizeSlider) + frame8.resetTextSizeSlider:SetHook ("OnEnter", background_on_enter) + frame8.resetTextSizeSlider:SetHook ("OnLeave", background_on_leave) + + -- color overlay + g:NewLabel (frame8, _, "$parentResetOverlayColorLabel", "resetOverlayColorLabel", Loc ["STRING_OPTIONS_RESET_OVERLAY"], "GameFontHighlightLeft") + + frame8.resetOverlayColorImage:SetPoint ("left", frame8.resetOverlayColorLabel, "right", 2) + + frame8.resetOverlayColorButton:SetPoint ("left", frame8.resetOverlayColorLabel, "right", 2) + frame8.resetOverlayColorButton:InstallCustomTexture() + + frame8.resetOverlayColorButton.info = Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"] + window:create_line_background (frame8, frame8.resetOverlayColorLabel, frame8.resetOverlayColorButton) + frame8.resetOverlayColorButton:SetHook ("OnEnter", background_on_enter) + frame8.resetOverlayColorButton:SetHook ("OnLeave", background_on_leave) + + -- reset always small + g:NewLabel (frame8, _, "$parentResetAlwaysSmallLabel", "resetAlwaysSmallLabel", Loc ["STRING_OPTIONS_RESET_SMALL"], "GameFontHighlightLeft") + + frame8.resetAlwaysSmallSlider:SetPoint ("left", frame8.resetAlwaysSmallLabel, "right", 2) + frame8.resetAlwaysSmallSlider.OnSwitch = function (self, instance, value) + instance:SetDeleteButtonSettings (nil, nil, nil, nil, value) + end + + frame8.resetAlwaysSmallSlider.info = Loc ["STRING_OPTIONS_RESET_SMALL_DESC"] + window:create_line_background (frame8, frame8.resetAlwaysSmallLabel, frame8.resetAlwaysSmallSlider) + frame8.resetAlwaysSmallSlider:SetHook ("OnEnter", background_on_enter) + frame8.resetAlwaysSmallSlider:SetHook ("OnLeave", background_on_leave) + + -- instance button + -- text color + g:NewLabel (frame8, _, "$parentInstanceTextColorLabel", "instanceTextColorLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"], "GameFontHighlightLeft") + + frame8.instanceTextColorImage:SetPoint ("left", frame8.instanceTextColorLabel, "right", 2) + + frame8.instanceTextColorButton:SetPoint ("left", frame8.instanceTextColorLabel, "right", 2) + frame8.instanceTextColorButton:InstallCustomTexture() + + frame8.instanceTextColorButton.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"] + window:create_line_background (frame8, frame8.instanceTextColorLabel, frame8.instanceTextColorButton) + frame8.instanceTextColorButton:SetHook ("OnEnter", background_on_enter) + frame8.instanceTextColorButton:SetHook ("OnLeave", background_on_leave) + + -- text font + g:NewLabel (frame8, _, "$parentInstanceTextFontLabel", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"], "GameFontHighlightLeft") + frame8.instanceTextFontDropdown:SetPoint ("left", frame8.instanceTextFontLabel, "right", 2) + + frame8.instanceTextFontDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT_DESC"] + window:create_line_background (frame8, frame8.instanceTextFontLabel, frame8.instanceTextFontDropdown) + frame8.instanceTextFontDropdown:SetHook ("OnEnter", background_on_enter) + frame8.instanceTextFontDropdown:SetHook ("OnLeave", background_on_leave) + + -- text size + g:NewLabel (frame8, _, "$parentInstanceTextSizeLabel", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"], "GameFontHighlightLeft") + frame8.instanceTextSizeSlider:SetPoint ("left", frame8.instanceTextSizeLabel, "right", 2) + + frame8.instanceTextSizeSlider.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"] + window:create_line_background (frame8, frame8.instanceTextSizeLabel, frame8.instanceTextSizeSlider) + frame8.instanceTextSizeSlider:SetHook ("OnEnter", background_on_enter) + frame8.instanceTextSizeSlider:SetHook ("OnLeave", background_on_leave) + + -- color overlay + g:NewLabel (frame8, _, "$parentInstanceOverlayColorLabel", "instanceOverlayColorLabel", Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"], "GameFontHighlightLeft") + + frame8.instanceOverlayColorImage:SetPoint ("left", frame8.instanceOverlayColorLabel, "right", 2) + + frame8.instanceOverlayColorButton:SetPoint ("left", frame8.instanceOverlayColorLabel, "right", 2) + frame8.instanceOverlayColorButton:InstallCustomTexture() + + frame8.instanceOverlayColorButton.info = Loc ["STRING_OPTIONS_INSTANCE_OVERLAY_DESC"] + window:create_line_background (frame8, frame8.instanceOverlayColorLabel, frame8.instanceOverlayColorButton) + frame8.instanceOverlayColorButton:SetHook ("OnEnter", background_on_enter) + frame8.instanceOverlayColorButton:SetHook ("OnLeave", background_on_leave) + + -- close button + -- color overlay + g:NewLabel (frame8, _, "$parentCloseOverlayColorLabel", "closeOverlayColorLabel", Loc ["STRING_OPTIONS_CLOSE_OVERLAY"], "GameFontHighlightLeft") + + frame8.closeOverlayColorImage:SetPoint ("left", frame8.closeOverlayColorLabel, "right", 2) + + frame8.closeOverlayColorButton:SetPoint ("left", frame8.closeOverlayColorLabel, "right", 2) + frame8.closeOverlayColorButton:InstallCustomTexture() + + frame8.closeOverlayColorButton.info = Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"] + window:create_line_background (frame8, frame8.closeOverlayColorLabel, frame8.closeOverlayColorButton) + frame8.closeOverlayColorButton:SetHook ("OnEnter", background_on_enter) + frame8.closeOverlayColorButton:SetHook ("OnLeave", background_on_leave) + + titulo_toolbar2:SetPoint (10, -10) + titulo_toolbar2_desc:SetPoint (10, -30) + + g:NewLabel (frame8, _, "$parentInstanceButtonAnchor", "instanceAnchorLabel", Loc ["STRING_OPTIONS_INSTANCE_BUTTON_ANCHOR"], "GameFontNormal") + g:NewLabel (frame8, _, "$parentResetButtonAnchor", "resetAnchorLabel", Loc ["STRING_OPTIONS_RESET_BUTTON_ANCHOR"], "GameFontNormal") + g:NewLabel (frame8, _, "$parentCloseButtonAnchor", "closeAnchorLabel", Loc ["STRING_OPTIONS_CLOSE_BUTTON_ANCHOR"], "GameFontNormal") + + frame8.instanceAnchorLabel:SetPoint (10, -75) + + frame8.instanceTextColorLabel:SetPoint (10, -100) + frame8.instanceTextFontLabel:SetPoint (10, -125) + frame8.instanceTextSizeLabel:SetPoint (10, -150) + frame8.instanceOverlayColorLabel:SetPoint (10, -175) + + frame8.resetAnchorLabel:SetPoint (10, -210) + + frame8.resetTextColorLabel:SetPoint (10, -235) + frame8.resetTextFontLabel:SetPoint (10, -260) + frame8.resetTextSizeLabel:SetPoint (10, -285) + frame8.resetOverlayColorLabel:SetPoint (10, -310) + frame8.resetAlwaysSmallLabel:SetPoint (10, -335) + + frame8.closeAnchorLabel:SetPoint (10, -370) + + frame8.closeOverlayColorLabel:SetPoint (10, -395) + +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Appearance - Wallpaper +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame9 = window.options [9][1] + + local titulo_wallpaper = g:NewLabel (frame9, _, "$parentTituloPersona", "tituloBarsLabel", Loc ["STRING_OPTIONS_WP"], "GameFontNormal", 16) + local titulo_wallpaper_desc = g:NewLabel (frame9, _, "$parentTituloPersona2", "tituloBars2Label", Loc ["STRING_OPTIONS_WP_DESC"], "GameFontNormal", 9, "white") + titulo_wallpaper_desc.width = 320 + --> wallpaper --> primeiro o botão de editar a imagem local callmeback = function (width, height, overlayColor, alpha, texCoords) local tinstance = _G ["DetailsOptionsWindow"].MyObject.instance tinstance:InstanceWallpaper (nil, nil, alpha, texCoords, width, height, overlayColor) + window:update_wallpaper_info() end local startImageEdit = function() local tinstance = _G ["DetailsOptionsWindow"].MyObject.instance + if (not tinstance.wallpaper.texture) then + return + end + if (tinstance.wallpaper.texture:find ("TALENTFRAME")) then g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight()) else @@ -1183,11 +2329,12 @@ function _detalhes:OpenOptionsWindow (instance) g:ImageEditor (callmeback, tinstance.wallpaper.texture, tinstance.wallpaper.texcoord, tinstance.wallpaper.overlay, window.instance.baseframe.wallpaper:GetWidth(), window.instance.baseframe.wallpaper:GetHeight()) end end - g:NewButton (frame2, _, "$parentEditImage", "editImage", 200, 18, startImageEdit, nil, nil, nil, Loc ["STRING_OPTIONS_EDITIMAGE"]) + g:NewButton (frame9, _, "$parentEditImage", "editImage", 200, 18, startImageEdit, nil, nil, nil, Loc ["STRING_OPTIONS_EDITIMAGE"]) --> agora o dropdown do alinhamento local onSelectAnchor = function (_, instance, anchor) instance:InstanceWallpaper (nil, anchor) + window:update_wallpaper_info() end local anchorMenu = { {value = "all", label = "Fill", onclick = onSelectAnchor}, @@ -1203,7 +2350,7 @@ function _detalhes:OpenOptionsWindow (instance) return anchorMenu end - g:NewDropDown (frame2, _, "$parentAnchorDropdown", "anchorDropdown", DROPDOWN_WIDTH, 20, buildAnchorMenu, nil) + g:NewDropDown (frame9, _, "$parentAnchorDropdown", "anchorDropdown", DROPDOWN_WIDTH, 20, buildAnchorMenu, nil) --> agora cria os 2 dropdown da categoria e wallpaper @@ -1214,6 +2361,9 @@ function _detalhes:OpenOptionsWindow (instance) else instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}) end + + window:update_wallpaper_info() + end local subMenu = { @@ -1365,11 +2515,12 @@ function _detalhes:OpenOptionsWindow (instance) } local buildBackgroundMenu2 = function() - return subMenu [frame2.backgroundDropdown.value] or {label = "-- -- --", value = 0} + return subMenu [frame9.backgroundDropdown.value] or {label = "-- -- --", value = 0} end local onSelectMainTexture = function (_, instance, choose) - frame2.backgroundDropdown2:Select (choose) + frame9.backgroundDropdown2:Select (choose) + window:update_wallpaper_info() end local backgroundTable = { @@ -1390,619 +2541,18 @@ function _detalhes:OpenOptionsWindow (instance) } local buildBackgroundMenu = function() return backgroundTable end - g:NewSwitch (frame2, _, "$parentUseBackgroundSlider", "useBackgroundSlider", 60, 20, _, _, window.instance.wallpaper.enabled) - g:NewDropDown (frame2, _, "$parentBackgroundDropdown", "backgroundDropdown", DROPDOWN_WIDTH, 20, buildBackgroundMenu, nil) - g:NewDropDown (frame2, _, "$parentBackgroundDropdown2", "backgroundDropdown2", DROPDOWN_WIDTH, 20, buildBackgroundMenu2, nil) + g:NewSwitch (frame9, _, "$parentUseBackgroundSlider", "useBackgroundSlider", 60, 20, _, _, window.instance.wallpaper.enabled) + g:NewDropDown (frame9, _, "$parentBackgroundDropdown", "backgroundDropdown", DROPDOWN_WIDTH, 20, buildBackgroundMenu, nil) + g:NewDropDown (frame9, _, "$parentBackgroundDropdown2", "backgroundDropdown2", DROPDOWN_WIDTH, 20, buildBackgroundMenu2, nil) - - - --> text font - local onSelectFont = function (_, instance, fontName) - instance:SetBarTextSettings (nil, fontName) - end - 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} - end - local buildFontMenu = function() return fontTable end - g:NewDropDown (frame2, _, "$parentFontDropdown", "fontDropdown", DROPDOWN_WIDTH, 20, buildFontMenu, nil) - - --> bar background - local onSelectTextureBackground = function (_, instance, textureName) - instance:SetBarSettings (nil, nil, nil, nil, textureName) - end - - 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} - end - local buildTextureMenu2 = function() return texTable2 end - - g:NewDropDown (frame2, _, "$parentRowBackgroundTextureDropdown", "rowBackgroundDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu2, nil) - - --> bar texture - local onSelectTexture = function (_, instance, textureName) - instance:SetBarSettings (nil, textureName) - end - - 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} - end - - local buildTextureMenu = function() return texTable end - g:NewDropDown (frame2, _, "$parentTextureDropdown", "textureDropdown", DROPDOWN_WIDTH, 20, buildTextureMenu, nil) - - --> select skin - local onSelectSkin = function (_, instance, skin_name) - instance:ChangeSkin (skin_name) - end - - local buildSkinMenu = function() - local skinOptions = {} - for skin_name, skin_table in pairs (_detalhes.skins) do - skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = skin_table.desc} - end - return skinOptions - end - - g:NewDropDown (frame2, _, "$parentSkinDropdown", "skinDropdown", DROPDOWN_WIDTH, 20, buildSkinMenu, 1) - ---============================================================================================================================================================== - - -- Bar Settings - - -- texture - g:NewLabel (frame2, _, "$parentTextureLabel", "textureLabel", Loc ["STRING_OPTIONS_BAR_TEXTURE"]) - -- - frame2.textureDropdown:SetPoint ("left", frame2.textureLabel, "right", 2) - - frame2.textureDropdown.info = Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] - window:create_line_background (frame2, frame2.textureLabel, frame2.textureDropdown) - frame2.textureDropdown:SetHook ("OnEnter", background_on_enter) - frame2.textureDropdown:SetHook ("OnLeave", background_on_leave) - - -- background texture - g:NewLabel (frame2, _, "$parentRowBackgroundTextureLabel", "rowBackgroundLabel", Loc ["STRING_OPTIONS_BAR_BTEXTURE"]) - -- - frame2.rowBackgroundDropdown:SetPoint ("left", frame2.rowBackgroundLabel, "right", 2) - - frame2.rowBackgroundDropdown.info = Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] - window:create_line_background (frame2, frame2.rowBackgroundLabel, frame2.rowBackgroundDropdown) - frame2.rowBackgroundDropdown:SetHook ("OnEnter", background_on_enter) - frame2.rowBackgroundDropdown:SetHook ("OnLeave", background_on_leave) - - -- background color - g:NewLabel (frame2, _, "$parentRowBackgroundColorLabel", "rowBackgroundColorLabel", Loc ["STRING_OPTIONS_BAR_BCOLOR"]) - - --frame2.rowBackgroundColorTexture:SetPoint ("left", frame2.rowBackgroundColorLabel, "right", 2) - frame2.rowBackgroundColorTexture:SetTexture (1, 1, 1) - - frame2.rowBackgroundColorButton:SetPoint ("left", frame2.rowBackgroundColorTexture, "left") - frame2.rowBackgroundColorButton:InstallCustomTexture() - - frame2.rowBackgroundColorButton.info = Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] - window:create_line_background (frame2, frame2.rowBackgroundColorLabel, frame2.rowBackgroundColorButton) - frame2.rowBackgroundColorButton:SetHook ("OnEnter", background_on_enter) - frame2.rowBackgroundColorButton:SetHook ("OnLeave", background_on_leave) - - -- back background with class color - g:NewLabel (frame2, _, "$parentRowBackgroundClassColorLabel", "rowBackgroundColorByClassLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"]) - - frame2.rowBackgroundColorByClassSlider:SetPoint ("left", frame2.rowBackgroundColorByClassLabel, "right", 2) - frame2.rowBackgroundColorByClassSlider.OnSwitch = function (self, instance, value) - instance:SetBarSettings (nil, nil, nil, nil, nil, value) - end - - frame2.rowBackgroundColorByClassSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] - window:create_line_background (frame2, frame2.rowBackgroundColorByClassLabel, frame2.rowBackgroundColorByClassSlider) - frame2.rowBackgroundColorByClassSlider:SetHook ("OnEnter", background_on_enter) - frame2.rowBackgroundColorByClassSlider:SetHook ("OnLeave", background_on_leave) - - -- height - g:NewLabel (frame2, _, "$parentRowHeightLabel", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"]) - -- - frame2.rowHeightSlider:SetPoint ("left", frame2.rowHeightLabel, "right", 2) - frame2.rowHeightSlider:SetThumbSize (50) - frame2.rowHeightSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance.row_info.height = amount - instance.row_height = instance.row_info.height+instance.row_info.space.between - instance:RefreshBars() - instance:InstanceReset() - instance:ReajustaGump() - end) - - frame2.rowHeightSlider.info = Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] - window:create_line_background (frame2, frame2.rowHeightLabel, frame2.rowHeightSlider) - frame2.rowHeightSlider:SetHook ("OnEnter", background_on_enter) - frame2.rowHeightSlider:SetHook ("OnLeave", background_on_leave) - - -- texture color by class color - g:NewLabel (frame2, _, "$parentUseClassColorsLabel", "classColorsLabel", Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"]) - frame2.classColorSlider:SetPoint ("left", frame2.classColorsLabel, "right", 2) - frame2.classColorSlider.OnSwitch = function (self, instance, value) - instance:SetBarSettings (nil, nil, value) - end - - frame2.classColorSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] - window:create_line_background (frame2, frame2.classColorsLabel, frame2.classColorSlider) - frame2.classColorSlider:SetHook ("OnEnter", background_on_enter) - frame2.classColorSlider:SetHook ("OnLeave", background_on_leave) - - -- ROW TEXTURE COLOR -- é aquele quadrado grande pra escolher a cor - - frame2.fixedRowColorTexture:SetPoint ("left", frame2.classColorSlider, "right", 5) - frame2.fixedRowColorTexture:SetTexture (1, 1, 1) - - frame2.fixedRowColorButton:SetPoint ("left", frame2.fixedRowColorTexture, "left") - frame2.fixedRowColorButton:InstallCustomTexture() - - -- Text Settings - - -- Text Sizes - g:NewLabel (frame2, _, "$parentFontSizeLabel", "fonsizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"]) - frame2.fonsizeSlider:SetPoint ("left", frame2.fonsizeLabel, "right", 2) - frame2.fonsizeSlider:SetThumbSize (50) - frame2.fonsizeSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance:SetBarTextSettings (amount) - end) - frame2.fonsizeSlider.info = Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"] - window:create_line_background (frame2, frame2.fonsizeLabel, frame2.fonsizeSlider) - frame2.fonsizeSlider:SetHook ("OnEnter", background_on_enter) - frame2.fonsizeSlider:SetHook ("OnLeave", background_on_leave) - - -- Text Fonts - g:NewLabel (frame2, _, "$parentFontLabel", "fontLabel", Loc ["STRING_OPTIONS_TEXT_FONT"]) - frame2.fontDropdown:SetPoint ("left", frame2.fontLabel, "right", 2) - - frame2.fontDropdown.info = Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] - window:create_line_background (frame2, frame2.fontLabel, frame2.fontDropdown) - frame2.fontDropdown:SetHook ("OnEnter", background_on_enter) - frame2.fontDropdown:SetHook ("OnLeave", background_on_leave) - - -- left text by class color - g:NewLabel (frame2, _, "$parentUseClassColorsLeftText", "classColorsLeftTextLabel", Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"]) - - frame2.classColorsLeftTextSlider:SetPoint ("left", frame2.classColorsLeftTextLabel, "right", 2) - frame2.classColorsLeftTextSlider.OnSwitch = function (self, instance, value) - instance:SetBarTextSettings (nil, nil, nil, value) - end - - frame2.classColorsLeftTextSlider.info = Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] - window:create_line_background (frame2, frame2.classColorsLeftTextLabel, frame2.classColorsLeftTextSlider) - frame2.classColorsLeftTextSlider:SetHook ("OnEnter", background_on_enter) - frame2.classColorsLeftTextSlider:SetHook ("OnLeave", background_on_leave) - - -- right text by class color - g:NewLabel (frame2, _, "$parentUseClassColorsRightText", "classColorsRightTextLabel", Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"]) - - frame2.classColorsRightTextSlider:SetPoint ("left", frame2.classColorsRightTextLabel, "right", 2) - frame2.classColorsRightTextSlider.OnSwitch = function (self, instance, value) - instance:SetBarTextSettings (nil, nil, nil, nil, value) - end - - frame2.classColorsRightTextSlider.info = Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] - window:create_line_background (frame2, frame2.classColorsRightTextLabel, frame2.classColorsRightTextSlider) - frame2.classColorsRightTextSlider:SetHook ("OnEnter", background_on_enter) - frame2.classColorsRightTextSlider:SetHook ("OnLeave", background_on_leave) - - -- TEXT COLOR??????? - frame2.fixedRowColorText:SetPoint ("topleft", frame2.classColorsLeftTextSlider, "topright", 10, -5) - frame2.fixedRowColorText:SetPoint ("bottomleft", frame2.classColorsRightTextSlider, "bottomright", 10, 5) - frame2.fixedRowColorText:SetTexture (1, 1, 1) - - frame2.fixedRowColorTButton:SetPoint ("topleft", frame2.classColorsLeftTextSlider, "topright", 10, -5) - frame2.fixedRowColorTButton:SetPoint ("bottomleft", frame2.classColorsRightTextSlider, "bottomright", 10, 5) - frame2.fixedRowColorTButton:InstallCustomTexture() - - -- left outline - g:NewLabel (frame2, _, "$parentTextLeftOutlineLabel", "textLeftOutlineLabel", Loc ["STRING_OPTIONS_TEXT_LOUTILINE"]) - - frame2.textLeftOutlineSlider:SetPoint ("left", frame2.textLeftOutlineLabel, "right", 2) - frame2.textLeftOutlineSlider.OnSwitch = function (self, instance, value) - instance:SetBarTextSettings (nil, nil, nil, nil, nil, value) - end - - frame2.textLeftOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] - window:create_line_background (frame2, frame2.textLeftOutlineLabel, frame2.textLeftOutlineSlider) - frame2.textLeftOutlineSlider:SetHook ("OnEnter", background_on_enter) - frame2.textLeftOutlineSlider:SetHook ("OnLeave", background_on_leave) - - -- right outline - g:NewLabel (frame2, _, "$parentTextRightOutlineLabel", "textRightOutlineLabel", Loc ["STRING_OPTIONS_TEXT_ROUTILINE"]) - - frame2.textRightOutlineSlider:SetPoint ("left", frame2.textRightOutlineLabel, "right", 2) - frame2.textRightOutlineSlider.OnSwitch = function (self, instance, value) - instance:SetBarTextSettings (nil, nil, nil, nil, nil, nil, value) - end - - frame2.textRightOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] - window:create_line_background (frame2, frame2.textRightOutlineLabel, frame2.textRightOutlineSlider) - frame2.textRightOutlineSlider:SetHook ("OnEnter", background_on_enter) - frame2.textRightOutlineSlider:SetHook ("OnLeave", background_on_leave) - - -- Instance Settings - - -- Instance Color - g:NewLabel (frame2, _, "$parentInstanceColorLabel", "instancecolor", Loc ["STRING_OPTIONS_INSTANCE_COLOR"]) - - frame2.instancecolortexture:SetPoint ("left", frame2.instancecolor, "right", 2) - frame2.instancecolortexture:SetTexture (1, 1, 1) - - frame2.instancecolorbutton:SetPoint ("left", frame2.instancecolor, "right", 2) - frame2.instancecolorbutton:InstallCustomTexture() - - frame2.instancecolorbutton.info = Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] - window:create_line_background (frame2, frame2.instancecolor, frame2.instancecolorbutton) - frame2.instancecolorbutton:SetHook ("OnEnter", background_on_enter) - frame2.instancecolorbutton:SetHook ("OnLeave", background_on_leave) - - -- Color and Alpha - g:NewLabel (frame2, _, "$parentAlphaLabel", "alphaLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA"]) - g:NewLabel (frame2, _, "$parentBackgroundColorLabel", "backgroundColorLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"]) - -- alpha background - frame2.alphaSlider:SetPoint ("left", frame2.alphaLabel, "right", 2, 0) - frame2.alphaSlider.useDecimals = true - frame2.alphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue - self.amt:SetText (string.format ("%.2f", amount)) - instance:SetBackgroundAlpha (amount) - return true - end) - frame2.alphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2) - frame2.backgroundColorTexture:SetPoint ("left", frame2.backgroundColorLabel, "right", 2) - frame2.backgroundColorTexture:SetTexture (1, 1, 1) - frame2.backgroundColorButton:SetPoint ("left", frame2.backgroundColorLabel, "right", 2) - frame2.backgroundColorButton:InstallCustomTexture() - - frame2.alphaSlider.info = Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] - window:create_line_background (frame2, frame2.alphaLabel, frame2.alphaSlider) - frame2.alphaSlider:SetHook ("OnEnter", background_on_enter) - frame2.alphaSlider:SetHook ("OnLeave", background_on_leave) - - -- Auto Current Segment - - g:NewLabel (frame2, _, "$parentAutoCurrentLabel", "autoCurrentLabel", Loc ["STRING_OPTIONS_INSTANCE_CURRENT"]) - - frame2.autoCurrentSlider:SetPoint ("left", frame2.autoCurrentLabel, "right", 2) - frame2.autoCurrentSlider.OnSwitch = function (self, instance, value) - instance.auto_current = value - end - - frame2.autoCurrentSlider.info = Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] - window:create_line_background (frame2, frame2.autoCurrentLabel, frame2.autoCurrentSlider) - frame2.autoCurrentSlider:SetHook ("OnEnter", background_on_enter) - frame2.autoCurrentSlider:SetHook ("OnLeave", background_on_leave) - - -- show side bars - - g:NewLabel (frame2, _, "$parentSideBarsLabel", "sideBarsLabel", Loc ["STRING_OPTIONS_SHOW_SIDEBARS"]) - - frame2.sideBarsSlider:SetPoint ("left", frame2.sideBarsLabel, "right", 2) - frame2.sideBarsSlider.OnSwitch = function (self, instance, value) - if (value) then - instance:ShowSideBars() - else - instance:HideSideBars() - end - end - - frame2.sideBarsSlider.info = Loc ["STRING_OPTIONS_SHOW_SIDEBARS_DESC"] - window:create_line_background (frame2, frame2.sideBarsLabel, frame2.sideBarsSlider) - frame2.sideBarsSlider:SetHook ("OnEnter", background_on_enter) - frame2.sideBarsSlider:SetHook ("OnLeave", background_on_leave) - - -- show statusbar - - g:NewLabel (frame2, _, "$parentStatusbarLabel", "statusbarLabel", Loc ["STRING_OPTIONS_SHOW_STATUSBAR"]) - - frame2.statusbarSlider:SetPoint ("left", frame2.statusbarLabel, "right", 2) - frame2.statusbarSlider.OnSwitch = function (self, instance, value) - if (value) then - instance:ShowStatusBar() - else - instance:HideStatusBar() - end - end - - frame2.statusbarSlider.info = Loc ["STRING_OPTIONS_SHOW_STATUSBAR_DESC"] - window:create_line_background (frame2, frame2.statusbarLabel, frame2.statusbarSlider) - frame2.statusbarSlider:SetHook ("OnEnter", background_on_enter) - frame2.statusbarSlider:SetHook ("OnLeave", background_on_leave) - - --[[ - - - - --]] - - -- desaturate - g:NewLabel (frame2, _, "$parentDesaturateMenuLabel", "desaturateMenuLabel", Loc ["STRING_OPTIONS_DESATURATE_MENU"]) - - frame2.desaturateMenuSlider:SetPoint ("left", frame2.desaturateMenuLabel, "right", 2) - frame2.desaturateMenuSlider.OnSwitch = function (self, instance, value) - instance:DesaturateMenu (value) - end - - frame2.desaturateMenuSlider.info = Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"] - window:create_line_background (frame2, frame2.desaturateMenuLabel, frame2.desaturateMenuSlider) - frame2.desaturateMenuSlider:SetHook ("OnEnter", background_on_enter) - frame2.desaturateMenuSlider:SetHook ("OnLeave", background_on_leave) - - -- hide icon - g:NewLabel (frame2, _, "$parentHideIconLabel", "hideIconLabel", Loc ["STRING_OPTIONS_HIDE_ICON"]) - - frame2.hideIconSlider:SetPoint ("left", frame2.hideIconLabel, "right", 2) - frame2.hideIconSlider.OnSwitch = function (self, instance, value) - instance:HideMainIcon (value) - end - - frame2.hideIconSlider.info = Loc ["STRING_OPTIONS_HIDE_ICON_DESC"] - window:create_line_background (frame2, frame2.hideIconLabel, frame2.hideIconSlider) - frame2.hideIconSlider:SetHook ("OnEnter", background_on_enter) - frame2.hideIconSlider:SetHook ("OnLeave", background_on_leave) - - -- menu anchors - g:NewLabel (frame2, _, "$parentMenuAnchorXLabel", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU_X"]) - frame2.menuAnchorXSlider:SetPoint ("left", frame2.menuAnchorXLabel, "right", 2) - frame2.menuAnchorXSlider:SetThumbSize (50) - frame2.menuAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x) - instance:MenuAnchor (x, nil) - end) - - frame2.menuAnchorXSlider.info = Loc ["STRING_OPTIONS_MENU_X_DESC"] - window:create_line_background (frame2, frame2.menuAnchorXLabel, frame2.menuAnchorXSlider) - frame2.menuAnchorXSlider:SetHook ("OnEnter", background_on_enter) - frame2.menuAnchorXSlider:SetHook ("OnLeave", background_on_leave) - - g:NewLabel (frame2, _, "$parentMenuAnchorYLabel", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU_Y"]) - frame2.menuAnchorYSlider:SetPoint ("left", frame2.menuAnchorYLabel, "right", 2) - frame2.menuAnchorYSlider:SetThumbSize (50) - frame2.menuAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y) - instance:MenuAnchor (nil, y) - end) - - frame2.menuAnchorYSlider.info = Loc ["STRING_OPTIONS_MENU_Y_DESC"] - window:create_line_background (frame2, frame2.menuAnchorYLabel, frame2.menuAnchorYSlider) - frame2.menuAnchorYSlider:SetHook ("OnEnter", background_on_enter) - frame2.menuAnchorYSlider:SetHook ("OnLeave", background_on_leave) - - -- instance button anchors - g:NewLabel (frame2, _, "$parentInstanceButtonAnchorXLabel", "instanceButtonAnchorXLabel", Loc ["STRING_OPTIONS_INSBUTTON_X"]) - frame2.instanceButtonAnchorXSlider:SetPoint ("left", frame2.instanceButtonAnchorXLabel, "right", 2) - frame2.instanceButtonAnchorXSlider:SetThumbSize (50) - frame2.instanceButtonAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x) - instance:InstanceButtonAnchor (x, nil) - end) - - frame2.instanceButtonAnchorXSlider.info = Loc ["STRING_OPTIONS_INSBUTTON_X_DESC"] - window:create_line_background (frame2, frame2.instanceButtonAnchorXLabel, frame2.instanceButtonAnchorXSlider) - frame2.instanceButtonAnchorXSlider:SetHook ("OnEnter", background_on_enter) - frame2.instanceButtonAnchorXSlider:SetHook ("OnLeave", background_on_leave) - - g:NewLabel (frame2, _, "$parentInstanceButtonAnchorYLabel", "instanceButtonAnchorYLabel", Loc ["STRING_OPTIONS_INSBUTTON_Y"]) - frame2.instanceButtonAnchorYSlider:SetPoint ("left", frame2.instanceButtonAnchorYLabel, "right", 2) - frame2.instanceButtonAnchorYSlider:SetThumbSize (50) - frame2.instanceButtonAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y) - instance:InstanceButtonAnchor (nil, y) - end) - - frame2.instanceButtonAnchorYSlider.info =Loc ["STRING_OPTIONS_INSBUTTON_Y_DESC"] - window:create_line_background (frame2, frame2.instanceButtonAnchorYLabel, frame2.instanceButtonAnchorYSlider) - frame2.instanceButtonAnchorYSlider:SetHook ("OnEnter", background_on_enter) - frame2.instanceButtonAnchorYSlider:SetHook ("OnLeave", background_on_leave) - - -- reset button - -- text color - g:NewLabel (frame2, _, "$parentResetTextColorLabel", "resetTextColorLabel", Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"]) - - frame2.resetTextColorImage:SetPoint ("left", frame2.resetTextColorLabel, "right", 2) - - frame2.resetTextColorButton:SetPoint ("left", frame2.resetTextColorLabel, "right", 2) - frame2.resetTextColorButton:InstallCustomTexture() - - frame2.resetTextColorButton.info = Loc ["STRING_OPTIONS_RESET_TEXTCOLOR_DESC"] - window:create_line_background (frame2, frame2.resetTextColorLabel, frame2.resetTextColorButton) - frame2.resetTextColorButton:SetHook ("OnEnter", background_on_enter) - frame2.resetTextColorButton:SetHook ("OnLeave", background_on_leave) - - -- text font - g:NewLabel (frame2, _, "$parentResetTextFontLabel", "resetTextFontLabel", Loc ["STRING_OPTIONS_RESET_TEXTFONT"]) - frame2.resetTextFontDropdown:SetPoint ("left", frame2.resetTextFontLabel, "right", 2) - - frame2.resetTextFontDropdown.info = Loc ["STRING_OPTIONS_RESET_TEXTFONT_DESC"] - window:create_line_background (frame2, frame2.resetTextFontLabel, frame2.resetTextFontDropdown) - frame2.resetTextFontDropdown:SetHook ("OnEnter", background_on_enter) - frame2.resetTextFontDropdown:SetHook ("OnLeave", background_on_leave) - - -- text size - g:NewLabel (frame2, _, "$parentResetTextSizeLabel", "resetTextSizeLabel", Loc ["STRING_OPTIONS_RESET_TEXTSIZE"]) - frame2.resetTextSizeSlider:SetPoint ("left", frame2.resetTextSizeLabel, "right", 2) - - frame2.resetTextSizeSlider.info = Loc ["STRING_OPTIONS_RESET_TEXTSIZE_DESC"] - window:create_line_background (frame2, frame2.resetTextSizeLabel, frame2.resetTextSizeSlider) - frame2.resetTextSizeSlider:SetHook ("OnEnter", background_on_enter) - frame2.resetTextSizeSlider:SetHook ("OnLeave", background_on_leave) - - -- color overlay - g:NewLabel (frame2, _, "$parentResetOverlayColorLabel", "resetOverlayColorLabel", Loc ["STRING_OPTIONS_RESET_OVERLAY"]) - - frame2.resetOverlayColorImage:SetPoint ("left", frame2.resetOverlayColorLabel, "right", 2) - - frame2.resetOverlayColorButton:SetPoint ("left", frame2.resetOverlayColorLabel, "right", 2) - frame2.resetOverlayColorButton:InstallCustomTexture() - - frame2.resetOverlayColorButton.info = Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"] - window:create_line_background (frame2, frame2.resetOverlayColorLabel, frame2.resetOverlayColorButton) - frame2.resetOverlayColorButton:SetHook ("OnEnter", background_on_enter) - frame2.resetOverlayColorButton:SetHook ("OnLeave", background_on_leave) - - -- reset always small - g:NewLabel (frame2, _, "$parentResetAlwaysSmallLabel", "resetAlwaysSmallLabel", Loc ["STRING_OPTIONS_RESET_SMALL"]) - - frame2.resetAlwaysSmallSlider:SetPoint ("left", frame2.resetAlwaysSmallLabel, "right", 2) - frame2.resetAlwaysSmallSlider.OnSwitch = function (self, instance, value) - instance:SetDeleteButtonSettings (nil, nil, nil, nil, value) - end - - frame2.resetAlwaysSmallSlider.info = Loc ["STRING_OPTIONS_RESET_SMALL_DESC"] - window:create_line_background (frame2, frame2.resetAlwaysSmallLabel, frame2.resetAlwaysSmallSlider) - frame2.resetAlwaysSmallSlider:SetHook ("OnEnter", background_on_enter) - frame2.resetAlwaysSmallSlider:SetHook ("OnLeave", background_on_leave) - - -- stretch button anchor - g:NewLabel (frame2, _, "$parentStretchAnchorLabel", "stretchAnchorLabel", Loc ["STRING_OPTIONS_STRETCH"]) - - frame2.stretchAnchorSlider:SetPoint ("left", frame2.stretchAnchorLabel, "right", 2) - frame2.stretchAnchorSlider.OnSwitch = function (self, instance, value) - instance:StretchButtonAnchor (value and 2 or 1) - end - frame2.stretchAnchorSlider.thumb:SetSize (40, 12) - - frame2.stretchAnchorSlider.info = Loc ["STRING_OPTIONS_STRETCH_DESC"] - window:create_line_background (frame2, frame2.stretchAnchorLabel, frame2.stretchAnchorSlider) - frame2.stretchAnchorSlider:SetHook ("OnEnter", background_on_enter) - frame2.stretchAnchorSlider:SetHook ("OnLeave", background_on_leave) - - -- plugin icons direction - g:NewLabel (frame2, _, "$parentPluginIconsDirectionLabel", "pluginIconsDirectionLabel", Loc ["STRING_OPTIONS_PICONS_DIRECTION"]) - - frame2.pluginIconsDirectionSlider:SetPoint ("left", frame2.pluginIconsDirectionLabel, "right", 2) - frame2.pluginIconsDirectionSlider.OnSwitch = function (self, instance, value) - instance.plugins_grow_direction = value and 2 or 1 - instance:DefaultIcons() - end - frame2.pluginIconsDirectionSlider.thumb:SetSize (40, 12) - - frame2.pluginIconsDirectionSlider.info = Loc ["STRING_OPTIONS_PICONS_DIRECTION_DESC"] - window:create_line_background (frame2, frame2.pluginIconsDirectionLabel, frame2.pluginIconsDirectionSlider) - frame2.pluginIconsDirectionSlider:SetHook ("OnEnter", background_on_enter) - frame2.pluginIconsDirectionSlider:SetHook ("OnLeave", background_on_leave) - - -- instance toolbar side - g:NewLabel (frame2, _, "$parentInstanceToolbarSideLabel", "instanceToolbarSideLabel", Loc ["STRING_OPTIONS_TOOLBARSIDE"]) - - frame2.instanceToolbarSideSlider:SetPoint ("left", frame2.instanceToolbarSideLabel, "right", 2) - frame2.instanceToolbarSideSlider.OnSwitch = function (self, instance, value) - instance.toolbar_side = value and 2 or 1 - instance:ToolbarSide (side) - - end - frame2.instanceToolbarSideSlider.thumb:SetSize (50, 12) - - frame2.instanceToolbarSideSlider.info = Loc ["STRING_OPTIONS_TOOLBARSIDE_DESC"] - window:create_line_background (frame2, frame2.instanceToolbarSideLabel, frame2.instanceToolbarSideSlider) - frame2.instanceToolbarSideSlider:SetHook ("OnEnter", background_on_enter) - frame2.instanceToolbarSideSlider:SetHook ("OnLeave", background_on_leave) - - -- bar grow direction - g:NewLabel (frame2, _, "$parentBarGrowDirectionLabel", "barGrowDirectionLabel", Loc ["STRING_OPTIONS_BARGROW_DIRECTION"]) - - frame2.barGrowDirectionSlider:SetPoint ("left", frame2.barGrowDirectionLabel, "right", 2) - frame2.barGrowDirectionSlider.OnSwitch = function (self, instance, value) - instance:SetBarGrowDirection (value and 2 or 1) - end - frame2.barGrowDirectionSlider.thumb:SetSize (50, 12) - - frame2.barGrowDirectionSlider.info = Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"] - window:create_line_background (frame2, frame2.barGrowDirectionLabel, frame2.barGrowDirectionSlider) - frame2.barGrowDirectionSlider:SetHook ("OnEnter", background_on_enter) - frame2.barGrowDirectionSlider:SetHook ("OnLeave", background_on_leave) - - -- bar sort direction - g:NewLabel (frame2, _, "$parentBarSortDirectionLabel", "barSortDirectionLabel", Loc ["STRING_OPTIONS_BARSORT_DIRECTION"]) - - frame2.barSortDirectionSlider:SetPoint ("left", frame2.barSortDirectionLabel, "right", 2) - frame2.barSortDirectionSlider.OnSwitch = function (self, instance, value) - instance.bars_sort_direction = value and 2 or 1 - _detalhes:AtualizaGumpPrincipal (-1, true) - end - frame2.barSortDirectionSlider.thumb:SetSize (50, 12) - - frame2.barSortDirectionSlider.info = Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] - window:create_line_background (frame2, frame2.barSortDirectionLabel, frame2.barSortDirectionSlider) - frame2.barSortDirectionSlider:SetHook ("OnEnter", background_on_enter) - frame2.barSortDirectionSlider:SetHook ("OnLeave", background_on_leave) - - -- instance button - -- text color - g:NewLabel (frame2, _, "$parentInstanceTextColorLabel", "instanceTextColorLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"]) - - frame2.instanceTextColorImage:SetPoint ("left", frame2.instanceTextColorLabel, "right", 2) - - frame2.instanceTextColorButton:SetPoint ("left", frame2.instanceTextColorLabel, "right", 2) - frame2.instanceTextColorButton:InstallCustomTexture() - - frame2.instanceTextColorButton.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"] - window:create_line_background (frame2, frame2.instanceTextColorLabel, frame2.instanceTextColorButton) - frame2.instanceTextColorButton:SetHook ("OnEnter", background_on_enter) - frame2.instanceTextColorButton:SetHook ("OnLeave", background_on_leave) - - -- text font - g:NewLabel (frame2, _, "$parentInstanceTextFontLabel", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"]) - frame2.instanceTextFontDropdown:SetPoint ("left", frame2.instanceTextFontLabel, "right", 2) - - frame2.instanceTextFontDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT_DESC"] - window:create_line_background (frame2, frame2.instanceTextFontLabel, frame2.instanceTextFontDropdown) - frame2.instanceTextFontDropdown:SetHook ("OnEnter", background_on_enter) - frame2.instanceTextFontDropdown:SetHook ("OnLeave", background_on_leave) - - -- text size - g:NewLabel (frame2, _, "$parentInstanceTextSizeLabel", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"]) - frame2.instanceTextSizeSlider:SetPoint ("left", frame2.instanceTextSizeLabel, "right", 2) - - frame2.instanceTextSizeSlider.info = Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"] - window:create_line_background (frame2, frame2.instanceTextSizeLabel, frame2.instanceTextSizeSlider) - frame2.instanceTextSizeSlider:SetHook ("OnEnter", background_on_enter) - frame2.instanceTextSizeSlider:SetHook ("OnLeave", background_on_leave) - - -- color overlay - g:NewLabel (frame2, _, "$parentInstanceOverlayColorLabel", "instanceOverlayColorLabel", Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"]) - - frame2.instanceOverlayColorImage:SetPoint ("left", frame2.instanceOverlayColorLabel, "right", 2) - - frame2.instanceOverlayColorButton:SetPoint ("left", frame2.instanceOverlayColorLabel, "right", 2) - frame2.instanceOverlayColorButton:InstallCustomTexture() - - frame2.instanceOverlayColorButton.info = Loc ["STRING_OPTIONS_INSTANCE_OVERLAY_DESC"] - window:create_line_background (frame2, frame2.instanceOverlayColorLabel, frame2.instanceOverlayColorButton) - frame2.instanceOverlayColorButton:SetHook ("OnEnter", background_on_enter) - frame2.instanceOverlayColorButton:SetHook ("OnLeave", background_on_leave) - - -- close button - -- color overlay - g:NewLabel (frame2, _, "$parentCloseOverlayColorLabel", "closeOverlayColorLabel", Loc ["STRING_OPTIONS_CLOSE_OVERLAY"]) - - frame2.closeOverlayColorImage:SetPoint ("left", frame2.closeOverlayColorLabel, "right", 2) - - frame2.closeOverlayColorButton:SetPoint ("left", frame2.closeOverlayColorLabel, "right", 2) - frame2.closeOverlayColorButton:InstallCustomTexture() - - frame2.closeOverlayColorButton.info = Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"] - window:create_line_background (frame2, frame2.closeOverlayColorLabel, frame2.closeOverlayColorButton) - frame2.closeOverlayColorButton:SetHook ("OnEnter", background_on_enter) - frame2.closeOverlayColorButton:SetHook ("OnLeave", background_on_leave) - - - -- skin - g:NewLabel (frame2, _, "$parentSkinLabel", "skinLabel", Loc ["STRING_OPTIONS_INSTANCE_SKIN"]) - frame2.skinDropdown:SetPoint ("left", frame2.skinLabel, "right", 2) - - frame2.skinDropdown.info = Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] - window:create_line_background (frame2, frame2.skinLabel, frame2.skinDropdown) - frame2.skinDropdown:SetHook ("OnEnter", background_on_enter) - frame2.skinDropdown:SetHook ("OnLeave", background_on_leave) - -- Wallpaper Settings -- wallpaper - g:NewLabel (frame2, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_OPTIONS_WP_ENABLE"]) + g:NewLabel (frame9, _, "$parentBackgroundLabel", "enablewallpaperLabel", Loc ["STRING_OPTIONS_WP_ENABLE"], "GameFontHighlightLeft") -- - frame2.useBackgroundSlider:SetPoint ("left", frame2.enablewallpaperLabel, "right", 2, 0) --> slider ativar ou desativar - frame2.useBackgroundSlider.OnSwitch = function (self, instance, value) + frame9.useBackgroundSlider:SetPoint ("left", frame9.enablewallpaperLabel, "right", 2, 0) --> slider ativar ou desativar + frame9.useBackgroundSlider.OnSwitch = function (self, instance, value) instance.wallpaper.enabled = value if (value) then --> primeira vez que roda: @@ -2018,218 +2568,129 @@ function _detalhes:OpenOptionsWindow (instance) end instance:InstanceWallpaper (true) - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:Enable() - _G.DetailsOptionsWindow2BackgroundDropdown2.MyObject:Enable() + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Enable() + _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Enable() else instance:InstanceWallpaper (false) - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:Disable() - _G.DetailsOptionsWindow2BackgroundDropdown2.MyObject:Disable() + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Disable() + _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Disable() end + + window:update_wallpaper_info() + end - g:NewLabel (frame2, _, "$parentBackgroundLabel", "wallpapergroupLabel", Loc ["STRING_OPTIONS_WP_GROUP"]) - g:NewLabel (frame2, _, "$parentBackgroundLabel", "selectwallpaperLabel", Loc ["STRING_OPTIONS_WP_GROUP2"]) - g:NewLabel (frame2, _, "$parentAnchorLabel", "anchorLabel", Loc ["STRING_OPTIONS_WP_ALIGN"]) + g:NewLabel (frame9, _, "$parentBackgroundLabel", "wallpapergroupLabel", Loc ["STRING_OPTIONS_WP_GROUP"], "GameFontHighlightLeft") + g:NewLabel (frame9, _, "$parentBackgroundLabel", "selectwallpaperLabel", Loc ["STRING_OPTIONS_WP_GROUP2"], "GameFontHighlightLeft") + g:NewLabel (frame9, _, "$parentAnchorLabel", "anchorLabel", Loc ["STRING_OPTIONS_WP_ALIGN"], "GameFontHighlightLeft") -- - frame2.anchorDropdown:SetPoint ("left", frame2.anchorLabel, "right", 2) + frame9.anchorDropdown:SetPoint ("left", frame9.anchorLabel, "right", 2) -- - frame2.editImage:InstallCustomTexture() + frame9.editImage:InstallCustomTexture() - frame2.useBackgroundSlider.info = Loc ["STRING_OPTIONS_WP_ENABLE_DESC"] - window:create_line_background (frame2, frame2.enablewallpaperLabel, frame2.useBackgroundSlider) - frame2.useBackgroundSlider:SetHook ("OnEnter", background_on_enter) - frame2.useBackgroundSlider:SetHook ("OnLeave", background_on_leave) + frame9.useBackgroundSlider.info = Loc ["STRING_OPTIONS_WP_ENABLE_DESC"] + window:create_line_background (frame9, frame9.enablewallpaperLabel, frame9.useBackgroundSlider) + frame9.useBackgroundSlider:SetHook ("OnEnter", background_on_enter) + frame9.useBackgroundSlider:SetHook ("OnLeave", background_on_leave) - frame2.anchorDropdown.info = Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] - window:create_line_background (frame2, frame2.anchorLabel, frame2.anchorDropdown) - frame2.anchorDropdown:SetHook ("OnEnter", background_on_enter) - frame2.anchorDropdown:SetHook ("OnLeave", background_on_leave) + frame9.anchorDropdown.info = Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] + window:create_line_background (frame9, frame9.anchorLabel, frame9.anchorDropdown) + frame9.anchorDropdown:SetHook ("OnEnter", background_on_enter) + frame9.anchorDropdown:SetHook ("OnLeave", background_on_leave) - frame2.editImage.info = Loc ["STRING_OPTIONS_WP_EDIT_DESC"] - window:create_line_background (frame2, frame2.editImage, frame2.editImage) - frame2.editImage:SetHook ("OnEnter", background_on_enter) - frame2.editImage:SetHook ("OnLeave", background_on_leave) + frame9.editImage.info = Loc ["STRING_OPTIONS_WP_EDIT_DESC"] + window:create_line_background (frame9, frame9.editImage, frame9.editImage) + frame9.editImage:SetHook ("OnEnter", background_on_enter) + frame9.editImage:SetHook ("OnLeave", background_on_leave) - frame2.backgroundDropdown.info = Loc ["STRING_OPTIONS_WP_GROUP_DESC"] - window:create_line_background (frame2, frame2.wallpapergroupLabel, frame2.backgroundDropdown) - frame2.backgroundDropdown:SetHook ("OnEnter", background_on_enter) - frame2.backgroundDropdown:SetHook ("OnLeave", background_on_leave) + frame9.backgroundDropdown.info = Loc ["STRING_OPTIONS_WP_GROUP_DESC"] + window:create_line_background (frame9, frame9.wallpapergroupLabel, frame9.backgroundDropdown) + frame9.backgroundDropdown:SetHook ("OnEnter", background_on_enter) + frame9.backgroundDropdown:SetHook ("OnLeave", background_on_leave) - frame2.backgroundDropdown2.info = Loc ["STRING_OPTIONS_WP_GROUP2_DESC"] - window:create_line_background (frame2, frame2.selectwallpaperLabel, frame2.backgroundDropdown2) - frame2.backgroundDropdown2:SetHook ("OnEnter", background_on_enter) - frame2.backgroundDropdown2:SetHook ("OnLeave", background_on_leave) + frame9.backgroundDropdown2.info = Loc ["STRING_OPTIONS_WP_GROUP2_DESC"] + window:create_line_background (frame9, frame9.selectwallpaperLabel, frame9.backgroundDropdown2) + frame9.backgroundDropdown2:SetHook ("OnEnter", background_on_enter) + frame9.backgroundDropdown2:SetHook ("OnLeave", background_on_leave) ------------------------ Save Style Text Entry and Button ----------------------------------------- + function window:update_wallpaper_info() + local w = window.instance.wallpaper + + local a = w.alpha or 0 + a = a * 100 + a = string.format ("%.1f", a) .. "%" + + local t = w.texcoord [1] or 0 + t = t * 100 + t = string.format ("%.3f", t) .. "%" + local b = w.texcoord [2] or 1 + b = b * 100 + b = string.format ("%.3f", b) .. "%" + local l = w.texcoord [3] or 0 + l = l * 100 + l = string.format ("%.3f", l) .. "%" + local r = w.texcoord [4] or 1 + r = r * 100 + r = string.format ("%.3f", r) .. "%" + + local red = w.overlay[1] or 0 + red = math.ceil (red * 255) + local green = w.overlay[2] or "0" + green = math.ceil (green * 255) + local blue = w.overlay[3] or "0" + blue = math.ceil (blue * 255) + + frame9.wallpaperCurrentLabel.text = "Texture File: " .. (w.texture or "-- -- --") .. "\nAlpha: " .. a .. "\nOverlay red: " .. red .. " green: " .. green .. " blue: " .. blue .. "\nCut (top): " .. t .. "\nCut (bottom): " .. b .. "\nCut (left): " .. l .. "\nCut (right): " .. r + end + + --current settings + g:NewLabel (frame9, _, "$parentWallpaperCurrentAnchor", "wallpaperCurrentAnchorLabel", "Current:", "GameFontNormal") + g:NewLabel (frame9, _, "$parentWallpaperCurrentLabel", "wallpaperCurrentLabel", "", "GameFontHighlightSmall") + + --anchors - ----- style name + titulo_wallpaper:SetPoint (10, -10) + titulo_wallpaper_desc:SetPoint (10, -30) - frame2.saveStyleName:SetLabelText (Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] .. ":") + frame9.enablewallpaperLabel:SetPoint (10, -70) + + frame9.wallpapergroupLabel:SetPoint (10, -95) + frame9.selectwallpaperLabel:SetPoint (10, -120) + + frame9.backgroundDropdown:SetPoint ("left", frame9.wallpapergroupLabel, "right", 2, 0) + frame9.backgroundDropdown2:SetPoint ("left", frame9.selectwallpaperLabel, "right", 2, 0) + + frame9.anchorLabel:SetPoint (10, -145) + frame9.editImage:SetPoint (10, -170) + + frame9.wallpaperCurrentAnchorLabel:SetPoint (10, -380) + frame9.wallpaperCurrentLabel:SetPoint (10, -400) - ----- add style button - - frame2.saveStyle:InstallCustomTexture() - frame2.saveStyle:SetPoint ("left", frame2.saveStyleName, "right", 2) - - ----- load style button - - frame2.loadStyle:InstallCustomTexture() - frame2.loadStyle:SetPoint ("left", frame2.saveStyle, "right", 2) - - local createLoadMenu = function() - for index, _table in ipairs (_detalhes.savedStyles) do - GameCooltip:AddLine (_table.name) - GameCooltip:AddMenu (1, loadStyle, index) - end - end - frame2.loadStyle.CoolTip = {Type = "menu", BuildFunc = createLoadMenu, FixedValue = instance} - GameCooltip:CoolTipInject (frame2.loadStyle) - - ------ remove style button - - frame2.removeStyle:InstallCustomTexture() - frame2.removeStyle:SetPoint ("left", frame2.loadStyle, "right", 2) - - local removeStyle = function (_, _, index) - table.remove (_detalhes.savedStyles, index) - if (#_detalhes.savedStyles > 0) then - GameCooltip:ExecFunc (frame2.removeStyle) - else - GameCooltip:Close() - end - end - - local createRemoveMenu = function() - for index, _table in ipairs (_detalhes.savedStyles) do - GameCooltip:AddLine (_table.name) - GameCooltip:AddMenu (1, removeStyle, index) - end - end - frame2.removeStyle.CoolTip = {Type = "menu", BuildFunc = createRemoveMenu} - GameCooltip:CoolTipInject (frame2.removeStyle) - - frame2.applyToAll:InstallCustomTexture() - frame2.applyToAll:SetPoint ("bottomright", frame2.removeStyle, "topright", 1, 3) - - frame2.resetToDefaults:InstallCustomTexture() - frame2.resetToDefaults:SetPoint ("right", frame2.applyToAll, "left", -5, 0) - - --- Anchors -------------------------------------------------------------------------------------------------------------------------------------------- - - --> skin settings - --title - titulo_skin:SetPoint (10, -10) - titulo_skin_desc:SetPoint (10, -30) - --skin select - frame2.skinLabel:SetPoint (10, -70) - - --> general bar settings - titulo_bars:SetPoint (10, -110) - titulo_bars_desc:SetPoint (10, -130) - - frame2.rowHeightLabel:SetPoint (10, -170) --bar height - frame2.barGrowDirectionLabel:SetPoint (10, -190) --grow direction - frame2.barSortDirectionLabel:SetPoint (10, -210) --sort direction - - frame2.textureLabel:SetPoint (10, -250) --bar texture - frame2.classColorsLabel:SetPoint (10, -270) --class color - frame2.rowBackgroundLabel:SetPoint (10, -290) --select background - frame2.rowBackgroundColorByClassLabel:SetPoint (10, -310) --class color background - frame2.rowBackgroundColorTexture:SetPoint ("left", frame2.rowBackgroundColorByClassSlider, "right", 2) --bar color background - - --> text bar settings - titulo_texts:SetPoint (10, -350) - titulo_texts_desc:SetPoint (10, -370) - - frame2.fonsizeLabel:SetPoint (10, -410) --text size - frame2.fontLabel:SetPoint (10, -430) --text fontface - frame2.textLeftOutlineLabel:SetPoint (10, -450) --left outline - frame2.textRightOutlineLabel:SetPoint (10, -470) --right outline - frame2.classColorsLeftTextLabel:SetPoint (10, -490) --left color by class - frame2.classColorsRightTextLabel:SetPoint (10, -510) --right color by class - - --> window settings - titulo_instance:SetPoint (10, -550) - titulo_instance_desc:SetPoint (10, -570) - - frame2.instancecolor:SetPoint (10, -610) --window color - frame2.alphaLabel:SetPoint (10, -630) --background alpha - frame2.backgroundColorLabel:SetPoint (10, -650) --background color - - frame2.autoCurrentLabel:SetPoint (10, -670) --auto current - frame2.instanceToolbarSideLabel:SetPoint (10, -690) - frame2.sideBarsLabel:SetPoint (10, -710) --borders - frame2.statusbarLabel:SetPoint (10, -730) --statusbar - frame2.stretchAnchorLabel:SetPoint (10, -750) --stretch direction - - --> toolbar settings - titulo_toolbar:SetPoint (10, -790) - titulo_toolbar_desc:SetPoint (10, -810) - - frame2.menuAnchorXLabel:SetPoint (10, -850) - frame2.menuAnchorYLabel:SetPoint (10, -870) - frame2.desaturateMenuLabel:SetPoint (10, -890) - frame2.hideIconLabel:SetPoint (10, -910) - frame2.pluginIconsDirectionLabel:SetPoint (10, -930) - - frame2.instanceButtonAnchorXLabel:SetPoint (10, -970) - frame2.instanceButtonAnchorYLabel:SetPoint (10, -990) - frame2.instanceTextColorLabel:SetPoint (10, -1010) - frame2.instanceTextFontLabel:SetPoint (10, -1030) - frame2.instanceTextSizeLabel:SetPoint (10, -1050) - frame2.instanceOverlayColorLabel:SetPoint (10, -1070) - - frame2.resetTextColorLabel:SetPoint (10, -1110) - frame2.resetTextFontLabel:SetPoint (10, -1130) - frame2.resetTextSizeLabel:SetPoint (10, -1150) - frame2.resetOverlayColorLabel:SetPoint (10, -1170) - frame2.resetAlwaysSmallLabel:SetPoint (10, -1190) - - frame2.closeOverlayColorLabel:SetPoint (10, -1230) --> wallpaper settings - titulo_wallpaper:SetPoint (10, -1270) - titulo_wallpaper_desc:SetPoint (10, -1290) + - frame2.enablewallpaperLabel:SetPoint (10, -1330) +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Performance - Tweaks +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local frame10 = window.options [10][1] + local frame11 = window.options [11][1] - frame2.wallpapergroupLabel:SetPoint (10, -1350) - frame2.selectwallpaperLabel:SetPoint (135, -1350) - - frame2.backgroundDropdown:SetPoint ("topleft", frame2.wallpapergroupLabel, "bottomleft") - frame2.backgroundDropdown2:SetPoint ("topleft", frame2.selectwallpaperLabel, "bottomleft") - - frame2.anchorLabel:SetPoint (10, -1390) - frame2.editImage:SetPoint (10, -1410) - - --> save and load - - titulo_save:SetPoint (10, -1450) - titulo_save_desc:SetPoint (10, -1470) - - frame2.saveStyleName:SetPoint (10, -1510) - ----------------- performance - local frame3 = window.options [3][1].gump - - local titulo_performance_general = g:NewLabel (frame3, _, "$parentTituloPerformance1", "tituloPerformance1Label", Loc ["STRING_OPTIONS_PERFORMANCE1"], "GameFontNormal", 16) - titulo_performance_general:SetPoint (10, -10) - local titulo_performance_general_desc = g:NewLabel (frame3, _, "$parentTituloPersona2", "tituloPersona2Label", Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"], "GameFontNormal", 9, "white") - titulo_performance_general_desc.width = 250 - titulo_performance_general_desc:SetPoint (10, -30) + local titulo_performance_general = g:NewLabel (frame10, _, "$parentTituloPerformance1", "tituloPerformance1Label", Loc ["STRING_OPTIONS_PERFORMANCE1"], "GameFontNormal", 16) + local titulo_performance_general_desc = g:NewLabel (frame10, _, "$parentTituloPersona2", "tituloPersona2Label", Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"], "GameFontNormal", 9, "white") + titulo_performance_general_desc.width = 320 --------------- Memory - g:NewSlider (frame3, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, 20, 1, 5, 1, _detalhes.segments_amount_to_save) - g:NewSlider (frame3, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) + g:NewSlider (frame10, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, 20, 1, 5, 1, _detalhes.segments_amount_to_save) + g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.3, 3, 0.1, _detalhes.update_speed, true) - g:NewLabel (frame3, _, "$parentLabelMemory", "memoryLabel", Loc ["STRING_OPTIONS_MEMORYT"]) - frame3.memoryLabel:SetPoint (10, -70) - - g:NewSlider (frame3, _, "$parentSliderMemory", "memorySlider", SLIDER_WIDTH, 20, 1, 4, 1, _detalhes.memory_threshold) - frame3.memorySlider:SetPoint ("left", frame3.memoryLabel, "right", 2, 0) - frame3.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) + g:NewLabel (frame10, _, "$parentLabelMemory", "memoryLabel", Loc ["STRING_OPTIONS_MEMORYT"], "GameFontHighlightLeft") + + g:NewSlider (frame10, _, "$parentSliderMemory", "memorySlider", SLIDER_WIDTH, 20, 1, 4, 1, _detalhes.memory_threshold) + frame10.memorySlider:SetPoint ("left", frame10.memoryLabel, "right", 2, 0) + frame10.memorySlider:SetHook ("OnValueChange", function (slider, _, amount) amount = math.floor (amount) @@ -2255,86 +2716,83 @@ function _detalhes:OpenOptionsWindow (instance) return true end) - frame3.memorySlider.info = Loc ["STRING_OPTIONS_MEMORYT_DESC"] - frame3.memorySlider.thumb:SetSize (40, 12) - frame3.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]]) - frame3.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9) + frame10.memorySlider.info = Loc ["STRING_OPTIONS_MEMORYT_DESC"] + frame10.memorySlider.thumb:SetSize (40, 12) + frame10.memorySlider.thumb:SetTexture ([[Interface\Buttons\UI-Listbox-Highlight2]]) + frame10.memorySlider.thumb:SetVertexColor (.2, .2, .2, .9) local t = _detalhes.memory_threshold - frame3.memorySlider:SetValue (1) - frame3.memorySlider:SetValue (2) - frame3.memorySlider:SetValue (t) + frame10.memorySlider:SetValue (1) + frame10.memorySlider:SetValue (2) + frame10.memorySlider:SetValue (t) - window:create_line_background (frame3, frame3.memoryLabel, frame3.memorySlider) - frame3.memorySlider:SetHook ("OnEnter", background_on_enter) - frame3.memorySlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.memoryLabel, frame10.memorySlider) + frame10.memorySlider:SetHook ("OnEnter", background_on_enter) + frame10.memorySlider:SetHook ("OnLeave", background_on_leave) --------------- Max Segments Saved - g:NewLabel (frame3, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", Loc ["STRING_OPTIONS_SEGMENTSSAVE"]) - frame3.segmentsSaveLabel:SetPoint (10, -90) + g:NewLabel (frame10, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", Loc ["STRING_OPTIONS_SEGMENTSSAVE"], "GameFontHighlightLeft") -- - frame3.segmentsSliderToSave:SetPoint ("left", frame3.segmentsSaveLabel, "right", 2, 0) - frame3.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue + frame10.segmentsSliderToSave:SetPoint ("left", frame10.segmentsSaveLabel, "right", 2, 0) + frame10.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue _detalhes.segments_amount_to_save = math.floor (amount) end) - frame3.segmentsSliderToSave.info = Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"] + frame10.segmentsSliderToSave.info = Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"] - window:create_line_background (frame3, frame3.segmentsSaveLabel, frame3.segmentsSliderToSave) - frame3.segmentsSliderToSave:SetHook ("OnEnter", background_on_enter) - frame3.segmentsSliderToSave:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.segmentsSaveLabel, frame10.segmentsSliderToSave) + frame10.segmentsSliderToSave:SetHook ("OnEnter", background_on_enter) + frame10.segmentsSliderToSave:SetHook ("OnLeave", background_on_leave) --------------- Panic Mode - g:NewLabel (frame3, _, "$parentPanicModeLabel", "panicModeLabel", Loc ["STRING_OPTIONS_PANIMODE"]) - frame3.panicModeLabel:SetPoint (10, -110) + g:NewLabel (frame10, _, "$parentPanicModeLabel", "panicModeLabel", Loc ["STRING_OPTIONS_PANIMODE"], "GameFontHighlightLeft") -- - g:NewSwitch (frame3, _, "$parentPanicModeSlider", "panicModeSlider", 60, 20, _, _, _detalhes.segments_panic_mode) - frame3.panicModeSlider:SetPoint ("left", frame3.panicModeLabel, "right", 2, 0) - frame3.panicModeSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue + g:NewSwitch (frame10, _, "$parentPanicModeSlider", "panicModeSlider", 60, 20, _, _, _detalhes.segments_panic_mode) + frame10.panicModeSlider:SetPoint ("left", frame10.panicModeLabel, "right", 2, 0) + frame10.panicModeSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue _detalhes.segments_panic_mode = value end - frame3.panicModeSlider.info = Loc ["STRING_OPTIONS_PANIMODE_DESC"] + frame10.panicModeSlider.info = Loc ["STRING_OPTIONS_PANIMODE_DESC"] - window:create_line_background (frame3, frame3.panicModeLabel, frame3.panicModeSlider) - frame3.panicModeSlider:SetHook ("OnEnter", background_on_enter) - frame3.panicModeSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.panicModeLabel, frame10.panicModeSlider) + frame10.panicModeSlider:SetHook ("OnEnter", background_on_enter) + frame10.panicModeSlider:SetHook ("OnLeave", background_on_leave) --------------- Animate Rows - g:NewLabel (frame3, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS"]) - frame3.animateLabel:SetPoint (10, -130) - -- - g:NewSwitch (frame3, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv - frame3.animateSlider:SetPoint ("left",frame3.animateLabel, "right", 2, 0) - frame3.animateSlider.info = Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"] - frame3.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) + g:NewLabel (frame10, _, "$parentAnimateLabel", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS"], "GameFontHighlightLeft") + + g:NewSwitch (frame10, _, "$parentAnimateSlider", "animateSlider", 60, 20, _, _, _detalhes.use_row_animations) -- ltext, rtext, defaultv + frame10.animateSlider:SetPoint ("left",frame10.animateLabel, "right", 2, 0) + frame10.animateSlider.info = Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"] + frame10.animateSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue (false, true) _detalhes.use_row_animations = value end - window:create_line_background (frame3, frame3.animateLabel, frame3.animateSlider) - frame3.animateSlider:SetHook ("OnEnter", background_on_enter) - frame3.animateSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.animateLabel, frame10.animateSlider) + frame10.animateSlider:SetHook ("OnEnter", background_on_enter) + frame10.animateSlider:SetHook ("OnLeave", background_on_leave) --------------- Animate scroll bar - g:NewLabel (frame3, _, "$parentAnimateScrollLabel", "animatescrollLabel", Loc ["STRING_OPTIONS_ANIMATESCROLL"]) - frame3.animatescrollLabel:SetPoint (10, -150) + g:NewLabel (frame10, _, "$parentAnimateScrollLabel", "animatescrollLabel", Loc ["STRING_OPTIONS_ANIMATESCROLL"], "GameFontHighlightLeft") + -- - g:NewSwitch (frame3, _, "$parentClearAnimateScrollSlider", "animatescrollSlider", 60, 20, _, _, _detalhes.animate_scroll) -- ltext, rtext, defaultv - frame3.animatescrollSlider:SetPoint ("left", frame3.animatescrollLabel, "right", 2, 0) - frame3.animatescrollSlider.info = Loc ["STRING_OPTIONS_ANIMATESCROLL_DESC"] - frame3.animatescrollSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue + g:NewSwitch (frame10, _, "$parentClearAnimateScrollSlider", "animatescrollSlider", 60, 20, _, _, _detalhes.animate_scroll) -- ltext, rtext, defaultv + frame10.animatescrollSlider:SetPoint ("left", frame10.animatescrollLabel, "right", 2, 0) + frame10.animatescrollSlider.info = Loc ["STRING_OPTIONS_ANIMATESCROLL_DESC"] + frame10.animatescrollSlider.OnSwitch = function (self, _, value) --> slider, fixedValue, sliderValue _detalhes.animate_scroll = value end - window:create_line_background (frame3, frame3.animatescrollLabel, frame3.animatescrollSlider) - frame3.animatescrollSlider:SetHook ("OnEnter", background_on_enter) - frame3.animatescrollSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.animatescrollLabel, frame10.animatescrollSlider) + frame10.animatescrollSlider:SetHook ("OnEnter", background_on_enter) + frame10.animatescrollSlider:SetHook ("OnLeave", background_on_leave) --------------- Update Speed - g:NewLabel (frame3, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"]) - frame3.updatespeedLabel:SetPoint (10, -170) + g:NewLabel (frame10, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"], "GameFontHighlightLeft") + -- - frame3.updatespeedSlider:SetPoint ("left", frame3.updatespeedLabel, "right", 2, 0) - frame3.updatespeedSlider:SetThumbSize (50) - frame3.updatespeedSlider.useDecimals = true + frame10.updatespeedSlider:SetPoint ("left", frame10.updatespeedLabel, "right", 2, 0) + frame10.updatespeedSlider:SetThumbSize (50) + frame10.updatespeedSlider.useDecimals = true local updateColor = function (slider, value) if (value < 1) then slider.amt:SetTextColor (1, value, 0) @@ -2344,162 +2802,179 @@ function _detalhes:OpenOptionsWindow (instance) slider.amt:SetTextColor (1, 1, 0) end end - frame3.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) + frame10.updatespeedSlider:SetHook ("OnValueChange", function (self, _, amount) _detalhes:CancelTimer (_detalhes.atualizador) _detalhes.update_speed = amount _detalhes.atualizador = _detalhes:ScheduleRepeatingTimer ("AtualizaGumpPrincipal", _detalhes.update_speed, -1) updateColor (self, amount) end) - updateColor (frame3.updatespeedSlider, _detalhes.update_speed) + updateColor (frame10.updatespeedSlider, _detalhes.update_speed) - frame3.updatespeedSlider.info = Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] + frame10.updatespeedSlider.info = Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] - window:create_line_background (frame3, frame3.updatespeedLabel, frame3.updatespeedSlider) - frame3.updatespeedSlider:SetHook ("OnEnter", background_on_enter) - frame3.updatespeedSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.updatespeedLabel, frame10.updatespeedSlider) + frame10.updatespeedSlider:SetHook ("OnEnter", background_on_enter) + frame10.updatespeedSlider:SetHook ("OnLeave", background_on_leave) --------------- Erase Trash - g:NewLabel (frame3, _, "$parentEraseTrash", "eraseTrashLabel", Loc ["STRING_OPTIONS_CLEANUP"]) - frame3.eraseTrashLabel:SetPoint (10, -190) + g:NewLabel (frame10, _, "$parentEraseTrash", "eraseTrashLabel", Loc ["STRING_OPTIONS_CLEANUP"], "GameFontHighlightLeft") + -- - g:NewSwitch (frame3, _, "$parentRemoveTrashSlider", "removeTrashSlider", 60, 20, _, _, _detalhes.trash_auto_remove) - frame3.removeTrashSlider:SetPoint ("left", frame3.eraseTrashLabel, "right") - frame3.removeTrashSlider.OnSwitch = function (self, _, amount) + g:NewSwitch (frame10, _, "$parentRemoveTrashSlider", "removeTrashSlider", 60, 20, _, _, _detalhes.trash_auto_remove) + frame10.removeTrashSlider:SetPoint ("left", frame10.eraseTrashLabel, "right") + frame10.removeTrashSlider.OnSwitch = function (self, _, amount) _detalhes.trash_auto_remove = amount end - frame3.removeTrashSlider.info = Loc ["STRING_OPTIONS_CLEANUP_DESC"] + frame10.removeTrashSlider.info = Loc ["STRING_OPTIONS_CLEANUP_DESC"] - window:create_line_background (frame3, frame3.eraseTrashLabel, frame3.removeTrashSlider) - frame3.removeTrashSlider:SetHook ("OnEnter", background_on_enter) - frame3.removeTrashSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame10, frame10.eraseTrashLabel, frame10.removeTrashSlider) + frame10.removeTrashSlider:SetHook ("OnEnter", background_on_enter) + frame10.removeTrashSlider:SetHook ("OnLeave", background_on_leave) + + titulo_performance_general:SetPoint (10, -10) + titulo_performance_general_desc:SetPoint (10, -30) + frame10.memoryLabel:SetPoint (10, -70) + frame10.segmentsSaveLabel:SetPoint (10, -95) + frame10.panicModeLabel:SetPoint (10, -120) + frame10.animateLabel:SetPoint (10, -145) + --frame10.animatescrollLabel:SetPoint (10, -170) + frame10.updatespeedLabel:SetPoint (10, -170) + frame10.eraseTrashLabel:SetPoint (10, -195) - local titulo_performance_captures = g:NewLabel (frame3, _, "$parentTituloPerformanceCaptures", "tituloPerformanceCaptures", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES"], "GameFontNormal", 16) - titulo_performance_captures:SetPoint (10, -230) - local titulo_performance_captures_desc = g:NewLabel (frame3, _, "$parentTituloPersonaCaptures2", "tituloPersonaCaptures2Label", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES_DESC"], "GameFontNormal", 9, "white") - titulo_performance_captures_desc.width = 250 - titulo_performance_captures_desc:SetPoint (10, -250) +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Performance - Captures +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + + local titulo_performance_captures = g:NewLabel (frame11, _, "$parentTituloPerformanceCaptures", "tituloPerformanceCaptures", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES"], "GameFontNormal", 16) + local titulo_performance_captures_desc = g:NewLabel (frame11, _, "$parentTituloPersonaCaptures2", "tituloPersonaCaptures2Label", Loc ["STRING_OPTIONS_PERFORMANCECAPTURES_DESC"], "GameFontNormal", 9, "white") + titulo_performance_captures_desc.width = 320 --------------- Captures - g:NewImage (frame3, _, "$parentCaptureDamage", "damageCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - frame3.damageCaptureImage:SetPoint (10, -290) - frame3.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1) + g:NewImage (frame11, _, "$parentCaptureDamage", "damageCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - g:NewImage (frame3, _, "$parentCaptureHeal", "healCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - frame3.healCaptureImage:SetPoint (10, -310) - frame3.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1) + frame11.damageCaptureImage:SetTexCoord (0, 0.125, 0, 1) - g:NewImage (frame3, _, "$parentCaptureEnergy", "energyCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - frame3.energyCaptureImage:SetPoint (10, -330) - frame3.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1) + g:NewImage (frame11, _, "$parentCaptureHeal", "healCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) + frame11.healCaptureImage:SetTexCoord (0.125, 0.25, 0, 1) - g:NewImage (frame3, _, "$parentCaptureMisc", "miscCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - frame3.miscCaptureImage:SetPoint (10, -350) - frame3.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1) + g:NewImage (frame11, _, "$parentCaptureEnergy", "energyCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) + frame11.energyCaptureImage:SetTexCoord (0.25, 0.375, 0, 1) - g:NewImage (frame3, _, "$parentCaptureAura", "auraCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) - frame3.auraCaptureImage:SetPoint (10, -370) - frame3.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1) + g:NewImage (frame11, _, "$parentCaptureMisc", "miscCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) + frame11.miscCaptureImage:SetTexCoord (0.375, 0.5, 0, 1) - g:NewLabel (frame3, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"]) - frame3.damageCaptureLabel:SetPoint ("left", frame3.damageCaptureImage, "right", 2) + g:NewImage (frame11, _, "$parentCaptureAura", "auraCaptureImage", 20, 20, [[Interface\AddOns\Details\images\atributos_captures]]) + frame11.auraCaptureImage:SetTexCoord (0.5, 0.625, 0, 1) - g:NewLabel (frame3, _, "$parentCaptureDamageLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"]) - frame3.healCaptureLabel:SetPoint ("left", frame3.healCaptureImage, "right", 2) + g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "damageCaptureLabel", Loc ["STRING_OPTIONS_CDAMAGE"], "GameFontHighlightLeft") + frame11.damageCaptureLabel:SetPoint ("left", frame11.damageCaptureImage, "right", 2) - g:NewLabel (frame3, _, "$parentCaptureDamageLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"]) - frame3.energyCaptureLabel:SetPoint ("left", frame3.energyCaptureImage, "right", 2) + g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "healCaptureLabel", Loc ["STRING_OPTIONS_CHEAL"], "GameFontHighlightLeft") + frame11.healCaptureLabel:SetPoint ("left", frame11.healCaptureImage, "right", 2) - g:NewLabel (frame3, _, "$parentCaptureDamageLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"]) - frame3.miscCaptureLabel:SetPoint ("left", frame3.miscCaptureImage, "right", 2) + g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "energyCaptureLabel", Loc ["STRING_OPTIONS_CENERGY"], "GameFontHighlightLeft") + frame11.energyCaptureLabel:SetPoint ("left", frame11.energyCaptureImage, "right", 2) - g:NewLabel (frame3, _, "$parentCaptureDamageLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"]) - frame3.auraCaptureLabel:SetPoint ("left", frame3.auraCaptureImage, "right", 2) + g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "miscCaptureLabel", Loc ["STRING_OPTIONS_CMISC"], "GameFontHighlightLeft") + frame11.miscCaptureLabel:SetPoint ("left", frame11.miscCaptureImage, "right", 2) + + g:NewLabel (frame11, _, "$parentCaptureDamageLabel", "auraCaptureLabel", Loc ["STRING_OPTIONS_CAURAS"], "GameFontHighlightLeft") + frame11.auraCaptureLabel:SetPoint ("left", frame11.auraCaptureImage, "right", 2) local switch_icon_color = function (icon, on_off) icon:SetDesaturated (not on_off) end - g:NewSwitch (frame3, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"]) - frame3.damageCaptureSlider:SetPoint ("left", frame3.damageCaptureLabel, "right", 2) - frame3.damageCaptureSlider.info = Loc ["STRING_OPTIONS_CDAMAGE_DESC"] - frame3.damageCaptureSlider.OnSwitch = function (self, _, value) + g:NewSwitch (frame11, _, "$parentCaptureDamageSlider", "damageCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["damage"]) + frame11.damageCaptureSlider:SetPoint ("left", frame11.damageCaptureLabel, "right", 2) + frame11.damageCaptureSlider.info = Loc ["STRING_OPTIONS_CDAMAGE_DESC"] + frame11.damageCaptureSlider.OnSwitch = function (self, _, value) _detalhes:CaptureSet (value, "damage", true) - switch_icon_color (frame3.damageCaptureImage, value) + switch_icon_color (frame11.damageCaptureImage, value) end - switch_icon_color (frame3.damageCaptureImage, _detalhes.capture_real ["damage"]) + switch_icon_color (frame11.damageCaptureImage, _detalhes.capture_real ["damage"]) - window:create_line_background (frame3, frame3.damageCaptureLabel, frame3.damageCaptureSlider) - frame3.damageCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.damageCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.damageCaptureLabel, frame11.damageCaptureSlider) + frame11.damageCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.damageCaptureSlider:SetHook ("OnLeave", background_on_leave) - g:NewSwitch (frame3, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"]) - frame3.healCaptureSlider:SetPoint ("left", frame3.healCaptureLabel, "right", 2) - frame3.healCaptureSlider.info = Loc ["STRING_OPTIONS_CHEAL_DESC"] - frame3.healCaptureSlider.OnSwitch = function (self, _, value) + g:NewSwitch (frame11, _, "$parentCaptureHealSlider", "healCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["heal"]) + frame11.healCaptureSlider:SetPoint ("left", frame11.healCaptureLabel, "right", 2) + frame11.healCaptureSlider.info = Loc ["STRING_OPTIONS_CHEAL_DESC"] + frame11.healCaptureSlider.OnSwitch = function (self, _, value) _detalhes:CaptureSet (value, "heal", true) - switch_icon_color (frame3.healCaptureImage, value) + switch_icon_color (frame11.healCaptureImage, value) end - switch_icon_color (frame3.healCaptureImage, _detalhes.capture_real ["heal"]) + switch_icon_color (frame11.healCaptureImage, _detalhes.capture_real ["heal"]) - window:create_line_background (frame3, frame3.healCaptureLabel, frame3.healCaptureSlider) - frame3.healCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.healCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.healCaptureLabel, frame11.healCaptureSlider) + frame11.healCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.healCaptureSlider:SetHook ("OnLeave", background_on_leave) - g:NewSwitch (frame3, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"]) - frame3.energyCaptureSlider:SetPoint ("left", frame3.energyCaptureLabel, "right", 2) - frame3.energyCaptureSlider.info = Loc ["STRING_OPTIONS_CENERGY_DESC"] - frame3.energyCaptureSlider.OnSwitch = function (self, _, value) + g:NewSwitch (frame11, _, "$parentCaptureEnergySlider", "energyCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["energy"]) + frame11.energyCaptureSlider:SetPoint ("left", frame11.energyCaptureLabel, "right", 2) + frame11.energyCaptureSlider.info = Loc ["STRING_OPTIONS_CENERGY_DESC"] + frame11.energyCaptureSlider.OnSwitch = function (self, _, value) _detalhes:CaptureSet (value, "energy", true) - switch_icon_color (frame3.energyCaptureImage, value) + switch_icon_color (frame11.energyCaptureImage, value) end - switch_icon_color (frame3.energyCaptureImage, _detalhes.capture_real ["energy"]) + switch_icon_color (frame11.energyCaptureImage, _detalhes.capture_real ["energy"]) - window:create_line_background (frame3, frame3.energyCaptureLabel, frame3.energyCaptureSlider) - frame3.energyCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.energyCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.energyCaptureLabel, frame11.energyCaptureSlider) + frame11.energyCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.energyCaptureSlider:SetHook ("OnLeave", background_on_leave) - g:NewSwitch (frame3, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"]) - frame3.miscCaptureSlider:SetPoint ("left", frame3.miscCaptureLabel, "right", 2) - frame3.miscCaptureSlider.info = Loc ["STRING_OPTIONS_CMISC_DESC"] - frame3.miscCaptureSlider.OnSwitch = function (self, _, value) + g:NewSwitch (frame11, _, "$parentCaptureMiscSlider", "miscCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["miscdata"]) + frame11.miscCaptureSlider:SetPoint ("left", frame11.miscCaptureLabel, "right", 2) + frame11.miscCaptureSlider.info = Loc ["STRING_OPTIONS_CMISC_DESC"] + frame11.miscCaptureSlider.OnSwitch = function (self, _, value) _detalhes:CaptureSet (value, "miscdata", true) - switch_icon_color (frame3.miscCaptureImage, value) + switch_icon_color (frame11.miscCaptureImage, value) end - switch_icon_color (frame3.miscCaptureImage, _detalhes.capture_real ["miscdata"]) + switch_icon_color (frame11.miscCaptureImage, _detalhes.capture_real ["miscdata"]) - window:create_line_background (frame3, frame3.miscCaptureLabel, frame3.miscCaptureSlider) - frame3.miscCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.miscCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.miscCaptureLabel, frame11.miscCaptureSlider) + frame11.miscCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.miscCaptureSlider:SetHook ("OnLeave", background_on_leave) - g:NewSwitch (frame3, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"]) - frame3.auraCaptureSlider:SetPoint ("left", frame3.auraCaptureLabel, "right", 2) - frame3.auraCaptureSlider.info = Loc ["STRING_OPTIONS_CAURAS_DESC"] - frame3.auraCaptureSlider.OnSwitch = function (self, _, value) + g:NewSwitch (frame11, _, "$parentCaptureAuraSlider", "auraCaptureSlider", 60, 20, _, _, _detalhes.capture_real ["aura"]) + frame11.auraCaptureSlider:SetPoint ("left", frame11.auraCaptureLabel, "right", 2) + frame11.auraCaptureSlider.info = Loc ["STRING_OPTIONS_CAURAS_DESC"] + frame11.auraCaptureSlider.OnSwitch = function (self, _, value) _detalhes:CaptureSet (value, "aura", true) - switch_icon_color (frame3.auraCaptureImage, value) + switch_icon_color (frame11.auraCaptureImage, value) end - switch_icon_color (frame3.auraCaptureImage, _detalhes.capture_real ["aura"]) + switch_icon_color (frame11.auraCaptureImage, _detalhes.capture_real ["aura"]) - window:create_line_background (frame3, frame3.auraCaptureLabel, frame3.auraCaptureSlider) - frame3.auraCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.auraCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.auraCaptureLabel, frame11.auraCaptureSlider) + frame11.auraCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.auraCaptureSlider:SetHook ("OnLeave", background_on_leave) --------------- Cloud Capture - g:NewLabel (frame3, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD"]) - frame3.cloudCaptureLabel:SetPoint (10, -400) - - g:NewSwitch (frame3, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture) - frame3.cloudCaptureSlider:SetPoint ("left", frame3.cloudCaptureLabel, "right", 2) - frame3.cloudCaptureSlider.info = Loc ["STRING_OPTIONS_CLOUD_DESC"] - frame3.cloudCaptureSlider.OnSwitch = function (self, _, value) + g:NewLabel (frame11, _, "$parentCloudCaptureLabel", "cloudCaptureLabel", Loc ["STRING_OPTIONS_CLOUD"], "GameFontHighlightLeft") + + g:NewSwitch (frame11, _, "$parentCloudAuraSlider", "cloudCaptureSlider", 60, 20, _, _, _detalhes.cloud_capture) + frame11.cloudCaptureSlider:SetPoint ("left", frame11.cloudCaptureLabel, "right", 2) + frame11.cloudCaptureSlider.info = Loc ["STRING_OPTIONS_CLOUD_DESC"] + frame11.cloudCaptureSlider.OnSwitch = function (self, _, value) _detalhes.cloud_capture = value end - window:create_line_background (frame3, frame3.cloudCaptureLabel, frame3.cloudCaptureSlider) - frame3.cloudCaptureSlider:SetHook ("OnEnter", background_on_enter) - frame3.cloudCaptureSlider:SetHook ("OnLeave", background_on_leave) + window:create_line_background (frame11, frame11.cloudCaptureLabel, frame11.cloudCaptureSlider) + frame11.cloudCaptureSlider:SetHook ("OnEnter", background_on_enter) + frame11.cloudCaptureSlider:SetHook ("OnLeave", background_on_leave) + titulo_performance_captures:SetPoint (10, -10) + titulo_performance_captures_desc:SetPoint (10, -30) + frame11.damageCaptureImage:SetPoint (10, -70) + frame11.healCaptureImage:SetPoint (10, -95) + frame11.energyCaptureImage:SetPoint (10, -120) + frame11.miscCaptureImage:SetPoint (10, -145) + frame11.auraCaptureImage:SetPoint (10, -170) + frame11.cloudCaptureLabel:SetPoint (10, -200) + + --------------- Concatenate Trash --[[ g:NewLabel (frame3, _, "$parentConcatenateTrash", "concatenateTrashLabel", "concatenate clean up segments") @@ -2512,11 +2987,11 @@ function _detalhes:OpenOptionsWindow (instance) end frame3.concatenateTrashSlider.tooltip = "Concatenate the next boss segments into only one." --]] - - + + -------- plugins - local frame4 = window.options [4][1].gump + local frame4 = window.options [12][1].gump local on_enter = function (self) self:SetBackdropColor (.3, .3, .3, .8) @@ -2738,62 +3213,68 @@ end ---------------------------------------------------------------------------------------- --> Show - _G.DetailsOptionsWindow2ResetTextColorImage.MyObject:SetTexture (unpack (instance.resetbutton_info.text_color)) - _G.DetailsOptionsWindow2ResetTextSizeSlider.MyObject:SetValue (instance.resetbutton_info.text_size) - _G.DetailsOptionsWindow2ResetTextFontDropdown.MyObject:Select (instance.resetbutton_info.text_face) - _G.DetailsOptionsWindow2ResetOverlayColorImage.MyObject:SetTexture (unpack (instance.resetbutton_info.color_overlay)) + _G.DetailsOptionsWindow8ResetTextColorImage.MyObject:SetTexture (unpack (instance.resetbutton_info.text_color)) + _G.DetailsOptionsWindow8ResetTextSizeSlider.MyObject:SetValue (instance.resetbutton_info.text_size) + _G.DetailsOptionsWindow8ResetTextFontDropdown.MyObject:Select (instance.resetbutton_info.text_face) + _G.DetailsOptionsWindow8ResetOverlayColorImage.MyObject:SetTexture (unpack (instance.resetbutton_info.color_overlay)) - _G.DetailsOptionsWindow2InstanceTextColorImage.MyObject:SetTexture (unpack (instance.instancebutton_info.text_color)) - _G.DetailsOptionsWindow2InstanceTextSizeSlider.MyObject:SetValue (instance.instancebutton_info.text_size) - _G.DetailsOptionsWindow2InstanceTextFontDropdown.MyObject:Select (instance.instancebutton_info.text_face) - _G.DetailsOptionsWindow2InstanceOverlayColorImage.MyObject:SetTexture (unpack (instance.instancebutton_info.color_overlay)) + _G.DetailsOptionsWindow8InstanceTextColorImage.MyObject:SetTexture (unpack (instance.instancebutton_info.text_color)) + _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetValue (instance.instancebutton_info.text_size) + _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:Select (instance.instancebutton_info.text_face) + _G.DetailsOptionsWindow8InstanceOverlayColorImage.MyObject:SetTexture (unpack (instance.instancebutton_info.color_overlay)) - _G.DetailsOptionsWindow2CloseOverlayColorImage.MyObject:SetTexture (unpack (instance.closebutton_info.color_overlay)) + _G.DetailsOptionsWindow8CloseOverlayColorImage.MyObject:SetTexture (unpack (instance.closebutton_info.color_overlay)) - _G.DetailsOptionsWindow1HideOnCombatSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow1HideOnCombatAlphaSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow1HideOnCombatSlider.MyObject:SetValue (instance.hide_in_combat) - _G.DetailsOptionsWindow1HideOnCombatAlphaSlider.MyObject:SetValue (instance.hide_in_combat_alpha) + _G.DetailsOptionsWindow2HideOnCombatSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2HideOnCombatAlphaSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2HideOnCombatSlider.MyObject:SetValue (instance.hide_in_combat) + _G.DetailsOptionsWindow2HideOnCombatAlphaSlider.MyObject:SetValue (instance.hide_in_combat_alpha) - _G.DetailsOptionsWindow2SideBarsSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SideBarsSlider.MyObject:SetValue (instance.show_sidebars) + _G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetValue (instance.show_sidebars) - _G.DetailsOptionsWindow2StatusbarSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2StatusbarSlider.MyObject:SetValue (instance.show_statusbar) + _G.DetailsOptionsWindow6TotalBarSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6TotalBarSlider.MyObject:SetValue (instance.total_bar.enabled) + _G.DetailsOptionsWindow6TotalBarColorTexture:SetTexture (unpack (instance.total_bar.color)) + _G.DetailsOptionsWindow6TotalBarOnlyInGroupSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6TotalBarOnlyInGroupSlider.MyObject:SetValue (instance.total_bar.only_in_group) + _G.DetailsOptionsWindow6TotalBarIconTexture.MyObject:SetTexture (instance.total_bar.icon) - _G.DetailsOptionsWindow2StretchAnchorSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2StretchAnchorSlider.MyObject:SetValue (instance.stretch_button_side) + _G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetValue (instance.show_statusbar) - _G.DetailsOptionsWindow2PluginIconsDirectionSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2PluginIconsDirectionSlider.MyObject:SetValue (instance.plugins_grow_direction) + _G.DetailsOptionsWindow6StretchAnchorSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6StretchAnchorSlider.MyObject:SetValue (instance.stretch_button_side) - _G.DetailsOptionsWindow2InstanceToolbarSideSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2InstanceToolbarSideSlider.MyObject:SetValue (instance.toolbar_side) + _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7PluginIconsDirectionSlider.MyObject:SetValue (instance.plugins_grow_direction) - _G.DetailsOptionsWindow2BarSortDirectionSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BarSortDirectionSlider.MyObject:SetValue (instance.bars_sort_direction) + _G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6InstanceToolbarSideSlider.MyObject:SetValue (instance.toolbar_side) - _G.DetailsOptionsWindow2BarGrowDirectionSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BarGrowDirectionSlider.MyObject:SetValue (instance.bars_grow_direction) + _G.DetailsOptionsWindow4BarSortDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4BarSortDirectionSlider.MyObject:SetValue (instance.bars_sort_direction) + _G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4BarGrowDirectionSlider.MyObject:SetValue (instance.bars_grow_direction) - _G.DetailsOptionsWindow2DesaturateMenuSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2DesaturateMenuSlider.MyObject:SetValue (instance.desaturated_menu) + _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7DesaturateMenuSlider.MyObject:SetValue (instance.desaturated_menu) - _G.DetailsOptionsWindow2HideIconSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2HideIconSlider.MyObject:SetValue (instance.hide_icon) + _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7HideIconSlider.MyObject:SetValue (instance.hide_icon) - _G.DetailsOptionsWindow2MenuAnchorXSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2MenuAnchorXSlider.MyObject:SetValue (instance.menu_anchor[1]) + _G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7MenuAnchorXSlider.MyObject:SetValue (instance.menu_anchor[1]) - _G.DetailsOptionsWindow2MenuAnchorYSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2MenuAnchorYSlider.MyObject:SetValue (instance.menu_anchor[2]) + _G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7MenuAnchorYSlider.MyObject:SetValue (instance.menu_anchor[2]) - _G.DetailsOptionsWindow2InstanceButtonAnchorXSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2InstanceButtonAnchorXSlider.MyObject:SetValue (instance.instance_button_anchor[1]) + _G.DetailsOptionsWindow7InstanceButtonAnchorXSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7InstanceButtonAnchorXSlider.MyObject:SetValue (instance.instance_button_anchor[1]) - _G.DetailsOptionsWindow2InstanceButtonAnchorYSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2InstanceButtonAnchorYSlider.MyObject:SetValue (instance.instance_button_anchor[2]) + _G.DetailsOptionsWindow7InstanceButtonAnchorYSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow7InstanceButtonAnchorYSlider.MyObject:SetValue (instance.instance_button_anchor[2]) ---------------------------------------------------------------- @@ -2801,107 +3282,115 @@ end local autoswitch = instance.auto_switch_to if (autoswitch) then if (autoswitch [1] == "raid") then - _G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (autoswitch[2]) - --print (autoswitch[2]) - --[[ - for index, ptable in _ipairs (_detalhes.RaidTables.Menu) do - GameCooltip:AddMenu (1, _detalhes.RaidTables.switch, index, nil, nil, ptable [1], ptable [2], true) - if (ptable[1] == autoswitch [2]) then - - break - end - end - --]] + _G.DetailsOptionsWindow2AutoSwitchDropdown.MyObject:Select (autoswitch[2]) else - _G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (autoswitch[3]+1, true) + _G.DetailsOptionsWindow2AutoSwitchDropdown.MyObject:Select (autoswitch[3]+1, true) end else - _G.DetailsOptionsWindow1AutoSwitchDropdown.MyObject:Select (1, true) + _G.DetailsOptionsWindow2AutoSwitchDropdown.MyObject:Select (1, true) end --resetTextColor - _G.DetailsOptionsWindow2ResetTextFontDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2ResetTextSizeSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2ResetAlwaysSmallSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow8ResetTextFontDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow8ResetTextSizeSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow8ResetAlwaysSmallSlider.MyObject:SetFixedParameter (instance) --resetOverlayColorLabel --instanceTextColorLabel - _G.DetailsOptionsWindow2InstanceTextFontDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2InstanceTextSizeSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetFixedParameter (instance) --instanceOverlayColorLabel --closeOverlayColorLabel - _G.DetailsOptionsWindow2SkinDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SkinDropdown.MyObject:Select (instance.skin) - _G.DetailsOptionsWindow2TextureDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2RowBackgroundTextureDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2TextureDropdown.MyObject:Select (instance.row_info.texture) - _G.DetailsOptionsWindow2RowBackgroundTextureDropdown.MyObject:Select (instance.row_info.texture_background) - _G.DetailsOptionsWindow2RowBackgroundColor.MyObject:SetTexture (unpack (instance.row_info.fixed_texture_background_color)) + _G.DetailsOptionsWindow3SkinDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow3SkinDropdown.MyObject:Select (instance.skin) + _G.DetailsOptionsWindow4TextureDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4RowBackgroundTextureDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4TextureDropdown.MyObject:Select (instance.row_info.texture) + _G.DetailsOptionsWindow4RowBackgroundTextureDropdown.MyObject:Select (instance.row_info.texture_background) + _G.DetailsOptionsWindow4RowBackgroundColor.MyObject:SetTexture (unpack (instance.row_info.fixed_texture_background_color)) - _G.DetailsOptionsWindow2BackgroundClassColorSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BackgroundClassColorSlider.MyObject:SetValue (instance.row_info.texture_background_class_color) + _G.DetailsOptionsWindow4BackgroundClassColorSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4BackgroundClassColorSlider.MyObject:SetValue (instance.row_info.texture_background_class_color) - _G.DetailsOptionsWindow2FontDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2FontDropdown.MyObject:Select (instance.row_info.font_face) + _G.DetailsOptionsWindow5FontDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5FontDropdown.MyObject:Select (instance.row_info.font_face) -- - _G.DetailsOptionsWindow2SliderRowHeight.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SliderRowHeight.MyObject:SetValue (instance.row_info.height) + _G.DetailsOptionsWindow4SliderRowHeight.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4SliderRowHeight.MyObject:SetValue (instance.row_info.height) -- - _G.DetailsOptionsWindow2SliderFontSize.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SliderFontSize.MyObject:SetValue (instance.row_info.font_size) + _G.DetailsOptionsWindow5SliderFontSize.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5SliderFontSize.MyObject:SetValue (instance.row_info.font_size) -- _G.DetailsOptionsWindow2AutoCurrentSlider.MyObject:SetFixedParameter (instance) _G.DetailsOptionsWindow2AutoCurrentSlider.MyObject:SetValue (instance.auto_current) -- - _G.DetailsOptionsWindow2ClassColorSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2ClassColorSlider.MyObject:SetValue (instance.row_info.texture_class_colors) + _G.DetailsOptionsWindow4ClassColorSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4ClassColorSlider.MyObject:SetValue (instance.row_info.texture_class_colors) - _G.DetailsOptionsWindow2UseClassColorsLeftTextSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2UseClassColorsLeftTextSlider.MyObject:SetValue (instance.row_info.textL_class_colors) - _G.DetailsOptionsWindow2UseClassColorsRightTextSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2UseClassColorsRightTextSlider.MyObject:SetValue (instance.row_info.textR_class_colors) + _G.DetailsOptionsWindow5UseClassColorsLeftTextSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5UseClassColorsLeftTextSlider.MyObject:SetValue (instance.row_info.textL_class_colors) + _G.DetailsOptionsWindow5UseClassColorsRightTextSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5UseClassColorsRightTextSlider.MyObject:SetValue (instance.row_info.textR_class_colors) - _G.DetailsOptionsWindow2TextLeftOutlineSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2TextLeftOutlineSlider.MyObject:SetValue (instance.row_info.textL_outline) - _G.DetailsOptionsWindow2TextRightOutlineSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2TextRightOutlineSlider.MyObject:SetValue (instance.row_info.textR_outline) + _G.DetailsOptionsWindow5TextLeftOutlineSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5TextLeftOutlineSlider.MyObject:SetValue (instance.row_info.textL_outline) + _G.DetailsOptionsWindow5TextRightOutlineSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow5TextRightOutlineSlider.MyObject:SetValue (instance.row_info.textR_outline) -- - _G.DetailsOptionsWindow2AlphaSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2AlphaSlider.MyObject:SetValue (instance.bg_alpha) + _G.DetailsOptionsWindow4RowAlphaSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow4RowAlphaSlider.MyObject:SetValue (instance.row_info.alpha) + + _G.DetailsOptionsWindow6AlphaSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow6AlphaSlider.MyObject:SetValue (instance.bg_alpha) -- - _G.DetailsOptionsWindow2UseBackgroundSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BackgroundDropdown2.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2AnchorDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:Select (instance.wallpaper.texture) + _G.DetailsOptionsWindow9UseBackgroundSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow9AnchorDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Select (instance.wallpaper.texture) if (instance.wallpaper.enabled) then - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:Enable() - _G.DetailsOptionsWindow2BackgroundDropdown2.MyObject:Enable() - _G.DetailsOptionsWindow2UseBackgroundSlider.MyObject:SetValue (2) + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Enable() + _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Enable() + _G.DetailsOptionsWindow9UseBackgroundSlider.MyObject:SetValue (2) else - _G.DetailsOptionsWindow2BackgroundDropdown.MyObject:Disable() - _G.DetailsOptionsWindow2BackgroundDropdown2.MyObject:Disable() - _G.DetailsOptionsWindow2UseBackgroundSlider.MyObject:SetValue (1) + _G.DetailsOptionsWindow9BackgroundDropdown.MyObject:Disable() + _G.DetailsOptionsWindow9BackgroundDropdown2.MyObject:Disable() + _G.DetailsOptionsWindow9UseBackgroundSlider.MyObject:SetValue (1) end - _G.DetailsOptionsWindow2InstanceColorTexture.MyObject:SetTexture (unpack (instance.color)) - _G.DetailsOptionsWindow2BackgroundColorTexture.MyObject:SetTexture (instance.bg_r, instance.bg_g, instance.bg_b) - _G.DetailsOptionsWindow2FixedRowColorTexture.MyObject:SetTexture (unpack (instance.row_info.fixed_texture_color)) - _G.DetailsOptionsWindow2FixedRowColorTTexture.MyObject:SetTexture (unpack (instance.row_info.fixed_text_color)) - - GameCooltip:SetFixedParameter (_G.DetailsOptionsWindow2LoadStyleButton, instance) + _G.DetailsOptionsWindow6InstanceColorTexture.MyObject:SetTexture (unpack (instance.color)) + _G.DetailsOptionsWindow6BackgroundColorTexture.MyObject:SetTexture (instance.bg_r, instance.bg_g, instance.bg_b) + _G.DetailsOptionsWindow4FixedRowColorTexture.MyObject:SetTexture (unpack (instance.row_info.fixed_texture_color)) + _G.DetailsOptionsWindow5FixedRowColorTTexture.MyObject:SetTexture (unpack (instance.row_info.fixed_text_color)) _G.DetailsOptionsWindow1NicknameEntry.MyObject.text = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true) - _G.DetailsOptionsWindow1TTDropdown.MyObject:Select (_detalhes.time_type, true) + _G.DetailsOptionsWindow2TTDropdown.MyObject:Select (_detalhes.time_type, true) _G.DetailsOptionsWindow.MyObject.instance = instance _G.DetailsOptionsWindowInstanceSelectDropdown.MyObject:Select (instance.meu_id, true) + _G.DetailsOptionsWindow4IconFileEntry:SetText (instance.row_info.icon_file) + window:Show() + + local avatar = NickTag:GetNicknameAvatar (UnitGUID ("player"), NICKTAG_DEFAULT_AVATAR, true) + local background, cords, color = NickTag:GetNicknameBackground (UnitGUID ("player"), NICKTAG_DEFAULT_BACKGROUND, NICKTAG_DEFAULT_BACKGROUND_CORDS, {1, 1, 1, 1}, true) + _G.DetailsOptionsWindow1AvatarPreviewTexture.MyObject.texture = avatar + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texture = background + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject.texcoord = cords + _G.DetailsOptionsWindow1AvatarPreviewTexture2.MyObject:SetVertexColor (unpack (color)) + + local nick = _detalhes:GetNickname (UnitGUID ("player"), UnitName ("player"), true) + _G.DetailsOptionsWindow1AvatarNicknameLabel:SetText (nick) + + if (window.update_wallpaper_info) then + window:update_wallpaper_info() + end + end diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 55b8515a..cf5770dc 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -59,11 +59,16 @@ end local DEFAULT_SKIN = [[Interface\AddOns\Details\images\skins\default_skin]] - local COORDS_LEFT_BALL = {0.15673828125, 0.27978515625, 0.08251953125, 0.20556640625} -- 160 84 287 211 (updated) + --local COORDS_LEFT_BALL = {0.15673828125, 0.27978515625, 0.08251953125, 0.20556640625} -- 160 84 287 211 (updated) + --160 84 287 211 + local COORDS_LEFT_BALL = {0.15576171875, 0.27978515625, 0.08251953125, 0.20556640625} -- 160 84 287 211 (updated) + local COORDS_LEFT_CONNECTOR = {0.29541015625, 0.30126953125, 0.08251953125, 0.20556640625} --302 84 309 211 (updated) local COORDS_LEFT_CONNECTOR_NO_ICON = {0.58837890625, 0.59423828125, 0.08251953125, 0.20556640625} -- 602 84 609 211 (updated) local COORDS_TOP_BACKGROUND = {0.15673828125, 0.65478515625, 0.22314453125, 0.34619140625} -- 160 228 671 355 (updated) - local COORDS_RIGHT_BALL = {0.31591796875, 0.43994140625, 0.08251953125, 0.20556640625} --324 84 451 211 (updated) + + --local COORDS_RIGHT_BALL = {0.31591796875, 0.43994140625, 0.08251953125, 0.20556640625} --324 84 451 211 (updated) + local COORDS_RIGHT_BALL = {0.3154296875+0.00048828125, 0.439453125+0.00048828125, 0.08203125, 0.2060546875-0.00048828125} --323 84 450 211 (updated) --local COORDS_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated) local COORDS_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated) 588 212 @@ -74,8 +79,8 @@ end --784 2 847 513 --local COORDS_RIGHT_SIDE_BAR = {0.70068359375, 0.76220703125, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated) - local COORDS_RIGHT_SIDE_BAR = {0.7001953125, 0.763671875, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated) - --717 2 782 515 + --local COORDS_RIGHT_SIDE_BAR = {0.7001953125, 0.763671875, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated) + local COORDS_RIGHT_SIDE_BAR = {0.7001953125+0.00048828125, 0.76171875, 0.001953125, 0.5009765625} -- --717 2 780 513 local COORDS_BOTTOM_SIDE_BAR = {0.32861328125, 0.82666015625, 0.50537109375, 0.56494140625} -- 336 517 847 579 (updated) @@ -2080,7 +2085,7 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) gump:CriaRodape (baseframe, instancia) -- left and right side bars ------------------------------------------------------------------------------------------------------------------------------------------------------------ - -- ~barra + -- ~barra ~bordas ~border --> left baseframe.barra_esquerda = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork") baseframe.barra_esquerda:SetTexture (DEFAULT_SKIN) @@ -2409,7 +2414,17 @@ function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, self:InstanceRefreshRows() end -function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor) +function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor, alpha, iconfile) + + --> icon file + if (iconfile) then + self.row_info.icon_file = iconfile + end + + --> alpha + if (alpha) then + self.row_info.alpha = alpha + end --> height if (height) then @@ -2491,7 +2506,10 @@ function _detalhes:InstanceRefreshRows (instancia) end local height = self.row_info.height - + + --alpha + local alpha = self.row_info.alpha + -- do it for _, row in _ipairs (self.barras) do @@ -2529,7 +2547,10 @@ function _detalhes:InstanceRefreshRows (instancia) --> texture class color: if true color changes on the fly through class refresh if (not texture_class_color) then - row.textura:SetVertexColor (texture_r, texture_g, texture_b) + row.textura:SetVertexColor (texture_r, texture_g, texture_b, alpha) + else + local r, g, b = row.textura:GetVertexColor() + row.textura:SetVertexColor (r, g, b, alpha) end --> text class color: if true color changes on the fly through class refresh @@ -3585,9 +3606,19 @@ function _detalhes:ChangeSkin (skin_name) --> overwrites local overwrite_cprops = this_skin.instance_cprops if (overwrite_cprops) then - for cprop, value in _pairs (overwrite_cprops) do - self [cprop] = value + + local copy = table_deepcopy (overwrite_cprops) + + for cprop, value in _pairs (copy) do + if (type (value) == "table") then + for cprop2, value2 in _pairs (value) do + self [cprop] [cprop2] = value2 + end + else + self [cprop] = value + end end + end --> reset instance button @@ -3784,6 +3815,7 @@ function _detalhes:ChangeSkin (skin_name) end ----------> call widgets handlers + self:SetBarSettings (self.row_info.height) --> refresh instance button self:SetInstanceButtonSettings() @@ -3819,6 +3851,8 @@ function _detalhes:ChangeSkin (skin_name) --> update wallpaper if (self.wallpaper.enabled) then self:InstanceWallpaper (true) + else + self:InstanceWallpaper (false) end --> update instance color @@ -3829,6 +3863,9 @@ function _detalhes:ChangeSkin (skin_name) --> refresh all bars self:InstanceRefreshRows() + --> update menu saturation + self:DesaturateMenu() + --> refresh options panel if opened if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then _detalhes:OpenOptionsWindow (self) @@ -4100,6 +4137,7 @@ function _detalhes:DesaturateMenu (value) end if (value) then + self.desaturated_menu = true self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated (true) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (true) @@ -4113,6 +4151,7 @@ function _detalhes:DesaturateMenu (value) end else + self.desaturated_menu = false self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated (false) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (false) @@ -4139,9 +4178,15 @@ function _detalhes:ShowSideBars (instancia) self.baseframe.barra_direita:Show() --> set default spacings - self.row_info.space.left = 3 - self.row_info.space.right = -5 - + local this_skin = _detalhes.skins [self.skin] + if (this_skin.instance_cprops and this_skin.instance_cprops.row_info and this_skin.instance_cprops.row_info.space) then + self.row_info.space.left = this_skin.instance_cprops.row_info.space.left + self.row_info.space.right = this_skin.instance_cprops.row_info.space.right + else + self.row_info.space.left = 3 + self.row_info.space.right = -5 + end + if (self.show_statusbar) then self.baseframe.barra_esquerda:SetPoint ("bottomleft", self.baseframe, "bottomleft", -56, -14) self.baseframe.barra_direita:SetPoint ("bottomright", self.baseframe, "bottomright", 56, -14) diff --git a/images/classes_small_alpha.tga b/images/classes_small_alpha.tga new file mode 100644 index 00000000..0b35a995 Binary files /dev/null and b/images/classes_small_alpha.tga differ diff --git a/images/options_window.tga b/images/options_window.tga index a2ffe23b..fe2a9712 100644 Binary files a/images/options_window.tga and b/images/options_window.tga differ diff --git a/images/skins/elvui.tga b/images/skins/elvui.tga new file mode 100644 index 00000000..b7cb4dbd Binary files /dev/null and b/images/skins/elvui.tga differ diff --git a/locales/Details-enUS.lua b/locales/Details-enUS.lua index 96f38353..41ce7ff9 100644 --- a/locales/Details-enUS.lua +++ b/locales/Details-enUS.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning.\n\n|cFFFFFF00-|r fixed sub menu overlap when near right screen edge.\n\n|cFFFFFF00-|r fixed close button position for default skin.\n\n|cFFFFFF00-|r fixed skin error when selecting solo or right plugins.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Fixed minimap icon stuck problem.\n\n|cFFFFFF00-|r Skin support has been rewrite and now is more flexibe.\n\n|cFFFFFF00-|r Added up to 20 new customization options over options panel.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Added slash command 'details reinstall' which cleans Details! config in case of erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Added new skin: Simple Gray.\n\n|cFFFFFF00-|r Added minimap and interface addon panel buttons.\n\n|cFFFFFF00-|r Added new tutorials bubbles for basic aspects of Details! window.\n\n|cFFFFFF00-|r Fixed a issue with Panic Mode where sometimes his isnt triggered." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Added new skin: Minimalistic, a very clean one.\n\n|cFFFFFF00-|r Added a new tab called avoidance on Player Details window for tanks.\n\n|cFFFFFF00-|r Added Copy & Paste option on report window. Now you can share your dps on twitter and facebook!\n\n|cFFFFFF00-|r Added a new option for auto switch what a window shows when you enter in a combat.\n\n|cFFFFFF00-|r Fixed issue with window background alpha which was changing the value everytime the options window is opened.\n\n|cFFFFFF00-|r Fixed the gap between the bar and the window background when disabling borders.\n\n|cFFFFFF00-|r Make some improvements on Tiny Threat plugin.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Fixed more known issues with skins.\n\n|cFFFFFF00-|r Fixed an issue where plugin icons wasn't hiding after close all windows.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Fixed bugs where Details! stop working if no plugin is actived on Wow addon panel.\n\n|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Added an option for abbreviate Dps and Hps.\n\n|cFFFFFF00-|r Fixed issue where the window icon fade away when reopening the window.\n\n|cFFFFFF00-|r Improvements in class recognition.\n\n|cFFFFFF00-|r Added follow spells as defensive cooldowns:\nHealing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r More improvements done in Encounter Details plugin.\n\n|cFFFFFF00-|r Improvements made in the downloadable plugins: Timeline and Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Fixed a issue with overall data Dps when have only one segment.\n\n|cFFFFFF00-|r Changed colors and added some backgrounds for menus.\n\n|cFFFFFF00-|r Options panel has his height size increased.\n\n|cFFFFFF00-|r Added options for hide the window or change the transparency when in combat.\n\n|cFFFFFF00-|r Added a control panel for plugins, where you can enable or disable then.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|r More fixes on Skins support and new tools for plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Minor bug fixes and improvements on Welcome Screen.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r The bar now starts after the icon instead of left window border.\n\n|cFFFFFF00-|r Welcome window now is localizated to others languages\n\n|cFFFFFF00-|r Fixed issue with Damage Rank Plugin.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r fixed issue with main window icon when no plugin installed. \n\n|cFFFFFF00-|r fixed issue with some options button text which where out of positioning." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails:|r " --> color and details name @@ -285,7 +285,10 @@ if not Loc then return end Loc ["STRING_PLUGINOPTIONS_TEXTALIGN_X"] = "Text Align X" Loc ["STRING_PLUGINOPTIONS_TEXTALIGN_Y"] = "Text Align Y" + Loc ["STRING_OPTIONS_COLORANDALPHA"] = "Color & Alpha" + Loc ["STRING_OPTIONS_COLORFIXED"] = "Fixed Color" Loc ["STRING_OPTIONS_COLOR"] = "Color" + Loc ["STRING_OPTIONS_SIZE"] = "Size" Loc ["STRING_OPTIONS_ANCHOR"] = "Side" @@ -385,12 +388,15 @@ if not Loc then return end -- OPTIONS PANEL ----------------------------------------------------------------------------------------------------------------- + Loc ["STRING_OPTIONS_COMBATTWEEKS"] = "Combat Tweeks" + Loc ["STRING_OPTIONS_COMBATTWEEKS_DESC"] = "Behavioral adjustments on how Details! deal with some combat aspects." + Loc ["STRING_OPTIONS_SWITCHINFO"] = "|cFFF79F81 LEFT DISABLED|r |cFF81BEF7 RIGHT ENABLED|r" Loc ["STRING_OPTIONS_PICKCOLOR"] = "color" Loc ["STRING_OPTIONS_EDITIMAGE"] = "Edit Image" - Loc ["STRING_OPTIONS_PRESETTOOLD"] = "This preset requires a newer version of Details!." + Loc ["STRING_OPTIONS_PRESETTOOLD"] = "This preset is too old and cannot be loaded at this version of Details!." Loc ["STRING_OPTIONS_PRESETNONAME"] = "Give a name to your preset." Loc ["STRING_OPTIONS_EDITINSTANCE"] = "Editing Instance:" @@ -406,21 +412,21 @@ if not Loc then return end Loc ["STRING_OPTIONS_AVATAR"] = "Choose Avatar" Loc ["STRING_OPTIONS_AVATAR_DESC"] = "Your avatar is also broadcasted for your guild mates and Details! show it on the top of tooltips when you mouse over a bar." Loc ["STRING_OPTIONS_REALMNAME"] = "Remove Realm Name" - Loc ["STRING_OPTIONS_REALMNAME_DESC"] = "When enabled, the realm name of character isn't displayed with his name.\n\n|cFFFFFFFFExample:|r\n\nCharles-Netherwing |cFFFFFFFF(disabled)|r\nCharles |cFFFFFFFF(enabled)|r" + Loc ["STRING_OPTIONS_REALMNAME_DESC"] = "When enabled, the realm name of character isn't displayed with his name.\n\n|cFFFFFF00Example:|r\n\nCharles-Netherwing |cFFFFFF00(disabled)|r\nCharles |cFFFFFF00(enabled)|r" Loc ["STRING_OPTIONS_MAXSEGMENTS"] = "Max. Segments" - Loc ["STRING_OPTIONS_MAXSEGMENTS_DESC"] = "This option control how many segments you want to maintain.\n\nRecommended value is |cFFFFFFFF12|r, but feel free to adjust this number to be comfortable for you.\n\nComputers with |cFFFFFFFF2GB|r or less memory ram should keep low segments amount, this can help your system overall." + Loc ["STRING_OPTIONS_MAXSEGMENTS_DESC"] = "This option control how many segments you want to maintain.\n\nRecommended value is |cFFFFFF0012|r, but feel free to adjust this number to be comfortable for you.\n\nComputers with |cFFFFFF002GB|r or less memory ram should keep low segments amount, this can help your system overall." Loc ["STRING_OPTIONS_SCROLLBAR"] = "Scroll Bar" - Loc ["STRING_OPTIONS_SCROLLBAR_DESC"] = "Enable ou Disable the scroll bar.\n\nBy default, Details! scroll bars are replaced by a mechanism that stretches the window.\n\nThe |cFFFFFFFFstretch handle|r is outside over instances button/menu (left of close button)." + Loc ["STRING_OPTIONS_SCROLLBAR_DESC"] = "Enable ou Disable the scroll bar.\n\nBy default, Details! scroll bars are replaced by a mechanism that stretches the window.\n\nThe |cFFFFFF00stretch handle|r is outside over instances button/menu (left of close button)." Loc ["STRING_OPTIONS_MAXINSTANCES"] = "Max. Instances" - Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limit the number of Details! instances which can be created.\n\nYou can open and re-open instances clicking on the instance button |cFFFFFFFF#X|r." + Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limit the number of Details! instances which can be created.\n\nYou can open and re-open instances clicking on the instance button |cFFFFFF00#X|r." Loc ["STRING_OPTIONS_PVPFRAGS"] = "Only Pvp Frags" Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] = "When enabled, only kills against enemy players will be count." Loc ["STRING_OPTIONS_MINIMAP"] = "Minimap Icon" Loc ["STRING_OPTIONS_MINIMAP_DESC"] = "Show or Hide minimap icon." Loc ["STRING_OPTIONS_TIMEMEASURE"] = "Time Measure" - Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] = "|cFFFFFFFFActivity|r: the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed, common way of measure Dps and Hps.\n\n|cFFFFFFFFEffective|r: used on rankings, this method uses the elapsed combat time for measure the Dps and Hps of all raid members." + Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] = "|cFFFFFF00Activity|r: the timer of each raid member is put on hold if his activity is ceased and back again to count when is resumed, common way of measure Dps and Hps.\n\n|cFFFFFF00Effective|r: used on rankings, this method uses the elapsed combat time for measure the Dps and Hps of all raid members." Loc ["STRING_OPTIONS_HIDECOMBAT"] = "Hide On Combat" Loc ["STRING_OPTIONS_HIDECOMBAT_DESC"] = "If enabled, this instance window is hidden when you enter in combat." Loc ["STRING_OPTIONS_HIDECOMBATALPHA"] = "Transparency" @@ -428,7 +434,7 @@ if not Loc then return end Loc ["STRING_OPTIONS_AUTO_SWITCH"] = "Auto Switch" Loc ["STRING_OPTIONS_AUTO_SWITCH_DESC"] = "When you enter in combat, this window change for the selected attribute or plugin.\n\nLeaving the combat, it switch back." Loc ["STRING_OPTIONS_PS_ABBREVIATE"] = "PS Abbreviation" - Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Choose the abbreviation method for Dps and Hps.\n\n|cFFFFFFFFNone|r: no abbreviation, the raw number is shown.\n\n|cFFFFFFFFHundreds I|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100.0K\n19.530.000 = 19.53M\n\n|cFFFFFFFFHundreds II|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100K\n19.530.000 = 19.53M" + Loc ["STRING_OPTIONS_PS_ABBREVIATE_DESC"] = "Choose the abbreviation method for Dps and Hps.\n\n|cFFFFFF00None|r: no abbreviation, the raw number is shown.\n\n|cFFFFFF00Hundreds I|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100.0K\n19.530.000 = 19.53M\n\n|cFFFFFF00Hundreds II|r: the number is reduced with a letter representing his value.\n\n59874 = 59.8K\n100.000 = 100K\n19.530.000 = 19.53M" Loc ["STRING_OPTIONS_PS_ABBREVIATE_NONE"] = "None" Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK"] = "Hundrets I" Loc ["STRING_OPTIONS_PS_ABBREVIATE_TOK2"] = "Hundrets II" @@ -437,10 +443,10 @@ if not Loc then return end Loc ["STRING_OPTIONS_PERFORMANCE1_DESC"] = "This options can help save some cpu usage." Loc ["STRING_OPTIONS_MEMORYT"] = "Memory Threshold" - Loc ["STRING_OPTIONS_MEMORYT_DESC"] = "Details! have internal mechanisms to handle memory and try adjust it self within the amount of memory avaliable on your system.\n\nAlso is recommeded keep the amount of segments low on systems with |cFFFFFFFF2GB|r or less of memory." + Loc ["STRING_OPTIONS_MEMORYT_DESC"] = "Details! have internal mechanisms to handle memory and try adjust it self within the amount of memory avaliable on your system.\n\nAlso is recommeded keep the amount of segments low on systems with |cFFFFFF002GB|r or less of memory." Loc ["STRING_OPTIONS_SEGMENTSSAVE"] = "Segments Saved" - Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"] = "This options controls how many segments you wish save between game sesions.\n\nHigh values can make your character logoff take more time\n\nIf you rarelly use the data of last day, it`s high recommeded leave this option in |cFFFFFFFF1|r." + Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"] = "This options controls how many segments you wish save between game sesions.\n\nHigh values can make your character logoff take more time\n\nIf you rarelly use the data of last day, it`s high recommeded leave this option in |cFFFFFF001|r." Loc ["STRING_OPTIONS_PANIMODE"] = "Panic Mode" Loc ["STRING_OPTIONS_PANIMODE_DESC"] = "When enabled and you got dropped from the game (by a disconnect, for instance) and you are fighting against a boss encounter, all segments are erased, this make your logoff process faster." @@ -452,7 +458,7 @@ if not Loc then return end Loc ["STRING_OPTIONS_ANIMATESCROLL_DESC"] = "When enabled, scrollbar uses a animation when showing up or hiding." Loc ["STRING_OPTIONS_WINDOWSPEED"] = "Update Speed" - Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] = "Seconds between each update on instances (opened windows).\n\n|cFFFFFFFF0.3|r: update about 3 times each second.\n\n|cFFFFFFFF3.0|r: update once every 3 seconds." + Loc ["STRING_OPTIONS_WINDOWSPEED_DESC"] = "Seconds between each update on instances (opened windows).\n\n|cFFFFFF000.3|r: update about 3 times each second.\n\n|cFFFFFF003.0|r: update once every 3 seconds." Loc ["STRING_OPTIONS_CLEANUP"] = "Auto Erase Cleanup Segments" Loc ["STRING_OPTIONS_CLEANUP_DESC"] = "Segments with trash mobs' are considered clean up segments.\n\nThis option enable the auto erase of this segments when possible." @@ -467,11 +473,11 @@ if not Loc then return end Loc ["STRING_OPTIONS_CMISC"] = "Collect Misc" Loc ["STRING_OPTIONS_CAURAS"] = "Collect Auras" - Loc ["STRING_OPTIONS_CDAMAGE_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFDamage Done|r\n- |cFFFFFFFFDamage Per Second|r\n- |cFFFFFFFFFriendly Fire|r\n- |cFFFFFFFFDamage Taken|r" - Loc ["STRING_OPTIONS_CHEAL_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFHealing Done|r\n- |cFFFFFFFFAbsorbs|r\n- |cFFFFFFFFHealing Per Second|r\n- |cFFFFFFFFOverhealing|r\n- |cFFFFFFFFHealing Taken|r\n- |cFFFFFFFFEnemy Healed|r\n- |cFFFFFFFFDamage Prevented|r" - Loc ["STRING_OPTIONS_CENERGY_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFMana Restored|r\n- |cFFFFFFFFRage Generated|r\n- |cFFFFFFFFEnergy Generated|r\n- |cFFFFFFFFRunic Power Generated|r" - Loc ["STRING_OPTIONS_CMISC_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFCrowd Control Break|r\n- |cFFFFFFFFDispells|r\n- |cFFFFFFFFInterrupts|r\n- |cFFFFFFFFResurrection|r\n- |cFFFFFFFFDeaths|r" - Loc ["STRING_OPTIONS_CAURAS_DESC"] = "Enable capture of:\n\n- |cFFFFFFFFBuffs Uptime|r\n- |cFFFFFFFFDebuffs Uptime|r\n- |cFFFFFFFFVoid Zones|r\n-|cFFFFFFFF Cooldowns|r" + Loc ["STRING_OPTIONS_CDAMAGE_DESC"] = "Enable capture of:\n\n- |cFFFFFF00Damage Done|r\n- |cFFFFFF00Damage Per Second|r\n- |cFFFFFF00Friendly Fire|r\n- |cFFFFFF00Damage Taken|r" + Loc ["STRING_OPTIONS_CHEAL_DESC"] = "Enable capture of:\n\n- |cFFFFFF00Healing Done|r\n- |cFFFFFF00Absorbs|r\n- |cFFFFFF00Healing Per Second|r\n- |cFFFFFF00Overhealing|r\n- |cFFFFFF00Healing Taken|r\n- |cFFFFFF00Enemy Healed|r\n- |cFFFFFF00Damage Prevented|r" + Loc ["STRING_OPTIONS_CENERGY_DESC"] = "Enable capture of:\n\n- |cFFFFFF00Mana Restored|r\n- |cFFFFFF00Rage Generated|r\n- |cFFFFFF00Energy Generated|r\n- |cFFFFFF00Runic Power Generated|r" + Loc ["STRING_OPTIONS_CMISC_DESC"] = "Enable capture of:\n\n- |cFFFFFF00Crowd Control Break|r\n- |cFFFFFF00Dispells|r\n- |cFFFFFF00Interrupts|r\n- |cFFFFFF00Resurrection|r\n- |cFFFFFF00Deaths|r" + Loc ["STRING_OPTIONS_CAURAS_DESC"] = "Enable capture of:\n\n- |cFFFFFF00Buffs Uptime|r\n- |cFFFFFF00Debuffs Uptime|r\n- |cFFFFFF00Void Zones|r\n-|cFFFFFF00 Cooldowns|r" Loc ["STRING_OPTIONS_CLOUD"] = "Cloud Capture" Loc ["STRING_OPTIONS_CLOUD_DESC"] = "When enabled, the data of disabled collectors are collected within others raid members." @@ -482,11 +488,12 @@ if not Loc then return end Loc ["STRING_OPTIONS_BAR_TEXTURE"] = "Texture" Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] = "Choose the texture of bars." - Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Texture (bg)" + Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Texture" Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] = "Choose the background texture of bars." Loc ["STRING_OPTIONS_BAR_BCOLOR"] = "Background Color" Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] = "Choose the background color of bars." + Loc ["STRING_OPTIONS_BAR_COLOR_DESC"] = "Choose the color of bars." Loc ["STRING_OPTIONS_BAR_HEIGHT"] = "Height" Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] = "Change the height of bars." @@ -494,8 +501,11 @@ if not Loc then return end Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"] = "Color By Class" Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] = "When enabled, the instance bars have the color of the character class.\n\nIf disabled, the color chosen on the right box will be used." - Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Color By Class (bg)" + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Color By Class" Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "When enabled, the instance bars background have the color of the character class.\n\nIf disabled, the color chosen on the right box will be used." + + Loc ["STRING_OPTIONS_BAR_ICONFILE"] = "Icon File" + Loc ["STRING_OPTIONS_BAR_ICONFILE_DESC"] = "This option load a image responsable for the class icons in each row.\nThe image file need to be a .tga file with alpha channel.\n\nDetails! have three image icon files:\n\n- |cFFFFFF00classes|r\n- |cFFFFFF00classes_small|r\n- |cFFFFFF00classes_small_alpha|r\n\nAlso there is files inside wow which can be used:\n\n- |cFFFFFF00Interface\\ARENAENEMYFRAME\\UI-CLASSES-CIRCLES|r\n- |cFFFFFF00Interface\\Glues\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES|r" -- Loc ["STRING_OPTIONS_TEXT"] = "Bar Text Settings" Loc ["STRING_OPTIONS_TEXT_DESC"] = "This options control the appearance of the instance bar texts." @@ -521,7 +531,7 @@ if not Loc then return end Loc ["STRING_OPTIONS_INSTANCE"] = "Instance Settings" Loc ["STRING_OPTIONS_INSTANCE_DESC"] = "This options control the appearance of the instance it self." - Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Color and Transparency" + Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Window Color" Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color and alpha of instance window." Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Background Alpha" @@ -538,6 +548,13 @@ if not Loc then return end Loc ["STRING_OPTIONS_SHOW_STATUSBAR"] = "Show Statusbar" Loc ["STRING_OPTIONS_SHOW_STATUSBAR_DESC"] = "Show or hide the bottom statusbar." + Loc ["STRING_OPTIONS_SHOW_TOTALBAR"] = "Show Total Bar" + Loc ["STRING_OPTIONS_SHOW_TOTALBAR_DESC"] = "Show or hide the total bar." + Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP"] = "Only in Group" + Loc ["STRING_OPTIONS_SHOW_TOTALBAR_INGROUP_DESC"] = "Total bar aren't shown if you isn't in a group." + Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON"] = "Icon" + Loc ["STRING_OPTIONS_SHOW_TOTALBAR_ICON_DESC"] = "Select the icon shown on the total bar." + Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Skin" Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify window appearance based on a skin theme." @@ -546,6 +563,8 @@ Loc ["STRING_OPTIONS_SKIN_A_DESC"] = "This options allows you to change the skin Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS"] = "Toolbar Settings" Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS_DESC"] = "This options change the main menu on the top of the window." +Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS"] = "Toolbar Button Settings" +Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS_DESC"] = "This options change the reset, instance and close buttons from the toolbar menu on the top of the window." Loc ["STRING_OPTIONS_DESATURATE_MENU"] = "Desaturate Menu" Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"] = "Enabling this option, all menu icons on toolbar became black and white." @@ -559,34 +578,38 @@ Loc ["STRING_OPTIONS_MENU_X_DESC"] = "Slightly move the main menu on tooltip to Loc ["STRING_OPTIONS_MENU_Y"] = "Menu Pos Y" Loc ["STRING_OPTIONS_MENU_Y_DESC"] = "Slightly move the main menu on tooltip to the up or down direction." -Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"] = "Reset Text Color" +Loc ["STRING_OPTIONS_INSTANCE_BUTTON_ANCHOR"] = "Instance Button:" +Loc ["STRING_OPTIONS_RESET_BUTTON_ANCHOR"] = "Reset Button:" +Loc ["STRING_OPTIONS_CLOSE_BUTTON_ANCHOR"] = "Close Button:" + +Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"] = "Text Color" Loc ["STRING_OPTIONS_RESET_TEXTCOLOR_DESC"] = "Modify the reset button text color.\n\nOnly applied when reset button is hosted by this instance." -Loc ["STRING_OPTIONS_RESET_TEXTFONT"] = "Reset Text Font" +Loc ["STRING_OPTIONS_RESET_TEXTFONT"] = "Text Font" Loc ["STRING_OPTIONS_RESET_TEXTFONT_DESC"] = "Modify the reset button text font.\n\nOnly applied when reset button is hosted by this instance." -Loc ["STRING_OPTIONS_RESET_TEXTSIZE"] = "Reset Text Size" +Loc ["STRING_OPTIONS_RESET_TEXTSIZE"] = "Text Size" Loc ["STRING_OPTIONS_RESET_TEXTSIZE_DESC"] = "Modify the reset button text size.\n\nOnly applied when reset button is hosted by this instance." -Loc ["STRING_OPTIONS_RESET_OVERLAY"] = "Reset Overlay Color" +Loc ["STRING_OPTIONS_RESET_OVERLAY"] = "Overlay Color" Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"] = "Modify the reset button overlay color.\n\nOnly applied when reset button is hosted by this instance." -Loc ["STRING_OPTIONS_RESET_SMALL"] = "Reset Always Small" +Loc ["STRING_OPTIONS_RESET_SMALL"] = "Always Small" Loc ["STRING_OPTIONS_RESET_SMALL_DESC"] = "When enabled, reset button always shown as his smaller size.\n\nOnly applied when reset button is hosted by this instance." -Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"] = "Instance Text Color" +Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"] = "Text Color" Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"] = "Change the instance button text color." -Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"] = "Instance Text Font" +Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"] = "Text Font" Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT_DESC"] = "Change the instance button text font." -Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"] = "Instance Text Size" +Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"] = "Text Size" Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"] = "Change the instance button text size." -Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"] = "Instance Overlay Color" +Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"] = "Overlay Color" Loc ["STRING_OPTIONS_INSTANCE_OVERLAY_DESC"] = "Change the instance button overlay color." -Loc ["STRING_OPTIONS_CLOSE_OVERLAY"] = "Close Overlay Color" +Loc ["STRING_OPTIONS_CLOSE_OVERLAY"] = "Overlay Color" Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"] = "Change the close button overlay color." Loc ["STRING_OPTIONS_STRETCH"] = "Stretch Button Anchor" @@ -604,10 +627,10 @@ Loc ["STRING_OPTIONS_INSBUTTON_Y_DESC"] = "Change the instance button position." Loc ["STRING_OPTIONS_TOOLBARSIDE"] = "Toolbar Anchor" Loc ["STRING_OPTIONS_TOOLBARSIDE_DESC"] = "Place the toolbar on the top or bottom side of window." -Loc ["STRING_OPTIONS_BARGROW_DIRECTION"] = "Bar Grow Direction" +Loc ["STRING_OPTIONS_BARGROW_DIRECTION"] = "Grow Direction" Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"] = "Change the bars grow method.." -Loc ["STRING_OPTIONS_BARSORT_DIRECTION"] = "Bar Sort Direction" +Loc ["STRING_OPTIONS_BARSORT_DIRECTION"] = "Sort Direction" Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Change the order which characters are shown within the bars." Loc ["STRING_OPTIONS_WP"] = "Wallpaper Settings" @@ -623,7 +646,7 @@ Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Change the order which characte Loc ["STRING_OPTIONS_WP_GROUP2_DESC"] = "Select the wallpaper, for more, choose a diferent category on the left dropbox." Loc ["STRING_OPTIONS_WP_ALIGN"] = "Align" - Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] = "Select how the wallpaper will align within the window instance.\n\n- |cFFFFFFFFFill|r: auto resize and align with all corners.\n\n- |cFFFFFFFFCenter|r: doesn`t resize and align with the center of the window.\n\n-|cFFFFFFFFStretch|r: auto resize on vertical or horizontal and align with left-right or top-bottom sides.\n\n-|cFFFFFFFFFour Corners|r: align with specified corner, no auto resize is made." + Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] = "Select how the wallpaper will align within the window instance.\n\n- |cFFFFFF00Fill|r: auto resize and align with all corners.\n\n- |cFFFFFF00Center|r: doesn`t resize and align with the center of the window.\n\n-|cFFFFFF00Stretch|r: auto resize on vertical or horizontal and align with left-right or top-bottom sides.\n\n-|cFFFFFF00Four Corners|r: align with specified corner, no auto resize is made." Loc ["STRING_OPTIONS_WP_EDIT"] = "Edit Image" Loc ["STRING_OPTIONS_WP_EDIT_DESC"] = "Open the image editor to change some wallpaper aspects." @@ -631,12 +654,21 @@ Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Change the order which characte Loc ["STRING_OPTIONS_SAVELOAD"] = "Save and Load" Loc ["STRING_OPTIONS_SAVELOAD_DESC"] = "This options allow you to save or load predefined settings." - Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] = "Preset Name" - Loc ["STRING_OPTIONS_SAVELOAD_SAVE"] = "save" - Loc ["STRING_OPTIONS_SAVELOAD_LOAD"] = "load" - Loc ["STRING_OPTIONS_SAVELOAD_REMOVE"] = "x" - Loc ["STRING_OPTIONS_SAVELOAD_RESET"] = "reset to default" - Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"] = "apply to all instances" + Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] = "Custom Skin Name" + Loc ["STRING_OPTIONS_SAVELOAD_SAVE"] = "create" + Loc ["STRING_OPTIONS_SAVELOAD_LOAD"] = "Load Custom Skin" + Loc ["STRING_OPTIONS_SAVELOAD_LOAD_DESC"] = "Choose one of the previous saved skins to apply on the current selected instance." + Loc ["STRING_OPTIONS_SAVELOAD_CREATE_DESC"] = "Type the custom skin name on the field and click on create button.\n\nThis process create a custom skin which you can load on others instances or just save for another time." + Loc ["STRING_OPTIONS_SAVELOAD_REMOVE"] = "Erase Custom Skin" + Loc ["STRING_OPTIONS_SAVELOAD_RESET"] = "Load Default Skin" + Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"] = "Apply in all Instances" + Loc ["STRING_OPTIONS_SAVELOAD_MAKEDEFAULT"] = "Save Standard Skin" + Loc ["STRING_OPTIONS_SAVELOAD_ERASE_DESC"] = "This option erase a previous saved skin." + Loc ["STRING_OPTIONS_SAVELOAD_STDSAVE"] = "Standard Skin has been saved, new instances will be using this skin by default." + Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL"] = "The current skin has been applied in all other instances." + Loc ["STRING_OPTIONS_SAVELOAD_SKINCREATED"] = "Skin created." + Loc ["STRING_OPTIONS_SAVELOAD_STD_DESC"] = "Standard skin is applied on all new instances created." + Loc ["STRING_OPTIONS_SAVELOAD_APPLYALL_DESC"] = "Apply the current skin on all instances created." -- Mini Tutorials ----------------------------------------------------------------------------------------------------------------- @@ -645,4 +677,4 @@ Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Change the order which characte Loc ["STRING_MINITUTORIAL_3"] = "Resize and Lock Buttons:\n\nUse this to change the size of the window.\n\nLocking it, make the window unmovable." Loc ["STRING_MINITUTORIAL_4"] = "Shortcut Panel:\n\nWhen you right click a bar or window background, shortcut panel is shown." Loc ["STRING_MINITUTORIAL_5"] = "Micro Displays:\n\nThese shows important informations.\n\nLeft Click to config.\n\nRight Click to choose other widget." - Loc ["STRING_MINITUTORIAL_6"] = "Snap Windows:\n\nMove a window near other to snap both.\n\nAlways snap with previous instance number, example: #5 snap with #4, #2 snap with #1." \ No newline at end of file + Loc ["STRING_MINITUTORIAL_6"] = "Snap Windows:\n\nMove a window near other to snap both.\n\nAlways snap with previous instance number, example: #5 snap with #4, #2 snap with #1." diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index c452669d..fa9b5a79 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -3,7 +3,7 @@ if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Adicionado nova skin: Minimalistic.\n\n|cFFFFFF00-|r Adicionado nova aba chamada avoidance no painel de detalhes do jogador apenas para tanques.\n\n|cFFFFFF00-|r Adicionado opcao de Copiar e Coloar na janela de criar relatorios. Agora voce pode dizer seu dps aos seus amigos no twitter e facebook!\n\n|cFFFFFF00-|r Adicionada nova opcao de troca o que uma janela esta mostrando quando voce entrar em combate.\n\n|cFFFFFF00-|r Corrigido problema com a transparencia da janela onde ela mudava sozinha sempre que a janela de opcoes eta aberta.\n\n|cFFFFFF00-|r Corrigido o vao em branco que ficava entre o inicio de uma barra e o fundo da janela quando as bordas eram desligadas.\n\n|cFFFFFF00-|r Feito algumas melhorias no plugin Tiny Threat.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Corrigido mais problemas conhecidos com as Skins.\n\n|cFFFFFF00-|r Corrigido problema onde os icones dos plugins nao eram escondidos apos fechar todas as janelas.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Corrigido problemas onde o Details! parava de funcionar se nenhum plugin estiver ligado no painel de addons do Wow.|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais correcoes para as Skins e suporte a novos plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.11.10|r\n\n|cFFFFFF00-|r Accuracy with warcraftlogs.com now is very high and okey with worldoflogs.com. Make sure the option |cFFFFDD00Time Measure|r under General Settings -> Combat is set to |cFFFFDD00Effective Time|r.\n\n|cFFFFFF00-|r Options Window has been revamped, again.\n\n|cFFFFFF00-|r Added a option for change the class icons.\n\n|cFFFFFF00-|r Added options for show Total Bar and configure it.\n\n|cFFFFFF00-|r Added a option for save a Standard Skin, new windows opened use this skin.\n\n|cFFFFFF00-|r Added a new skin: ElvUI Frame Style.\n\n|cFFFFFF00-|r When hover a spell icon under Player Details Window, the spell description is shown.\n\n|cFFFFFF00-|r Pressing Shift key on a spell bar over the Encounter Details Window, shows up the spell description.\n\n|cFFFFFF00v1.11.6|r\n\n|cFFFFFF00-|r Adicionado nova skin: Minimalistic.\n\n|cFFFFFF00-|r Adicionado nova aba chamada avoidance no painel de detalhes do jogador apenas para tanques.\n\n|cFFFFFF00-|r Adicionado opcao de Copiar e Coloar na janela de criar relatorios. Agora voce pode dizer seu dps aos seus amigos no twitter e facebook!\n\n|cFFFFFF00-|r Adicionada nova opcao de troca o que uma janela esta mostrando quando voce entrar em combate.\n\n|cFFFFFF00-|r Corrigido problema com a transparencia da janela onde ela mudava sozinha sempre que a janela de opcoes eta aberta.\n\n|cFFFFFF00-|r Corrigido o vao em branco que ficava entre o inicio de uma barra e o fundo da janela quando as bordas eram desligadas.\n\n|cFFFFFF00-|r Feito algumas melhorias no plugin Tiny Threat.\n\n|cFFFFFF00v1.11.3|r\n\n|cFFFFFF00-|r Corrigido mais problemas conhecidos com as Skins.\n\n|cFFFFFF00-|r Corrigido problema onde os icones dos plugins nao eram escondidos apos fechar todas as janelas.\n\n|cFFFFFF00v1.11.2|r\n\n|cFFFFFF00-|r Corrigido problemas onde o Details! parava de funcionar se nenhum plugin estiver ligado no painel de addons do Wow.|cFFFFFF00v1.11.0|r\n\n|cFFFFFF00-|r Adicionado opcao para abreviar o Dps e o Hps.\n\n|cFFFFFF00-|r Corrigido um problema onde o icone da janela desaparecia ao reabri-la.\n\n|cFFFFFF00-|r Melhorias no reconhecimento das classes.\n\n|cFFFFFF00-|r As seguintes magias foram adicionadas como cooldowns: Healing Tide Totem, Spirit Link Totem, Demoralizing Banner, Mass Spell Reflection and Shield Block.\n\n|cFFFFFF00-|r Mais melhorias feitas no plugin Encounter Details.\n\n|cFFFFFF00-|r Melhorias feitas nos plugins disponiveis para download: Timeline e Advanced Death Logs.\n\n|cFFFFFF00v1.10.0|r\n\n|cFFFFFF00-|r Corrigido um problema no Dps no segmento total quando existia apenas 1 segmento.\n\n|cFFFFFF00-|r Cores e imagem de fundo dos menus foram alterados.\n\n|cFFFFFF00-|r A altura do painel de opcoes foi aumentada.\n\n|cFFFFFF00-|r Adicionada opcao para esconder ou alterar a transparencia da janela quando estiver em combate.\n\n|cFFFFFF00-|r Adicionado um painel de controle de plugins para ativar ou desativa-los.\n\n|cFFFFFF00v1.9.5|r\n\n|cFFFFFF00-|rMais correcoes para as Skins e suporte a novos plugins.|r\n\n|cFFFFFF00v1.9.4|r\n\n|cFFFFFF00-|r Pequenas correcoes e melhorias na tela de boas vindas.\n\n|cFFFFFF00v1.9.3|r\n\n|cFFFFFF00-|r A barra agora comeca apos o icone e nao mais na borda esquerda da janela.\n\n|cFFFFFF00-|r Janela de boas vindas agora esta traduzida para outros idiomas.\n\n|cFFFFFF00-|r Corrigido o problema que estava afetando o plugin de Rank de Dano.\n\n|cFFFFFF00v1.9.1|r\n\n|cFFFFFF00-|r corrigido problema do icone na janela principal quando nao havia nenhum plugin instalado. \n\n|cFFFFFF00-|r corrigido problema com alguns botoes no painel de opcoes onde o texto estava fora do lugar.\n\n|cFFFFFF00-|r corrigido a posicao dos sub menus quando proximos a borda direita do monitor.\n\n|cFFFFFF00-|r corrigida a posicao do botao de fechar do skin padrao.\n\n|cFFFFFF00-|r corrigido um erro nas skins ao selecionar um plugin de raide ou solo.|cFFFFFF00v1.9.0|r\n\n|cFFFFFF00-|r Corrigido o problema de nao movimentar o botao no minimapa.\n\n|cFFFFFF00-|r Suporte a skins foi reescrito e agora ficou mais flexivel.\n\n|cFFFFFF00-|r Adicionadas mais de 20 opcoes de customizacao no painel de opcoes.\n\n|cFFFFFF00v1.8.4|r\n\n|cFFFFFF00-|r Adicionado comando 'details reinstalar' no qual limpa a configuracao do Details! em caso de erros.\n\n|cFFFFFF00v1.8.3|r\n\n|cFFFFFF00-|r Adicionada nova skin: Simple Gray.\n\n|cFFFFFF00-|r Adicionado botoes para o Details! no minimapa e menu de addons no painel de intercace.\n\n|cFFFFFF00-|r Adicionados novas bolhas de tutoriais para aspectos basicos das janelas do Details!.\n\n|cFFFFFF00-|r Corrigido o Modo Panico aonde as vezes ele nao era disparado." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name diff --git a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua index 8986b81b..109867ec 100644 --- a/plugins/Details_EncounterDetails/Details_EncounterDetails.lua +++ b/plugins/Details_EncounterDetails/Details_EncounterDetails.lua @@ -198,6 +198,25 @@ local function CreatePluginFrames (data) end +local IsShiftKeyDown = IsShiftKeyDown + +local shift_monitor = function (self) + if (IsShiftKeyDown()) then + local spellname = GetSpellInfo (self.spellid) + if (spellname) then + GameTooltip:SetOwner (self, "ANCHOR_TOPLEFT") + GameTooltip:SetSpellByID (self.spellid) + GameTooltip:Show() + self.showing_spelldesc = true + end + else + if (self.showing_spelldesc) then + self:GetScript ("OnEnter") (self) + self.showing_spelldesc = false + end + end +end + --> custom tooltip for dead details --------------------------------------------------------------------------------------------------------- local function KillInfo (deathTable, row) @@ -555,22 +574,40 @@ function EncounterDetails:SetRowScripts (barra, index, container) if (self.TTT == "damage_taken") then --> damage taken DamageTakenDetails (self.jogador, barra) + elseif (self.TTT == "habilidades_inimigas") then --> enemy abilytes EnemySkills (self.jogador, self) + self:SetScript ("OnUpdate", shift_monitor) + self.spellid = self.jogador [4] + _GameTooltip:AddLine (" ") + _GameTooltip:AddLine (Loc ["STRING_HOLDSHIFT"]) + elseif (self.TTT == "total_interrupt") then KickBy (self.jogador, self) + self:SetScript ("OnUpdate", shift_monitor) + self.spellid = self.jogador [3] + _GameTooltip:AddLine (" ") + _GameTooltip:AddLine (Loc ["STRING_HOLDSHIFT"]) + elseif (self.TTT == "dispell") then DispellInfo (self.jogador, self) + self:SetScript ("OnUpdate", shift_monitor) + self.spellid = self.jogador [3] + _GameTooltip:AddLine (" ") + _GameTooltip:AddLine (Loc ["STRING_HOLDSHIFT"]) + elseif (self.TTT == "morte") then --> deaths KillInfo (self.jogador, self) --> aqui 2 end - + GameTooltip:Show() end) barra:SetScript ("OnLeave", --> MOUSE OUT function (self) + self:SetScript ("OnUpdate", nil) + if (self.fading_in or self.faded or not self:IsShown() or self.hidden) then return end diff --git a/plugins/Details_EncounterDetails/enUS.lua b/plugins/Details_EncounterDetails/enUS.lua index 7f562094..0c2c4bb5 100644 --- a/plugins/Details_EncounterDetails/enUS.lua +++ b/plugins/Details_EncounterDetails/enUS.lua @@ -35,6 +35,8 @@ Loc ["STRING_TOOLTIP"] = "Show Encounter Details Window" Loc ["STRING_LAST_COOLDOWN"] = "last cooldown used" Loc ["STRING_NOLAST_COOLDOWN"] = "no cooldown used" +Loc ["STRING_HOLDSHIFT"] = "SHIFT For Spell Description" + Loc ["STRING_ADDS_HELP"] = "Mouse over |cFF00FF00Arrow Up|r\nfor dmg received, |cFFFF0000Arrow\n|cFFFF0000Down|r for dmg dealt. |cFFFFFF00Click\n|cFFFFFF00Arrow|r: Report the data\nshown on tooltip." Loc ["STRING_INTERRIPT_HELP"] = " |cFFFFFF00Click|r on a bar:\nopen report window.\nIn the right we have the\namount interrupted against\nthe total times casted." Loc ["STRING_DISPELL_HELP"] = " \n|cFFFFFF00Click|r on a bar:\nopen report window." diff --git a/plugins/Details_EncounterDetails/ptBR.lua b/plugins/Details_EncounterDetails/ptBR.lua index 015eb984..9af395da 100644 --- a/plugins/Details_EncounterDetails/ptBR.lua +++ b/plugins/Details_EncounterDetails/ptBR.lua @@ -34,6 +34,8 @@ Loc ["STRING_TOOLTIP"] = "Mostrar os detalhes do combate" Loc ["STRING_LAST_COOLDOWN"] = "ultimo cooldown usado" Loc ["STRING_NOLAST_COOLDOWN"] = "nenhum cooldown usado" +Loc ["STRING_HOLDSHIFT"] = "SHIFT Para Descricao da Habilidade" + Loc ["STRING_ADDS_HELP"] = "Passe o mouse |cFF00FF00Flecha|r\ndano recebido, |cFFFF0000Flecha|r\ndano feito.|cFFFFFF00Clique|r: Reporta\nos dados no tooltip." Loc ["STRING_INTERRIPT_HELP"] = "\n\n|cFFFFFF00Clique|r na barra: abre a janela de enviar relatorio." Loc ["STRING_DISPELL_HELP"] = "\n\n|cFFFFFF00Clique|r na barra: abre a janela de enviar relatorio." diff --git a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua index 5f42ff55..c865c9ed 100644 --- a/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua +++ b/plugins/Details_RaidInfo-SiegeOfOrgrimmar/SiegeOfOrgrimmar.lua @@ -53,6 +53,29 @@ local siege_of_orgrimmar = { end end, + encounter_ids = { + -- Vale of Eternal Sorrows + [1602] = 1, -- Immerseus + [1598] = 2, -- Fallen Protectors + [1624] = 3, -- Norushen + [1604] = 4, -- Sha of Pride + -- Gates of Retribution + [1622] = 5, -- Galakras + [1600] = 6, -- Iron Juggernaut + [1606] = 7, -- Kor'kron Dark Shaman + [1603] = 8, -- General Nazgrim + + -- The Underhold + [1595] = 9, -- Malkorok + [1594] = 10, -- Spoils of Pandaria + [1599] = 11, -- Thok the Bloodthirsty + + -- Downfall + [1601] = 12, -- Siegecrafter Blackfuse + [1593] = 13, -- Paragons of Klaxy + [1623] = 14, -- Garrosh Hellscream + }, + boss_ids = { -- Vale of Eternal Sorrows [71543] = 1, -- Immerseus @@ -361,7 +384,8 @@ local siege_of_orgrimmar = { boss = "Norushen", portrait = [[Interface\EncounterJournal\UI-EJ-BOSS-Norushen]], - combat_end = {1, 72276}, + --combat_end = {1, 72276}, + encounter_start = {delay = 25}, equalize = true, spell_mechanics = { diff --git a/startup.lua b/startup.lua index ad5efaae..390117df 100644 --- a/startup.lua +++ b/startup.lua @@ -200,6 +200,9 @@ function _G._detalhes:Start() self.listener:RegisterEvent ("ZONE_CHANGED_NEW_AREA") self.listener:RegisterEvent ("PLAYER_ENTERING_WORLD") + self.listener:RegisterEvent ("ENCOUNTER_START") + self.listener:RegisterEvent ("ENCOUNTER_END") + --self.listener:RegisterAllEvents() -- self.listener:RegisterEvent ("SPELL_CAST_START") @@ -219,7 +222,7 @@ function _G._detalhes:Start() self.in_group = IsInGroup() or IsInRaid() --> send messages gathered on initialization - self:ScheduleTimer ("ShowDelayMsg", 7) + self:ScheduleTimer ("ShowDelayMsg", 10) --> send instance open signal for index, instancia in ipairs (self.tabela_instancias) do @@ -298,7 +301,7 @@ function _G._detalhes:Start() end --> feedback trhead - if (self.tutorial.logons > 100 and self.tutorial.logons < 104) then + if (self.tutorial.logons > 100) then -- and self.tutorial.logons < 104 if (not self.tutorial.feedback_window1) then self.tutorial.feedback_window1 = true