From 9f903cf2b4b8e15ebfff2b1402b31988411d047f Mon Sep 17 00:00:00 2001 From: terciob19 Date: Tue, 14 Jan 2014 13:09:17 -0200 Subject: [PATCH] - Fixed the minimap button issue. - Major rewrite over window properties. - Skin support has been rewrite and now is more flexive. - Added new customization options on options panel. --- Details.toc | 1 + Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua | 6 +- boot.lua | 18 +- classes/classe_damage.lua | 48 +- classes/classe_energy.lua | 35 +- classes/classe_heal.lua | 38 +- classes/classe_instancia.lua | 477 ++--- classes/classe_instancia_include.lua | 122 ++ classes/classe_others.lua | 51 +- core/control.lua | 4 +- core/plugins_raid.lua | 10 +- core/plugins_solo.lua | 10 +- core/plugins_statusbar.lua | 35 +- core/plugins_toolbar.lua | 52 +- core/util.lua | 11 +- core/windows.lua | 90 +- framework/cooltip.lua | 6 +- framework/slider.lua | 47 +- functions/savedata.lua | 127 +- functions/skins.lua | 86 +- functions/slash.lua | 12 + gumps/fw_mods.lua | 12 +- gumps/janela_info.lua | 2 +- gumps/janela_news.lua | 9 + gumps/janela_options.lua | 1078 +++++++--- gumps/janela_principal.lua | 2889 +++++++++++++++++--------- images/icons.tga | Bin 503220 -> 505501 bytes images/skins/default_skin.tga | Bin 180170 -> 191348 bytes images/skins/flat_skin.tga | Bin 155583 -> 159546 bytes images/skins/simplygray_skin.tga | Bin 148720 -> 161199 bytes locales/Details-enUS.lua | 120 +- locales/Details-ptBR.lua | 213 +- startup.lua | 161 +- 33 files changed, 3821 insertions(+), 1949 deletions(-) create mode 100644 classes/classe_instancia_include.lua diff --git a/Details.toc b/Details.toc index d89ef965..3653607c 100644 --- a/Details.toc +++ b/Details.toc @@ -72,6 +72,7 @@ classes\classe_energy.lua classes\classe_energy_habilidade.lua classes\classe_others.lua classes\classe_others_habilidade.lua +classes\classe_instancia_include.lua classes\classe_instancia.lua classes\classe_target.lua classes\classe_custom.lua diff --git a/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua b/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua index c523821f..dfc65a8f 100644 --- a/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua +++ b/Libs/LibDBIcon-1.0/LibDBIcon-1.0.lua @@ -1,6 +1,6 @@ --[[ Name: DBIcon-1.0 -Revision: $Rev: 30 $ +Revision: $Rev: 34 $ Author(s): Rabbit (rabbit.magtheridon@gmail.com) Description: Allows addons to register to recieve a lightweight minimap icon as an alternative to more heavy LDB displays. Dependencies: LibStub @@ -33,7 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -- local DBICON10 = "LibDBIcon-1.0" -local DBICON10_MINOR = tonumber(("$Rev: 30 $"):match("(%d+)")) +local DBICON10_MINOR = tonumber(("$Rev: 34 $"):match("(%d+)")) if not LibStub then error(DBICON10 .. " requires LibStub.") end local ldb = LibStub("LibDataBroker-1.1", true) if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end @@ -43,6 +43,7 @@ if not lib then return end lib.disabled = lib.disabled or nil lib.objects = lib.objects or {} lib.callbackRegistered = lib.callbackRegistered or nil +lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib) lib.notCreated = lib.notCreated or {} function lib:IconCallback(event, name, key, value, dataobj) @@ -235,6 +236,7 @@ local function createButton(name, object, db) if not db or not db.hide then button:Show() else button:Hide() end end + lib.callbacks:Fire("LibDBIcon_IconCreated", button, name) -- Fire 'Icon Created' callback end -- We could use a metatable.__index on lib.objects, but then we'd create diff --git a/boot.lua b/boot.lua index 51e936d4..3261a5db 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.8.4" + _detalhes.userversion = "v1.9.0" _detalhes.version = "Alpha 013" _detalhes.realversion = 13 @@ -90,6 +90,7 @@ do _detalhes.ToolBar = {} --> current showing icons _detalhes.ToolBar.Shown = {} + _detalhes.ToolBar.AllButtons = {} --> plugin objects _detalhes.ToolBar.Plugins = {} --> name to plugin object @@ -208,6 +209,21 @@ do print (a,b) end end + + --> global 'table_deepcopy' copies a full table + function table_deepcopy (orig) + local orig_type = type(orig) + local copy + if orig_type == 'table' then + copy = {} + for orig_key, orig_value in next, orig, nil do + copy [table_deepcopy (orig_key)] = table_deepcopy (orig_value) + end + else + copy = orig + end + return copy + end --> delay messages function _detalhes:DelayMsg (msg) diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 0d6638d9..f40f3226 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -662,6 +662,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex local qual_barra = 1 local barras_container = instancia.barras + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado atributo_damage:AtualizarFrags (ntable[i], qual_barra, i, instancia) qual_barra = qual_barra+1 @@ -843,7 +844,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (amount < 1) then --> não há barras para mostrar if (forcar) then if (instancia.modo == 2) then --> group - for i = 1, instancia.barrasInfo.cabem do + for i = 1, instancia.rows_fit_in_window do gump:Fade (instancia.barras [i], "in", 0.3) end end @@ -865,10 +866,10 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex if (myPos) then --testando - local cima = math.floor (instancia.barrasInfo.cabem/2) - local baixo = math.ceil (instancia.barrasInfo.cabem/2) + local cima = math.floor (instancia.rows_fit_in_window / 2) + local baixo = math.ceil (instancia.rows_fit_in_window / 2) - if (instancia.barrasInfo.cabem%2 == 0) then + if (instancia.rows_fit_in_window % 2 == 0) then cima = cima - 1 end @@ -890,10 +891,21 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex end local combat_time = instancia.showing:GetCombatTime() - 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 + + 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 + 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 + end + + end + end @@ -912,7 +924,7 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex --> beta, hidar barras não usadas durante um refresh forçado if (forcar) then if (instancia.modo == 2) then --> group - for i = qual_barra, instancia.barrasInfo.cabem do + for i = qual_barra, instancia.rows_fit_in_window do gump:Fade (instancia.barras [i], "in", 0.3) end end @@ -1076,10 +1088,10 @@ end esta_barra.statusbar:SetValue (esta_porcentagem) gump:Fade (esta_barra, "out") - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -1135,10 +1147,10 @@ end end end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -1180,22 +1192,22 @@ end if (self.enemy) then if (_detalhes.faction_against == "Horde") then - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA else - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (0.94117, 0, 0.01960, 1) end else esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda end - if (instancia.row_textL_class_colors) then + if (instancia.row_info.textL_class_colors) then esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.row_textR_class_colors) then + if (instancia.row_info.textR_class_colors) then esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 3b244568..c1eec998 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -278,9 +278,18 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex local qual_barra = 1 local barras_container = instancia.barras - 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 (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 + 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 + end if (instancia.atributo == 5) then --> custom @@ -297,7 +306,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex --> beta, hidar barras não usadas durante um refresh forçado if (forcar) then if (instancia.modo == 2) then --> group - for i = qual_barra, instancia.barrasInfo.cabem do + for i = qual_barra, instancia.rows_fit_in_window do gump:Fade (instancia.barras [i], "in", 0.3) end end @@ -381,10 +390,10 @@ function atributo_energy:RefreshBarra2 (esta_barra, instancia, tabela_anterior, esta_barra.statusbar:SetValue (esta_porcentagem) gump:Fade (esta_barra, "out") - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -440,10 +449,10 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize) end end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -485,22 +494,22 @@ function atributo_energy:RefreshBarra (esta_barra, instancia, from_resize) if (self.enemy) then if (_detalhes.faction_against == "Horde") then - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA else - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1) end else esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda end - if (instancia.row_textL_class_colors) then + if (instancia.row_info.textL_class_colors) then esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.row_textR_class_colors) then + if (instancia.row_info.textR_class_colors) then esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index e742f5a5..f5196d7d 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -333,10 +333,20 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo --print (sub_atributo, total, keyName) local combat_time = instancia.showing:GetCombatTime() - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - --conteudo[i]:AtualizaBarra (instancia, qual_barra, i, total, sub_atributo, forcar) --> instância, index, total, valor da 1º barra - 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 (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 + 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 + end + + end if (instancia.atributo == 5) then --> custom @@ -353,7 +363,7 @@ function atributo_heal:RefreshWindow (instancia, tabela_do_combate, forcar, expo --> beta, hidar barras não usadas durante um refresh forçado if (forcar) then if (instancia.modo == 2) then --> group - for i = qual_barra, instancia.barrasInfo.cabem do + for i = qual_barra, instancia.rows_fit_in_window do gump:Fade (instancia.barras [i], "in", 0.3) end end @@ -488,10 +498,10 @@ function atributo_heal:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo esta_barra.statusbar:SetValue (esta_porcentagem) gump:Fade (esta_barra, "out") - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -547,10 +557,10 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize) end end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -592,22 +602,22 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize) if (self.enemy) then if (_detalhes.faction_against == "Horde") then - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA else - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:" .. instancia.row_info.height .. ":" .. instancia.row_info.height .. ":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1) end else esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda end - if (instancia.row_textL_class_colors) then + if (instancia.row_info.textL_class_colors) then esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.row_textR_class_colors) then + if (instancia.row_info.textR_class_colors) then esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 3bb1ac1f..241f5920 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -218,8 +218,8 @@ end self.baseframe.isLocked = false self.baseframe.lock_button.label:SetText (Loc ["STRING_LOCK_WINDOW"]) self.baseframe.lock_button:SetWidth (self.baseframe.lock_button.label:GetStringWidth()+2) - gump:Fade (self.baseframe.resize_direita, 0) - gump:Fade (self.baseframe.resize_esquerda, 0) + self.baseframe.resize_direita:SetAlpha (0) + self.baseframe.resize_esquerda:SetAlpha (0) self.baseframe.lock_button:ClearAllPoints() self.baseframe.lock_button:SetPoint ("right", self.baseframe.resize_direita, "left", -1, 1.5) end @@ -231,8 +231,8 @@ end self.baseframe.lock_button:SetWidth (self.baseframe.lock_button.label:GetStringWidth()+2) self.baseframe.lock_button:ClearAllPoints() self.baseframe.lock_button:SetPoint ("bottomright", self.baseframe, "bottomright", -3, 0) - gump:Fade (self.baseframe.resize_direita, 1) - gump:Fade (self.baseframe.resize_esquerda, 1) + self.baseframe.resize_direita:SetAlpha (1) + self.baseframe.resize_esquerda:SetAlpha (1) end end end @@ -311,9 +311,9 @@ end return _detalhes:Msg (Loc ["STRING_INSTANCE_LIMIT"]) end - local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1) - _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia - return nova_instancia + local new_instance = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1) + _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = new_instance + return new_instance elseif (id) then local instancia = _detalhes.tabela_instancias [id] @@ -335,16 +335,16 @@ end return _detalhes:Msg (Loc ["STRING_INSTANCE_LIMIT"]) end - local nova_instancia = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1) - _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = nova_instancia + local new_instance = _detalhes:NovaInstancia (#_detalhes.tabela_instancias+1) + _detalhes.tabela_instancias [#_detalhes.tabela_instancias+1] = new_instance if (not _detalhes.initializing) then - _detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, nova_instancia) + _detalhes:SendEvent ("DETAILS_INSTANCE_OPEN", nil, new_instance) end _detalhes:GetLowerInstanceNumber() - return nova_instancia + return new_instance end ------------------------------------------------------------------------------------------------------------------------ @@ -496,10 +496,10 @@ function _detalhes:agrupar_janelas (lados) self.snap [4] = esta_instancia.meu_id esta_instancia.snap [2] = self.meu_id - esta_instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", esta_instancia.baseframe.rodape.top_bg, "left", 25, 58) - esta_instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", esta_instancia.baseframe.rodape.top_bg, "center", 20, 58) - esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") - esta_instancia.baseframe.rodape.esquerdo.have_snap = true + --esta_instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", esta_instancia.baseframe.rodape.top_bg, "left", 25, 58) + --esta_instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", esta_instancia.baseframe.rodape.top_bg, "center", 20, 58) + --esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") + --esta_instancia.baseframe.rodape.esquerdo.have_snap = true elseif (lado == 1) then --> esquerda --> mover frame @@ -527,10 +527,10 @@ function _detalhes:agrupar_janelas (lados) self.snap [2] = esta_instancia.meu_id esta_instancia.snap [4] = self.meu_id - self.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", self.baseframe.rodape.top_bg, "left", 25, 58) - self.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", self.baseframe.rodape.top_bg, "center", 20, 58) - self.baseframe.rodape.esquerdo:SetTexture ([[Interface\AddOns\Details\images\bar_down_left_snap]]) - self.baseframe.rodape.esquerdo.have_snap = true + --self.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", self.baseframe.rodape.top_bg, "left", 25, 58) + --self.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", self.baseframe.rodape.top_bg, "center", 20, 58) + --self.baseframe.rodape.esquerdo:SetTexture ([[Interface\AddOns\Details\images\bar_down_left_snap]]) + --self.baseframe.rodape.esquerdo.have_snap = true end if (not esta_instancia.ativa) then @@ -561,10 +561,10 @@ local function FixSnaps (instancia) esta_instancia = _detalhes.tabela_instancias [esta_instancia] --_detalhes:DelayMsg ("DEBUG janela "..instancia.meu_id.." com snap "..snap.. " em " .. esta_instancia.meu_id) if (snap == 2) then - instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", instancia.baseframe.rodape.top_bg, "left", 25, 10) - instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", instancia.baseframe.rodape.top_bg, "center", 20, 10) - instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") - instancia.baseframe.rodape.esquerdo.have_snap = true + --instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", instancia.baseframe.rodape.top_bg, "left", 25, 10) + --instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", instancia.baseframe.rodape.top_bg, "center", 20, 10) + --instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") + --instancia.baseframe.rodape.esquerdo.have_snap = true end end end @@ -609,10 +609,10 @@ function _detalhes:Desagrupar (instancia, lado) end if (index == 2) then -- index é o codigo do snap - esta_instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", esta_instancia.baseframe.rodape.top_bg, "left", 5, 58) - esta_instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", esta_instancia.baseframe.rodape.top_bg, "center", 0, 58) - esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left") - esta_instancia.baseframe.rodape.esquerdo.have_snap = nil + --esta_instancia.baseframe.rodape.StatusBarLeftAnchor:SetPoint ("left", esta_instancia.baseframe.rodape.top_bg, "left", 5, 58) + --esta_instancia.baseframe.rodape.StatusBarCenterAnchor:SetPoint ("center", esta_instancia.baseframe.rodape.top_bg, "center", 0, 58) + --esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left") + --esta_instancia.baseframe.rodape.esquerdo.have_snap = nil end end @@ -668,9 +668,9 @@ function _detalhes:SnapTextures (remove) if (esta_instancia:IsAtiva()) then if (esta_instancia.baseframe.rodape.esquerdo.have_snap) then if (remove) then - esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left") + --esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left") else - esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") + --esta_instancia.baseframe.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left_snap") end end end @@ -681,279 +681,153 @@ end --> search key: ~new ~nova function _detalhes:NovaInstancia (ID) - -- Uma nova instância será uma extensão do acetimer somada com uma cópia da classe detalhes_funções - local nova_instancia = {} - _setmetatable (nova_instancia, _detalhes) + local new_instance = {} + _setmetatable (new_instance, _detalhes) - nova_instancia.meu_id = ID + --> instance number + new_instance.meu_id = ID + + --> setup all config + new_instance:ResetInstanceConfig() - nova_instancia.skin = "Default Skin" + --> internal stuff + new_instance.barras = {} --container que irá armazenar todas as barras + new_instance.barraS = {nil, nil} --de x até x são as barras que estão sendo mostradas na tela + new_instance.rolagem = false --barra de rolagem não esta sendo mostrada + new_instance.largura_scroll = 26 + new_instance.bar_mod = 0 + new_instance.bgdisplay_loc = 0 - nova_instancia.barras = {} --container que irá armazenar todas as barras - nova_instancia.barraS = {nil, nil} --de x até x são as barras que estão sendo mostradas na tela - nova_instancia.rolagem = false --barra de rolagem não esta sendo mostrada - - nova_instancia["barrasInfo"] = { - ["criadas"] = 0, --quantos frames de barras ja foram criados - ["mostrando"] = 0, --quantos jogadores que estão sendo mostrados agora - ["maximo"] = 50, --máximo de barras que pode ser criado - ["cabem"] = nil, --quantas barras cabem na janela - ["altura"] = 14, - ["fontSize"] = 10.5, - ["font"] = SharedMedia:Fetch ("font", "Arial Narrow"), - ["fontName"] = "Arial Narrow", - ["textura"] = _detalhes.default_texture, - ["texturaBackground"] = _detalhes.default_texture, - ["texturaBackgroundColor"] = {0, 0, 0, 0}, - ["texturaBackgroundByClass"] = false, - ["textureName"] = _detalhes.default_texture_name, - ["textureNameBackground"] = _detalhes.default_texture_name, - ["textura_mouseover"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", - ["animar"] = true, - ["fade"] = true, - ["espaco"] = { - ["esquerda"] = 3, - ["direita"] = -5, - ["entre"] = 1, - } - } + --> displaying row info + new_instance.rows_created = 0 + new_instance.rows_showing = 0 + new_instance.rows_max = 50 + new_instance.rows_fit_in_window = nil - nova_instancia.largura_scroll = 26 - nova_instancia.bar_mod = 0 - nova_instancia.bgdisplay_loc = 0 - - nova_instancia.bg_alpha = _detalhes.default_bg_alpha - nova_instancia.bg_r = _detalhes.default_bg_color - nova_instancia.bg_g = _detalhes.default_bg_color - nova_instancia.bg_b = _detalhes.default_bg_color - - nova_instancia.auto_current = true - nova_instancia.row_texture_class_colors = true - nova_instancia.row_textL_class_colors = false - nova_instancia.row_textR_class_colors = false - nova_instancia.row_textL_outline = true - nova_instancia.row_textR_outline = false - nova_instancia.fixed_row_texture_color = {0, 0, 0} - nova_instancia.fixed_row_text_color = {1, 1, 1} - - nova_instancia.barrasInfo["alturaReal"] = nova_instancia.barrasInfo.altura+nova_instancia.barrasInfo.espaco.entre - - nova_instancia.posicao = { - ["normal"] = {}, - ["solo"] = {} + --> saved pos for normal mode and lone wolf mode + new_instance.posicao = { + ["normal"] = {}, + ["solo"] = {} } + --> save information about window snaps + new_instance.snap = {nil, nil, nil, nil} - nova_instancia.tooltip = { - ["n_habilidades"] = 3, - ["n_inimigos"] = 3 - } - - nova_instancia.snap = {nil, nil, nil, nil} - - --janela inicia no frame normal (group ou all) - nova_instancia.mostrando = "normal" - --menu consolidated - nova_instancia.consolidate = false - nova_instancia.icons = {true, true, true, true} + --> current state starts as normal + new_instance.mostrando = "normal" + --> menu consolidated + new_instance.consolidate = false + new_instance.icons = {true, true, true, true} - --cria a janela da instância - local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (ID, nova_instancia, true) - - nova_instancia.baseframe = _baseframe - nova_instancia.bgframe = _bgframe - nova_instancia.bgdisplay = _bgframe_display - nova_instancia.scroll = _scrollframe + --> create window frames + local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (ID, new_instance, true) + new_instance.baseframe = _baseframe + new_instance.bgframe = _bgframe + new_instance.bgdisplay = _bgframe_display + new_instance.scroll = _scrollframe - --status bar - nova_instancia.StatusBar = {} - nova_instancia.StatusBar.left = nil - nova_instancia.StatusBar.center = nil - nova_instancia.StatusBar.right = nil - nova_instancia.StatusBar.options = {} + --> status bar stuff + new_instance.StatusBar = {} + new_instance.StatusBar.left = nil + new_instance.StatusBar.center = nil + new_instance.StatusBar.right = nil + new_instance.StatusBar.options = {} - local clock = _detalhes.StatusBar:CreateStatusBarChildForInstance (nova_instancia, "DETAILS_STATUSBAR_PLUGIN_CLOCK") - _detalhes.StatusBar:SetCenterPlugin (nova_instancia, clock) - - local segment = _detalhes.StatusBar:CreateStatusBarChildForInstance (nova_instancia, "DETAILS_STATUSBAR_PLUGIN_PSEGMENT") - _detalhes.StatusBar:SetLeftPlugin (nova_instancia, segment) - - local dps = _detalhes.StatusBar:CreateStatusBarChildForInstance (nova_instancia, "DETAILS_STATUSBAR_PLUGIN_PDPS") - _detalhes.StatusBar:SetRightPlugin (nova_instancia, dps) - -- - - nova_instancia.color = {1, 1, 1, 1} - nova_instancia.wallpaper = { - enabled = false, - texture = nil, - anchor = "all", - alpha = 0.5, - texcoord = {0, 1, 0, 1}, - width = 0, - height = 0, - overlay = {1, 1, 1, 1} - } - - --> salva a altura antiga - nova_instancia.alturaAntiga = _baseframe:GetHeight() - - --atributo que será mostrado na criação do gump será o de dano: - nova_instancia.atributo = 1 --> dano - nova_instancia.sub_atributo = 1 --> damage done - - nova_instancia.sub_atributo_last = {1, 1, 1, 1, 1} - - nova_instancia.segmento = -1 --> combate atual - - -- atualiza tabela de historico e atributo - _detalhes:TrocaTabela (nova_instancia, 0, 1, 1) - - nova_instancia:DefaultIcons (true, true, true, true) - - --nova janela vem sempre com o modo grupo ativado - --nova_instancia.modo = _detalhes_props["MODO_GROUP"] - nova_instancia.modo = modo_grupo - nova_instancia.last_modo = modo_grupo - nova_instancia.LastModo = modo_grupo - - --nova_instancia.janela.gump_cabecalho.Title:SetText (Loc [_detalhes._detalhes_props.modo_nome[nova_instancia.modo]]) --poe o nome do modo no gump - --_baseframe.rodape.segmento:SetText ("Segmento: Atual") --> localiza-me + local clock = _detalhes.StatusBar:CreateStatusBarChildForInstance (new_instance, "DETAILS_STATUSBAR_PLUGIN_CLOCK") + _detalhes.StatusBar:SetCenterPlugin (new_instance, clock) + + local segment = _detalhes.StatusBar:CreateStatusBarChildForInstance (new_instance, "DETAILS_STATUSBAR_PLUGIN_PSEGMENT") + _detalhes.StatusBar:SetLeftPlugin (new_instance, segment) + + local dps = _detalhes.StatusBar:CreateStatusBarChildForInstance (new_instance, "DETAILS_STATUSBAR_PLUGIN_PDPS") + _detalhes.StatusBar:SetRightPlugin (new_instance, dps) - --mostra o gump na tela - nova_instancia.iniciada = true + --> internal stuff + new_instance.alturaAntiga = _baseframe:GetHeight() + new_instance.atributo = 1 --> dano + new_instance.sub_atributo = 1 --> damage done + new_instance.sub_atributo_last = {1, 1, 1, 1, 1} + new_instance.segmento = -1 --> combate atual + new_instance.modo = modo_grupo + new_instance.last_modo = modo_grupo + new_instance.LastModo = modo_grupo + + --> change the attribute + _detalhes:TrocaTabela (new_instance, 0, 1, 1) + + --> handle icons + new_instance:DefaultIcons (true, true, true, true) + + --> internal stuff + new_instance.row_height = new_instance.row_info.height + new_instance.row_info.space.between + + new_instance.iniciada = true + new_instance:SaveMainWindowPosition() + new_instance:ReajustaGump() + + new_instance.rows_fit_in_window = _math_floor (new_instance.posicao[new_instance.mostrando].h / new_instance.row_height) - nova_instancia:SaveMainWindowPosition() - nova_instancia:ReajustaGump() - - --> calcula quantas barras cabem na janela - nova_instancia.barrasInfo.cabem = _math_floor (nova_instancia.posicao[nova_instancia.mostrando].h / nova_instancia.barrasInfo.alturaReal) - - nova_instancia:AtivarInstancia() - - -- instância criada, hora de retorna-la a quem pediu - return nova_instancia + --> all done + new_instance:AtivarInstancia() + + return new_instance end ------------------------------------------------------------------------------------------------------------------------ --> ao reiniciar o addon esta função é rodada para recriar a janela da instância ---> search key: ~restaura +--> search key: ~restaura ~inicio function _detalhes:RestauraJanela (index, temp) - self.skin = self.skin or "Default Skin" + --> load + self:LoadInstanceConfig() - self.bg_alpha = self.bg_alpha or _detalhes.default_bg_alpha - self.bg_r = self.bg_r or _detalhes.default_bg_color - self.bg_g = self.bg_g or _detalhes.default_bg_color - self.bg_b = self.bg_b or _detalhes.default_bg_color - - if (self.auto_current == nil) then - self.auto_current = true - end - - if (self.row_texture_class_colors == nil) then - self.row_texture_class_colors = true - end - - if (self.row_textL_class_colors == nil) then - self.row_textL_class_colors = false - end - if (self.row_textR_class_colors == nil) then - self.row_textR_class_colors = false - end - if (self.row_textL_outline == nil) then - self.row_textL_outline = false - end - if (self.row_textR_outline == nil) then - self.row_textR_outline = false - end + --> reset internal stuff + self.sub_atributo_last = self.sub_atributo_last or {1, 1, 1, 1, 1} + self.rolagem = false + self.need_rolagem = false + self.barras = {} + self.barraS = {nil, nil} + self.rows_fit_in_window = nil + self.consolidate = self.consolidate or false + self.icons = self.icons or {true, true, true, true} + self.rows_created = 0 + self.rows_showing = 0 + self.rows_max = 50 + self.rows_fit_in_window = nil + self.largura_scroll = 26 + self.bar_mod = 0 + self.bgdisplay_loc = 0 + self.last_modo = self.last_modo or modo_grupo - if (self.fixed_row_texture_color == nil) then - self.fixed_row_texture_color = {0, 0, 0} - end - if (self.fixed_row_text_color == nil) then - self.fixed_row_text_color = {1, 1, 1} - end - - if (not self.barrasInfo.texturaBackground) then - self.barrasInfo.texturaBackground = _detalhes.default_texture - self.barrasInfo.texturaBackgroundColor = {0, 0, 0, 0} - self.barrasInfo.texturaBackgroundByClass = false - self.barrasInfo.textureNameBackground = _detalhes.default_texture_name - end - - if (not self.sub_atributo_last) then - self.sub_atributo_last = {1, 1, 1, 1, 1} - end + self.row_height = self.row_info.height + self.row_info.space.between + --> create frames local _baseframe, _bgframe, _bgframe_display, _scrollframe = gump:CriaJanelaPrincipal (self.meu_id, self) - self.baseframe = _baseframe self.bgframe = _bgframe self.bgdisplay = _bgframe_display self.scroll = _scrollframe - - --self.barrasInfo.textura = "Interface\\AddOns\\Details\\images\\bar44" - --self.barrasInfo.textura = "Interface\\AddOns\\Details\\images\\bar4" - --self.barrasInfo.textura = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]] - --self.barrasInfo.textura = "Interface\PaperDollInfoFrame\UI-Character-Skills-Bar" - - self.barrasInfo.textura = self.barrasInfo.textura or _detalhes.default_texture - self.barrasInfo.textureName = self.barrasInfo.textureName or _detalhes.default_texture_name - self.barrasInfo.fontSize = self.barrasInfo.fontSize or 10.5 - self.barrasInfo.font = self.barrasInfo.font or SharedMedia:Fetch ("font", "Arial Narrow") - self.barrasInfo.fontName = self.barrasInfo.fontName or "Arial Narrow" - - _detalhes:TrocaTabela (self, self.segmento, self.atributo, self.sub_atributo, true) --> passando true no 5º valor para a função ignorar a checagem de valores iguais - - --> resetando as cprops da instância: - self.rolagem = false - self.need_rolagem = false _baseframe:EnableMouseWheel (false) + self.alturaAntiga = _baseframe:GetHeight() - self.barras = {} - self.barraS = {nil, nil} - self.barrasInfo.cabem = nil - - self.consolidate = self.consolidate or false - self.icons = self.icons or {true, true, true, true} - - --> teste - --self.barrasInfo.altura = 14 - - self.barrasInfo.mostrando = 0 - self.barrasInfo.criadas = 0 - self.barrasInfo.alturaReal = self.barrasInfo.altura+self.barrasInfo.espaco.entre - - self.color = self.color or {1, 1, 1, 1} - self.wallpaper = self.wallpaper or { - enabled = false, - texture = nil, - anchor = "all", - alpha = 0.5, - texcoord = {0, 1, 0, 1}, - width = 0, - height = 0, - overlay = {1, 1, 1, 1} - } - + --> change the attribute + _detalhes:TrocaTabela (self, self.segmento, self.atributo, self.sub_atributo, true) --> passando true no 5º valor para a função ignorar a checagem de valores iguais + + --> set wallpaper if (self.wallpaper.enabled) then self:InstanceWallpaper (true) end + --> set the color of this instance window self:InstanceColor (self.color) - self.largura_scroll = 26 - self.bar_mod = 0 + --> scrollbar self:EsconderScrollBar (true) - - self.bgdisplay_loc = 0 - + + --> check snaps self.snap = self.snap or {nil, nil, nil, nil} FixSnaps (self) - - ---> salva o tamanho antigo da janela - self.alturaAntiga = _baseframe:GetHeight() - - -- status bar + + --> status bar stuff self.StatusBar = {} self.StatusBar.left = nil self.StatusBar.center = nil @@ -978,14 +852,8 @@ function _detalhes:RestauraJanela (index, temp) end local dps = _detalhes.StatusBar:CreateStatusBarChildForInstance (self, self.StatusBarSaved.right or "DETAILS_STATUSBAR_PLUGIN_PDPS") _detalhes.StatusBar:SetRightPlugin (self, dps, true) - -- - - if (not self.last_modo) then - self.last_modo = modo_all - end - self.barrasInfo.altura = self.barrasInfo.altura or 14 - self.barrasInfo.alturaReal = self.barrasInfo.altura+self.barrasInfo.espaco.entre + --> load mode if (self.modo == modo_alone) then if (_detalhes.solo and _detalhes.solo ~= self.meu_id) then --> proteção para ter apenas uma instância com a janela SOLO @@ -1001,6 +869,7 @@ function _detalhes:RestauraJanela (index, temp) self.mostrando = "normal" end + --> internal stuff self:RestoreMainWindowPosition() self:ReajustaGump() self:SaveMainWindowPosition() @@ -1011,7 +880,11 @@ function _detalhes:RestauraJanela (index, temp) self:AtivarInstancia (temp) self:ChangeSkin() - end + + --> all done + +end + ------------------------------------------------------------------------------------------------------------------------ function _detalhes:InstanceReset (instance) @@ -1029,40 +902,18 @@ function _detalhes:RefreshBars (instance) if (instance) then self = instance end - if (self.barras and self.barras[1]) then - - local altura = self.barrasInfo.altura - - for index, row in _ipairs (self.barras) do - - local y = self.barrasInfo.alturaReal * (row.row_id - 1) - y = y*-1 - row:SetPoint ("TOPLEFT", self.baseframe, "TOPLEFT", self.barrasInfo.espaco.esquerda, y) - row:SetHeight (altura) - row.icone_classe:SetHeight (altura) - row.icone_classe:SetWidth (altura) - row.icone_terceiro:SetHeight (altura) - row.icone_terceiro:SetWidth (altura) - - row.textura:SetTexture (self.barrasInfo.textura) - - row.background:SetTexture (self.barrasInfo.texturaBackground) - if (not self.barrasInfo.texturaBackgroundByClass) then - local c = self.barrasInfo.texturaBackgroundColor - row.background:SetVertexColor (c[1], c[2], c[3], c[4]) - else - local c = self.barrasInfo.texturaBackgroundColor - local r, g, b = row.background:GetVertexColor() - row.background:SetVertexColor (r, g, b, c[4]) - end - - row.texto_esquerdo:SetFont (self.barrasInfo.font or "GameFontHighlight", self.barrasInfo.fontSize or altura * 0.75) - row.texto_direita:SetFont (self.barrasInfo.font or "GameFontHighlight", self.barrasInfo.fontSize or altura * 0.75) - end - end + self:InstanceRefreshRows (instancia) end function _detalhes:SetBackgroundColor (...) + + local red = select (1, ...) + if (not red) then + self.bgdisplay:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, self.bg_alpha) + self.baseframe:SetBackdropColor (self.bg_r, self.bg_g, self.bg_b, self.bg_alpha) + return + end + local r, g, b = gump:ParseColors (...) self.bgdisplay:SetBackdropColor (r, g, b, self.bg_alpha or _detalhes.default_bg_alpha) self.baseframe:SetBackdropColor (r, g, b, self.bg_alpha or _detalhes.default_bg_alpha) @@ -1072,21 +923,15 @@ function _detalhes:SetBackgroundColor (...) end function _detalhes:SetBackgroundAlpha (alpha) - - --self.bgdisplay:SetBackdropColor (1, 1, 1, 1) - - alpha = alpha or _detalhes.default_bg_alpha - - --print ("antes",alpha) - alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8 - --print ("depois",alpha) + if (not alpha) then + alpha = self.bg_alpha + else + alpha = _detalhes:Scale (0, 1, 0.2, 1, alpha) - 0.8 + end self.bgdisplay:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha) self.baseframe:SetBackdropColor (self.bg_r or _detalhes.default_bg_color, self.bg_g or _detalhes.default_bg_color, self.bg_b or _detalhes.default_bg_color, alpha) self.bg_alpha = alpha - - --local r, g, b, a = self.bgdisplay:GetBackdropColor() - --print (a) end function _detalhes:GetSize() diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua new file mode 100644 index 00000000..5d09eea8 --- /dev/null +++ b/classes/classe_instancia_include.lua @@ -0,0 +1,122 @@ + +local _detalhes = _G._detalhes +local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") + +function _detalhes:ResetInstanceConfig() + for key, value in pairs (table_deepcopy (_detalhes.instance_defaults)) do + self [key] = value + end +end + +function _detalhes:LoadInstanceConfig() + for key, value in pairs (_detalhes.instance_defaults) do + if (self [key] == nil) then + if (type (value) == "table") then + self [key] = table_deepcopy (_detalhes.instance_defaults [key]) + else + self [key] = value + end + end + end +end + +_detalhes.instance_defaults = { + + --skin + skin = "Default Skin", + --baseframe backdrop color + bg_alpha = 0.7, + bg_r = 0.0941, + bg_g = 0.0941, + bg_b = 0.0941, + --auto current + auto_current = true, + --show sidebars + show_sidebars = true, + --show bottom statusbar + show_statusbar = true, + --blackwhiite icons + desaturated_menu = false, + --hide main window attribute icon + hide_icon = false, + --anchor side of main window toolbar (1 = top 2 = bottom) + toolbar_side = 1, + --stretch button anchor side (1 = top 2 = bottom) + stretch_button_side = 1, + --where plugins icon will be placed on main window toolbar (1 = left 2 = right) + plugins_grow_direction = 2, + --grow direction of main window bars (1 = top to bottom 2 = bottom to top) + bars_grow_direction = 1, + --sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top) + bars_sort_direction = 1, + --reset button info + resetbutton_info = {text_color = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}, always_small = false}, + --instance button info + instancebutton_info = {text_color = {1, 0.82, 0, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {1, 1, 1, 1}}, + --close button info + closebutton_info = {color_overlay = {1, 1, 1, 1}}, + --menu anchor store the anchor point of main menu + menu_anchor = {5, 1}, + --instance button anchor store the anchor point of instance and delete button + instance_button_anchor = {-27, 1}, + --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}, + --left text class color + textL_class_colors = false, + --right text class color + textR_class_colors = false, + --if text class color are false, this color will be used + fixed_text_color = {1, 1, 1}, + --left text outline effect + textL_outline = true, + --right text outline effect + textR_outline = false, + --bar height + height = 14, + --font size + font_size = 10, + --font face (name) + font_face = "Arial Narrow", + --font face (file) + font_face_file = SharedMedia:Fetch ("font", "Arial Narrow"), + --bar texture + texture = "Details D'ictum", + --bar texture name + texture_file = [[Interface\AddOns\Details\images\bar4]], + --bar texture on mouse over + texture_highlight = [[Interface\FriendsFrame\UI-FriendsList-Highlight]], + --bar background texture + texture_background = "Details D'ictum", + --bar background file + texture_background_file = [[Interface\AddOns\Details\images\bar4]], + --bar background class color + texture_background_class_color = true, + --fixed texture color for background texture + fixed_texture_background_color = {0, 0, 0, 0}, + --space between bars + space = {left = 3, right = -5, between = 1} + + }, + --instance window color + color = {1, 1, 1, 1}, + --wallpaper + wallpaper = { + enabled = false, + texture = nil, + anchor = "all", + alpha = 0.5, + texcoord = {0, 1, 0, 1}, + width = 0, + height = 0, + overlay = {1, 1, 1, 1} + }, + --tooltip amounts + tooltip = { + ["n_abilities"] = 3, + ["n_enemies"] = 3 + } +} \ No newline at end of file diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 710d8f00..505b267a 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -462,10 +462,18 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo local qual_barra = 1 local barras_container = instancia.barras - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - atributo_misc:DeadAtualizarBarra (mortes[i], qual_barra, i, instancia) - --conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, true) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + if (instancia.bars_sort_direction == 1) then + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado + atributo_misc:DeadAtualizarBarra (mortes[i], qual_barra, i, instancia) + qual_barra = qual_barra+1 + end + + elseif (instancia.bars_sort_direction == 2) then + for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado + atributo_misc:DeadAtualizarBarra (mortes[i], qual_barra, i, instancia) + qual_barra = qual_barra+1 + end + end return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh @@ -554,9 +562,18 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo local qual_barra = 1 local barras_container = instancia.barras - 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) --> instância, index, total, valor da 1º barra - qual_barra = qual_barra+1 + 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) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + 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) --> instância, index, total, valor da 1º barra + qual_barra = qual_barra+1 + end + end if (instancia.atributo == 5) then --> custom @@ -573,7 +590,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo --> beta, hidar barras não usadas durante um refresh forçado if (forcar) then if (instancia.modo == 2) then --> group - for i = qual_barra, instancia.barrasInfo.cabem do + for i = qual_barra, instancia.rows_fit_in_window do gump:Fade (instancia.barras [i], "in", 0.3) end end @@ -664,10 +681,10 @@ function atributo_misc:RefreshBarra2 (esta_barra, instancia, tabela_anterior, fo esta_barra.statusbar:SetValue (esta_porcentagem) gump:Fade (esta_barra, "out") - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -723,10 +740,10 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize) end end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.barrasInfo.texturaBackgroundByClass) then + if (instancia.row_info.texture_background_class_color) then esta_barra.background:SetVertexColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end @@ -768,22 +785,22 @@ function atributo_misc:RefreshBarra (esta_barra, instancia, from_resize) if (self.enemy) then if (_detalhes.faction_against == "Horde") then - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:0:32:0:32|t"..self.displayName) --seta o texto da esqueda -- HORDA else - esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.barrasInfo.altura..":"..instancia.barrasInfo.altura..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY + esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". |TInterface\\AddOns\\Details\\images\\icones_barra:"..instancia.row_info.height..":"..instancia.row_info.height..":0:0:256:32:32:64:0:32|t"..self.displayName) --seta o texto da esqueda -- ALLY end - if (instancia.row_texture_class_colors) then + if (instancia.row_info.texture_class_colors) then esta_barra.textura:SetVertexColor (240/255, 0, 5/255, 1) end else esta_barra.texto_esquerdo:SetText (esta_barra.colocacao..". "..self.displayName) --seta o texto da esqueda end - if (instancia.row_textL_class_colors) then + if (instancia.row_info.textL_class_colors) then esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end - if (instancia.row_textR_class_colors) then + if (instancia.row_info.textR_class_colors) then esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) end diff --git a/core/control.lua b/core/control.lua index a8fef0c3..a7329817 100644 --- a/core/control.lua +++ b/core/control.lua @@ -808,7 +808,7 @@ --> primeira atualização após uma mudança de segmento --> verifica se há mais barras sendo mostradas do que o necessário -------------------- if (instancia.v_barras) then - for barra_numero = instancia.barrasInfo.mostrando+1, instancia.barrasInfo.criadas do + for barra_numero = instancia.rows_showing+1, instancia.rows_created do _detalhes.gump:Fade (instancia.barras[barra_numero], "in") end instancia.v_barras = false @@ -904,4 +904,4 @@ function _detalhes:UpdateControl() _tempo = _detalhes._tempo - end \ No newline at end of file + end diff --git a/core/plugins_raid.lua b/core/plugins_raid.lua index c7c5a1f1..450eae88 100644 --- a/core/plugins_raid.lua +++ b/core/plugins_raid.lua @@ -74,16 +74,16 @@ instancia:DefaultIcons (true, true, true, true) --> calcula se existem barras, etc... - if (not instancia.barrasInfo.cabem) then --> as barras não forma iniciadas ainda - instancia.barrasInfo.cabem = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.barrasInfo.alturaReal) - if (instancia.barrasInfo.criadas < instancia.barrasInfo.cabem) then - for i = #instancia.barras+1, instancia.barrasInfo.cabem do + if (not instancia.rows_fit_in_window) then --> as barras não forma iniciadas ainda + instancia.rows_fit_in_window = _math_floor (instancia.baseframe.BoxBarrasAltura / instancia.row_height) + if (instancia.rows_created < instancia.rows_fit_in_window) then + for i = #instancia.barras+1, instancia.rows_fit_in_window do local nova_barra = gump:CriaNovaBarra (instancia, i, 30) --> cria nova barra nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"]) nova_barra.statusbar:SetValue (100) instancia.barras [i] = nova_barra end - instancia.barrasInfo.criadas = #instancia.barras + instancia.rows_created = #instancia.barras end end diff --git a/core/plugins_solo.lua b/core/plugins_solo.lua index b56aed23..a070aeca 100644 --- a/core/plugins_solo.lua +++ b/core/plugins_solo.lua @@ -124,16 +124,16 @@ end --> calcula se existem barras, etc... - if (not self.barrasInfo.cabem) then --> as barras não forma iniciadas ainda - self.barrasInfo.cabem = _math_floor (self.baseframe.BoxBarrasAltura / self.barrasInfo.alturaReal) - if (self.barrasInfo.criadas < self.barrasInfo.cabem) then - for i = #self.barras+1, self.barrasInfo.cabem do + if (not self.rows_fit_in_window) then --> as barras não forma iniciadas ainda + self.rows_fit_in_window = _math_floor (self.baseframe.BoxBarrasAltura / self.row_height) + if (self.rows_created < self.rows_fit_in_window) then + for i = #self.barras+1, self.rows_fit_in_window do local nova_barra = gump:CriaNovaBarra (self, i, 30) --> cria nova barra nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"]) nova_barra.statusbar:SetValue (100) self.barras [i] = nova_barra end - self.barrasInfo.criadas = #self.barras + self.rows_created = #self.barras end end end diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index 661e6507..9ca4d7d0 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -28,6 +28,23 @@ --[[ This file contains Api and Internal functions, plus 4 built-in plugins You can use this four plugins to learn how they works--]] + --> hida all micro frames + function _detalhes.StatusBar:Hide (instance, side) + if (not side) then + instance.StatusBar.center.frame:Hide() + instance.StatusBar.left.frame:Hide() + instance.StatusBar.right.frame:Hide() + end + end + + function _detalhes.StatusBar:Show (instance, side) + if (not side) then + instance.StatusBar.center.frame:Show() + instance.StatusBar.left.frame:Show() + instance.StatusBar.right.frame:Show() + end + end + --> create a plugin child for an instance function _detalhes.StatusBar:CreateStatusBarChildForInstance (instance, pluginName) local PluginObject = _detalhes.StatusBar.NameTable [pluginName] @@ -257,6 +274,21 @@ return true end + --> reset micro frames + function _detalhes.StatusBar:Reset (instance) + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textcolor", {1, 0.82, 0, 1}) + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.center, "textcolor", {1, 0.82, 0, 1}) + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.right, "textcolor", {1, 0.82, 0, 1}) + + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textface", "Friz Quadrata TT") + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.center, "textface", "Friz Quadrata TT") + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.right, "textface", "Friz Quadrata TT") + + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.left, "textsize", 9) + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.center, "textsize", 9) + _detalhes.StatusBar:ApplyOptions (instance.StatusBar.right, "textsize", 9) + end + --> build-in function for create a frame for an plugin child function _detalhes.StatusBar:CreateChildFrame (instance, name, w, h) local frame = _detalhes.gump:NewPanel (instance.baseframe.cabecalho.fechar, nil, name..instance:GetInstanceId(), nil, w or DEFAULT_CHILD_WIDTH, h or DEFAULT_CHILD_HEIGHT, false) @@ -334,7 +366,8 @@ if (value) then child.options.textColor = value end - child.text:SetTextColor (unpack (child.options.textColor)) + local r, g, b, a = _detalhes.gump:ParseColors (child.options.textColor) + child.text:SetTextColor (r, g, b, a) elseif (option == "textsize") then if (value) then child.options.textSize = value diff --git a/core/plugins_toolbar.lua b/core/plugins_toolbar.lua index 973264d9..9ea0ae5f 100644 --- a/core/plugins_toolbar.lua +++ b/core/plugins_toolbar.lua @@ -52,6 +52,10 @@ FourCornerAnimeFrame.glow:SetScript ("OnFinished", nil) button.blink = FourCornerAnimeFrame + _detalhes.ToolBar.AllButtons [#_detalhes.ToolBar.AllButtons+1] = button + + + return button end @@ -160,7 +164,7 @@ _detalhes.ToolBar:ReorganizeIcons() end - function _detalhes.ToolBar:ReorganizeIcons (lastIcon) + function _detalhes.ToolBar:ReorganizeIcons (lastIcon) --> get the lower number instance local lower_instance = _detalhes:GetLowerInstanceNumber() @@ -182,25 +186,49 @@ local LastIcon local x = 0 - if (instance.consolidate) then - LastIcon = instance.consolidateButtonTexture - x = -3 - else - LastIcon = instance.lastIcon or instance.baseframe.cabecalho.report - end + + if (instance.plugins_grow_direction == 2) then --> right direction + + if (instance.consolidate) then + LastIcon = instance.consolidateButtonTexture + x = -3 + else + LastIcon = instance.lastIcon or instance.baseframe.cabecalho.report + end + + for _, ThisButton in ipairs (_detalhes.ToolBar.Shown) do + ThisButton:ClearAllPoints() + ThisButton:SetPoint ("left", LastIcon, "right", ThisButton.x + x, ThisButton.y) + ThisButton:Show() + LastIcon = ThisButton + end + + elseif (instance.plugins_grow_direction == 1) then --> left direction + + if (instance.consolidate) then + LastIcon = instance.consolidateButtonTexture + else + LastIcon = instance.baseframe.cabecalho.modo_selecao.widget + end - for _, ThisButton in ipairs (_detalhes.ToolBar.Shown) do - ThisButton:SetPoint ("left", LastIcon, "right", ThisButton.x + x, ThisButton.y) - ThisButton:Show() - LastIcon = ThisButton + for _, ThisButton in ipairs (_detalhes.ToolBar.Shown) do + ThisButton:ClearAllPoints() + ThisButton:SetPoint ("right", LastIcon, "left", ThisButton.x + x, ThisButton.y) + ThisButton:Show() + LastIcon = ThisButton + end end + + end for _, instancia in pairs (_detalhes.tabela_instancias) do if (instancia.baseframe and instancia:IsAtiva()) then - instancia:ReajustaGump() -- aqui + instancia:ReajustaGump() end end + instance:ChangeSkin() + return true end diff --git a/core/util.lua b/core/util.lua index 95f59e2d..58b71f11 100644 --- a/core/util.lua +++ b/core/util.lua @@ -160,6 +160,7 @@ outline = "THICKOUTLINE" end end + fontString:SetFont (fonte, size, outline) end @@ -309,7 +310,7 @@ --[[ test grayscale ]] function _detalhes:teste_grayscale() local instancia = _detalhes.tabela_instancias[1] - for i = 1, instancia.barrasInfo.criadas, 1 do + for i = 1, instancia.rows_created, 1 do local barra = instancia.barras[i] local red, green, blue, alpha = barra.textura:GetVertexColor() local grayscale = (red*0.03+green+blue) / 3 --> grayscale lightness method @@ -467,19 +468,19 @@ if (frame.meu_id) then --> ups, é uma instância if (parametros == "barras") then --> hida todas as barras da instância if (velocidade) then - for i = 1, frame.barrasInfo.criadas, 1 do + for i = 1, frame.rows_created, 1 do gump:Fade (frame.barras[i], tipo, velocidade) end return else velocidade = velocidade or 0.3 - for i = 1, frame.barrasInfo.criadas, 1 do + for i = 1, frame.rows_created, 1 do gump:Fade (frame.barras[i], tipo, 0.3+(i/10)) end return end elseif (parametros == "hide_barras") then --> hida todas as barras da instância - for i = 1, frame.barrasInfo.criadas, 1 do + for i = 1, frame.rows_created, 1 do local esta_barra = frame.barras[i] if (esta_barra.fading_in or esta_barra.fading_out) then esta_barra.fadeInfo.finishedFunc = nil @@ -505,7 +506,7 @@ if (frame == "all") then --> todas as instâncias for _, instancia in _ipairs (_detalhes.tabela_instancias) do if (parametros == "barras") then --> hida todas as barras da instância - for i = 1, instancia.barrasInfo.criadas, 1 do + for i = 1, instancia.rows_created, 1 do gump:Fade (instancia.barras[i], tipo, velocidade+(i/10)) end end diff --git a/core/windows.lua b/core/windows.lua index 784257dc..d045349f 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -244,9 +244,9 @@ end instancia.barraS = {nil, nil} --> zera o iterator - instancia.barrasInfo.mostrando = 0 --> resetou, então não esta mostranho nenhuma barra + instancia.rows_showing = 0 --> resetou, então não esta mostranho nenhuma barra - for i = 1, instancia.barrasInfo.criadas, 1 do --> limpa a referência do que estava sendo mostrado na barra + for i = 1, instancia.rows_created, 1 do --> limpa a referência do que estava sendo mostrado na barra local esta_barra= instancia.barras[i] esta_barra.minha_tabela = nil end @@ -264,7 +264,7 @@ if (self.mostrando == "normal") then --> somente alterar o tamanho das barras se tiver mostrando o gump normal if (self.meu_id == _detalhes.ResetButtonInstance) then - if (self.baseframe:GetWidth() < 215) then + if (self.baseframe:GetWidth() < 215 or self.resetbutton_info.always_small) then gump:Fade (_detalhes.ResetButton, 1) gump:Fade (_detalhes.ResetButton2, 0) _detalhes.ResetButtonMode = 2 @@ -321,6 +321,10 @@ end end + if (self.stretch_button_side == 2) then + self:StretchButtonAnchor (2) + end + if (self.freezed) then --> reajusta o freeze _detalhes:Freeze (self) @@ -329,50 +333,54 @@ -- -4 difere a precisão de quando a barra será adicionada ou apagada da barra self.baseframe.BoxBarrasAltura = self.baseframe:GetHeight()-4 - local T = self.barrasInfo.cabem + local T = self.rows_fit_in_window if (not T) then --> primeira vez que o gump esta sendo reajustado - T = _math_floor (self.baseframe.BoxBarrasAltura / self.barrasInfo.alturaReal) + T = _math_floor (self.baseframe.BoxBarrasAltura / self.row_height) -- o que mais precisa por aqui? end --> reajustar o local do relógio local meio = self.baseframe:GetWidth() / 2 local novo_local = meio - 25 - self.barrasInfo.cabem = _math_floor ( self.baseframe.BoxBarrasAltura / self.barrasInfo.alturaReal) + self.rows_fit_in_window = _math_floor ( self.baseframe.BoxBarrasAltura / self.row_height) - if (self.barrasInfo.cabem > #self.barras) then--> verifica se precisa criar mais barras - for i = #self.barras+1, self.barrasInfo.cabem, 1 do - local nova_barra = gump:CriaNovaBarra (self, i, 30) --> cria nova barra - nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"]) --seta o texto da esqueda - nova_barra.statusbar:SetValue (100) - self.barras [i] = nova_barra + --if (not _detalhes.initializing) then + + if (self.rows_fit_in_window > #self.barras) then--> verifica se precisa criar mais barras + for i = #self.barras+1, self.rows_fit_in_window, 1 do + local nova_barra = gump:CriaNovaBarra (self, i, 30) --> cria nova barra + nova_barra.texto_esquerdo:SetText (Loc ["STRING_NEWROW"]) --seta o texto da esqueda + nova_barra.statusbar:SetValue (100) + self.barras [i] = nova_barra + end + self.rows_created = #self.barras end - self.barrasInfo.criadas = #self.barras - end - - --> seta a largura das barras - if (self.bar_mod and self.bar_mod ~= 0) then - for index = 1, self.barrasInfo.cabem do - self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.bar_mod) + + --> seta a largura das barras + if (self.bar_mod and self.bar_mod ~= 0) then + for index = 1, self.rows_fit_in_window do + self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.bar_mod) + end + else + for index = 1, self.rows_fit_in_window do + self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.row_info.space.right) + end end - else - for index = 1, self.barrasInfo.cabem do - self.barras [index]:SetWidth (self.baseframe:GetWidth()+self.barrasInfo.espaco.direita) - end - end + + --end local A = self.barraS[1] if (not A) then --> primeira vez que o resize esta sendo usado, no caso no startup do addon ou ao criar uma nova instância --> hida as barras não usadas - for i = 1, self.barrasInfo.criadas, 1 do + for i = 1, self.rows_created, 1 do gump:Fade (self.barras [i], 1) self.barras [i].on = false - end + end return end - local X = self.barrasInfo.mostrando - local C = self.barrasInfo.cabem + local X = self.rows_showing + local C = self.rows_fit_in_window --> novo iterator local barras_diff = C - T --> aqui pega a quantidade de barras, se aumentou ou diminuiu @@ -465,31 +473,7 @@ else tabela:RefreshBarra (esta_barra, self, true) end - - if (esta_barra.minha_tabela.enemy) then - --if (i == 1) then - --print (esta_barra.texto_esquerdo:GetWrappedWidth()) - --end - - --esta_barra.texto_esquerdo:SetText (esta_barra.colocacao.."."..esta_barra.minha_tabela.nome.." |TInterface\\PVPFrame\\PVP-Currency-Horde:14:14|t") --seta o texto da esqueda - --local texto_len = esta_barra.texto_esquerdo:GetStringWidth() - --if (esta_barra.texto_esquerdo:IsTruncated()) then - --local tamanho = esta_barra:GetWidth()-esta_barra.texto_direita:GetStringWidth()-16-esta_barra:GetHeight() - --esta_barra.icone_secundario:SetPoint ("left", esta_barra.texto_esquerdo, "left", tamanho-2, 0) - --print ("aqui") - --else - --print ("aqui") - --if (i == 1) then - --print (esta_barra.texto_esquerdo:GetStringWidth()) --debug - --print (esta_barra.texto_esquerdo:GetText()) - --end - --local fonte, size, flags = esta_barra.texto_esquerdo:GetFont() - --print (fonte, size, flags) - --esta_barra.icone_secundario:SetPoint ("left", esta_barra.texto_esquerdo, "left", esta_barra.texto_esquerdo:GetStringWidth()+3, 0) - --esta_barra.texto_esquerdo:SetText (esta_barra.colocacao.."."..esta_barra.minha_tabela.nome.." |TInterface\\PVPFrame\\PVP-Currency-Horde:14:14|t") --seta o texto da esqueda - --end - end end qual_barra = qual_barra+1 @@ -661,4 +645,4 @@ _detalhes:ScheduleTimer ("delay_tutorial", 20) end - end \ No newline at end of file + end diff --git a/framework/cooltip.lua b/framework/cooltip.lua index 7d7aaf5b..b0db57b1 100644 --- a/framework/cooltip.lua +++ b/framework/cooltip.lua @@ -232,7 +232,7 @@ function DetailsCreateCoolTip() CoolTip.buttonClicked = false frame1:SetScript ("OnEnter", function (self) - if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then + if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then --> menu CoolTip.active = true CoolTip.mouseOver = true self:SetScript ("OnUpdate", nil) @@ -2359,7 +2359,7 @@ function DetailsCreateCoolTip() end if (self.CoolTip.OnLeaveFunc) then - self.CoolTip.OnLeaveFunc() + self.CoolTip.OnLeaveFunc (self) end if (self.OldOnLeaveScript) then @@ -2378,7 +2378,7 @@ function DetailsCreateCoolTip() end if (self.CoolTip.OnEnterFunc) then - self.CoolTip.OnEnterFunc() + self.CoolTip.OnEnterFunc (self) end if (self.OldOnEnterScript) then diff --git a/framework/slider.lua b/framework/slider.lua index ca4e7726..9889568e 100644 --- a/framework/slider.lua +++ b/framework/slider.lua @@ -367,19 +367,24 @@ local SliderMetaFunctions = {} editbox:SetScript ("OnEnterPressed", function() editbox:ClearFocus() editbox:Hide() - editbox:GetParent().MyObject.value = tonumber (editbox:GetText()) editbox:GetParent().MyObject.typing_value = false + editbox:GetParent().MyObject.value = tonumber (editbox:GetText()) end) editbox:SetScript ("OnEscapePressed", function() editbox:ClearFocus() editbox:Hide() editbox:GetParent().MyObject.typing_value = false + editbox:GetParent().MyObject.value = tonumber (self.typing_value_started) end) SliderMetaFunctions.editbox_typevalue = editbox end + local pvalue = self.previous_value [2] + self:SetValue (pvalue) + self.typing_value = true + self.typing_value_started = pvalue SliderMetaFunctions.editbox_typevalue:SetSize (self.width, self.height) SliderMetaFunctions.editbox_typevalue:SetPoint ("center", self.widget, "center") @@ -405,6 +410,14 @@ local SliderMetaFunctions = {} end end + local OnMouseUp = function (slider, button) + --if (button == "RightButton") then + -- if (slider.MyObject.typing_value) then + -- slider.MyObject:SetValue (slider.MyObject.previous_value [2]) + -- end + --end + end + local OnHide = function (slider) if (slider.MyObject.OnHideHook) then local interrupt = slider.MyObject.OnHideHook (slider) @@ -429,10 +442,20 @@ local SliderMetaFunctions = {} end end + local table_insert = table.insert + local table_remove = table.remove + local OnValueChanged = function (slider) local amt = slider:GetValue() + + if (slider.MyObject.typing_value) then + return slider.MyObject:SetValue (slider.MyObject.typing_value_started) + end + table_insert (slider.MyObject.previous_value, 1, amt) + table_remove (slider.MyObject.previous_value, 4) + if (slider.MyObject.OnValueChangeHook) then local interrupt = slider.MyObject.OnValueChangeHook (slider, slider.MyObject.FixedValue, amt) if (interrupt) then @@ -457,7 +480,7 @@ local SliderMetaFunctions = {} ------------------------------------------------------------------------------------------------------------ --> object constructor -function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defaultv) +function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defaultv, color_inverted) --> early checks if (not name) then @@ -484,22 +507,33 @@ function gump:NewSwitch (parent, container, name, member, w, h, ltext, rtext, de --> build frames local slider = gump:NewSlider (parent, container, name, member, w, h, 1, 2, 1, defaultv, nil, true) - slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8, + slider:SetBackdrop ({edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], edgeSize = 8, bgFile = [[Interface\AddOns\Details\images\background]], insets = {left = 3, right = 3, top = 5, bottom = 5}}) + slider.invert_colors = color_inverted + slider:SetHook ("OnValueChange", function (self) if (slider:GetValue() == 1) then slider.amt:SetText (ltext) if (slider.OnSwitch) then slider.OnSwitch (slider, slider.FixedValue, false) end - slider:SetBackdropColor (1, 0, 0, 0.4) + if (not slider.invert_colors) then + slider:SetBackdropColor (1, 0, 0, 0.4) + else + slider:SetBackdropColor (0, 0, 1, 0.4) + end else slider.amt:SetText (rtext) if (slider.OnSwitch) then slider.OnSwitch (slider, slider.FixedValue, true) end - slider:SetBackdropColor (0, 0, 1, 0.4) + + if (not slider.invert_colors) then + slider:SetBackdropColor (0, 0, 1, 0.4) + else + slider:SetBackdropColor (1, 0, 0, 0.4) + end end return true end) @@ -624,6 +658,8 @@ function gump:NewSlider (parent, container, name, member, w, h, min, max, step, SliderObject.amt:SetPoint ("center", SliderObject.thumb, "center") SliderObject.slider.amt = SliderObject.amt + SliderObject.previous_value = {defaultv or 0, 0, 0} + --> hooks SliderObject.slider:SetScript ("OnEnter", OnEnter) SliderObject.slider:SetScript ("OnLeave", OnLeave) @@ -631,6 +667,7 @@ function gump:NewSlider (parent, container, name, member, w, h, min, max, step, SliderObject.slider:SetScript ("OnShow", OnShow) SliderObject.slider:SetScript ("OnValueChanged", OnValueChanged) SliderObject.slider:SetScript ("OnMouseDown", OnMouseDown) + SliderObject.slider:SetScript ("OnMouseUp", OnMouseUp) _setmetatable (SliderObject, SliderMetaFunctions) diff --git a/functions/savedata.lua b/functions/savedata.lua index ff7e1603..39b8d5c7 100644 --- a/functions/savedata.lua +++ b/functions/savedata.lua @@ -30,8 +30,14 @@ end _detalhes_database.nick_tag_cache = _detalhes.nick_tag_cache _detalhes_database.only_pvp_frags = _detalhes.only_pvp_frags + --> minimap + _detalhes_database.minimap = _detalhes.minimap + --> save instances (windows) _detalhes_database.tabela_instancias = _detalhes.tabela_instancias + _detalhes_database.class_icons_small = _detalhes.class_icons_small + _detalhes_database.class_coords = _detalhes.class_coords + _detalhes_database.class_colors = _detalhes.class_colors --> character info _detalhes_database.character_data = _detalhes.character_data --> options data @@ -59,7 +65,6 @@ end -- colors _detalhes_database.default_bg_color = _detalhes.default_bg_color _detalhes_database.default_bg_alpha = _detalhes.default_bg_alpha - _detalhes_database.class_colors = _detalhes.class_colors -- fades _detalhes_database.row_fade_in = _detalhes.row_fade_in _detalhes_database.windows_fade_in = _detalhes.windows_fade_in @@ -165,7 +170,10 @@ end --]] _detalhes.nick_tag_cache = _detalhes_database.nick_tag_cache or {} _detalhes:NickTagSetCache (_detalhes.nick_tag_cache) _detalhes.only_pvp_frags = _detalhes_database.only_pvp_frags - + + --> minimap + _detalhes.minimap = _detalhes_database.minimap + --> character info _detalhes.character_data = _detalhes_database.character_data @@ -195,7 +203,10 @@ end --]] --> instances (windows) _detalhes.tabela_instancias = _detalhes_database.tabela_instancias or {} - + _detalhes.class_icons_small = _detalhes_database.class_icons_small + _detalhes.class_coords = _detalhes_database.class_coords + _detalhes.class_colors = _detalhes_database.class_colors + --> get last combat table local historico_UM = _detalhes.tabela_historico.tabelas[1] @@ -247,7 +258,6 @@ end --]] _detalhes.report_lines = _detalhes_database.report_lines _detalhes.report_to_who = _detalhes_database.report_to_who -- colors - _detalhes.class_colors = _detalhes_database.class_colors _detalhes.default_bg_color = _detalhes_database.default_bg_color _detalhes.default_bg_alpha = _detalhes_database.default_bg_alpha -- fades @@ -367,4 +377,113 @@ function _detalhes:WipeConfig() b:SetScript ("OnClick", function() _detalhes.wipe_full_config = true; ReloadUI(); end) b:SetPoint ("center", UIParent, "center", 0, 0) +end + +function _detalhes:ApplyConfigDataOnLoad() + + --> basic + self.instances_amount = self.instances_amount or 12 + self.segments_amount = self.segments_amount or 12 + self.segments_amount_to_save = self.segments_amount_to_save or 5 + self.memory_threshold = self.memory_threshold or 3 + self.memory_ram = self.memory_ram or 64 + 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.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} + self.windows_fade_out = self.windows_fade_out or {"out", 0.2} + self.default_bg_color = self.default_bg_color or 0.0941 + self.default_bg_alpha = self.default_bg_alpha or 0.7 + self.new_window_size = self.new_window_size or {width = 300, height = 95} + self.max_window_size = self.max_window_size or {width = 480, height = 450} + self.window_clamp = self.window_clamp or {-8, 0, 21, -14} + self.window_clamp = {-8, 0, 21, -14} + self.report_lines = self.report_lines or 5 + self.report_to_who = self.report_to_who or "" + self.animate_scroll = self.animate_scroll or false + self.use_scroll = self.use_scroll or false + self.font_sizes = self.font_sizes or {menus = 10} + self.minimap = self.minimap or {hide = false, radius = 160, minimapPos = 220} + + --> tutorial + self.tutorial = self.tutorial or {} + self.tutorial.logons = self.tutorial.logons or 0 + self.tutorial.unlock_button = self.tutorial.unlock_button or 0 + self.tutorial.version_announce = self.tutorial.version_announce or 0 + self.tutorial.main_help_button = self.tutorial.main_help_button or 0 + self.tutorial.alert_frames = self.tutorial.alert_frames or {false, false, false, false, false, false} + self.tutorial.logons = self.tutorial.logons + 1 + self.tutorial.main_help_button = self.tutorial.main_help_button + 1 + self.character_data = self.character_data or {logons = 0} + self.character_data.logons = self.character_data.logons + 1 + + --> class colors + if (not self.class_colors or not self.class_colors.version or self.class_colors.version < self.class_colors_version) then + self.class_colors = {version = 1} + for classe, tabela_cor in pairs ( RAID_CLASS_COLORS ) do + self.class_colors [classe] = {tabela_cor.r, tabela_cor.g, tabela_cor.b} + end + self.class_colors ["UNKNOW"] = {0.2, 0.2, 0.2} + self.class_colors ["UNGROUPPLAYER"] = {0.4, 0.4, 0.4} + self.class_colors ["PET"] = {0.3, 0.4, 0.5} + self.class_colors ["ENEMY"] = {0.94117, 0, 0.01960, 1} + end + + self.class_icons_small = self.class_icons_small or [[Interface\AddOns\Details\images\classes_small]] + + --> class coords + if (not self.class_coords or not self.class_coords.version or self.class_coords.version < self.class_coords_version) then + self.class_coords = {} + for class, tcoord in pairs (_G.CLASS_ICON_TCOORDS) do + self.class_coords [class] = tcoord + end + + self.class_coords ["Alliance"] = {0.49609375, 0.7421875, 0.75, 1} + self.class_coords ["Horde"] = {0.7421875, 0.98828125, 0.75, 1} + self.class_coords ["PET"] = {0.25, 0.49609375, 0.75, 1} + self.class_coords ["MONSTER"] = {0, 0.25, 0.75, 1} + self.class_coords ["ENEMY"] = {0, 0.25, 0.75, 1} + self.class_coords ["UNKNOW"] = {0.5, 0.75, 0.75, 1} + self.class_coords ["UNGROUPPLAYER"] = {0.5, 0.75, 0.75, 1} + end + + --> booleans + if (type (self.trash_concatenate) ~= "boolean") then + self.trash_concatenate = false + end + if (type (self.trash_auto_remove) ~= "boolean") then + self.trash_auto_remove = false + end + + if (type (self.only_pvp_frags) ~= "boolean") then + self.only_pvp_frags = false + end + + if (type (self.remove_realm_from_name) ~= "boolean") then + self.remove_realm_from_name = true + end + + if (type (self.cloud_capture) ~= "boolean") then + self.cloud_capture = true + end + + if (type (self.segments_panic_mode) ~= "boolean") then + self.segments_panic_mode = true + end + + if (type (self.clear_graphic) ~= "boolean") then + self.clear_graphic = self.clear_graphic or true + end + + if (type (self.clear_ungrouped) ~= "boolean") then + self.clear_ungrouped = self.clear_ungrouped or true + end + + if (type (self.use_row_animations) ~= "boolean") then + self.use_row_animations = self.use_row_animations or false + end + end \ No newline at end of file diff --git a/functions/skins.lua b/functions/skins.lua index 7cd71d7c..32115335 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -38,7 +38,23 @@ local _ can_change_alpha_head = false, icon_anchor_main = {-1, 1}, icon_anchor_plugins = {-9, -7}, - icon_plugins_size = {19, 19} + icon_plugins_size = {19, 19}, + + -- the four anchors: + icon_point_anchor = {-37, 0}, + left_corner_anchor = {-107, 0}, + close_button_anchor = {5, -6}, + right_corner_anchor = {96, 0}, + + icon_point_anchor_bottom = {-37, 0}, + left_corner_anchor_bottom = {-107, 0}, + close_button_anchor_bottom = {5, 6}, + right_corner_anchor_bottom = {96, 0}, + + instance_cprops = { + menu_anchor = {5, 1}, + } + }) _detalhes:InstallSkin ("Flat Color", { @@ -47,21 +63,81 @@ local _ version = "1.0", site = "unknown", desc = "a flat skin", + + micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10}, + can_change_alpha_head = true, icon_anchor_main = {-1, -5}, icon_anchor_plugins = {-7, -13}, - icon_plugins_size = {19, 18} + icon_plugins_size = {19, 18}, + + -- the four anchors: + icon_point_anchor = {-37, 0}, + left_corner_anchor = {-107, 0}, + close_button_anchor = {5, -6}, + right_corner_anchor = {96, 0}, + + icon_point_anchor_bottom = {-37, 12}, + left_corner_anchor_bottom = {-107, 0}, + close_button_anchor_bottom = {5, 6}, + right_corner_anchor_bottom = {96, 0}, }) + -- 0.00048828125 + --reset 19 514 83 530 + --close + _detalhes:InstallSkin ("Simply Gray", { file = [[Interface\AddOns\Details\images\skins\simplygray_skin]], author = "Details!", version = "1.0", site = "unknown", desc = "a flat skin", + + --general can_change_alpha_head = true, - icon_anchor_main = {-1, -5}, - icon_anchor_plugins = {-7, -13}, - icon_plugins_size = {19, 18} + + --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 = {-37, 0}, + 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}, + + --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 = {.5, .5, .5, 1}}, + instancebutton_info = {text_color = {.7, .7, .7, 1}, text_face = "Friz Quadrata TT", text_size = 12, color_overlay = {.5, .5, .5, 1}}, + menu_anchor = {-18, 1}, + instance_button_anchor = {-27, 3}, + hide_icon = true, + } + }) \ No newline at end of file diff --git a/functions/slash.lua b/functions/slash.lua index 7bf0eae5..abf2173b 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -294,6 +294,18 @@ function SlashCmdList.DETAILS (msg, editbox) print (Loc ["STRING_DETAILS1"] .. "capture has been reseted.") --> debug + elseif (command == "barra") then + + local qual_barra = rest and tonumber (rest) or 1 + + local instancia = _detalhes.tabela_instancias [1] + local barra = instancia.barras [qual_barra] + + for i = 1, barra:GetNumPoints() do + local point, relativeTo, relativePoint, xOfs, yOfs = barra:GetPoint (i) + print (point, relativeTo, relativePoint, xOfs, yOfs) + end + elseif (msg == "opened") then print ("Instances opened: " .. _detalhes.opened_windows) diff --git a/gumps/fw_mods.lua b/gumps/fw_mods.lua index b7e9aca6..696eddb3 100644 --- a/gumps/fw_mods.lua +++ b/gumps/fw_mods.lua @@ -642,23 +642,23 @@ function gump:NewScrollBar (master, slave, x, y) slider_gump:SetScript ("OnEnable", function (self) botao_cima:Enable() botao_baixo:Enable() - end) + end) master:SetScript ("OnMouseWheel", function (self, delta) if (not slider_gump:IsEnabled()) then return end - + local current = slider_gump:GetValue() if (delta < 0) then - if (current < slider_gump.scrollMax+20) then - slider_gump:SetValue (current + 20) + if (current < slider_gump.scrollMax + (master.wheel_jump or 20)) then + slider_gump:SetValue (current + (master.wheel_jump or 20)) else slider_gump:SetValue (slider_gump.scrollMax) end elseif (delta > 0) then - if (current+20 > 0) then - slider_gump:SetValue (current - 20) + if (current + (master.wheel_jump or 20) > 0) then + slider_gump:SetValue (current - (master.wheel_jump or 20)) else slider_gump:SetValue (0) end diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 821bd376..fe0e5f7f 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -1252,7 +1252,7 @@ end local function CriaTexturaBarra (instancia, barra) barra.textura = _CreateFrame ("StatusBar", nil, barra) barra.textura:SetAllPoints (barra) - --barra.textura:SetStatusBarTexture (instancia.barrasInfo.textura) + --barra.textura:SetStatusBarTexture (instancia.row_info.texture_file) barra.textura:SetStatusBarTexture (_detalhes.default_texture) barra.textura:SetStatusBarColor(.5, .5, .5, 0) barra.textura:SetMinMaxValues(0,100) diff --git a/gumps/janela_news.lua b/gumps/janela_news.lua index 0f567531..c3c7a689 100644 --- a/gumps/janela_news.lua +++ b/gumps/janela_news.lua @@ -50,6 +50,15 @@ function _detalhes:CreateOrOpenNewsWindow() titulo:SetPoint ("center", frame, "center") titulo:SetPoint ("top", frame, "top", 0, -18) + --> reinstall textura + local textura = _detalhes.gump:NewImage (frame, _, "$parentExclamacao", nil, 64, 64, [[Interface\DialogFrame\DialogAlertIcon]]) + textura:SetPoint ("topleft", frame, "topleft", 60, -20) + --> reinstall aviso + local reinstall = _detalhes.gump:NewLabel (frame, nil, "$parentReinstall", nil, "", "GameFontHighlightLeft", 10) + reinstall:SetPoint ("left", textura, "right", 2, -2) + reinstall.text = Loc ["STRING_NEWS_REINSTALL"] + + local frame_upper = CreateFrame ("scrollframe", nil, frame) local frame_lower = CreateFrame ("frame", nil, frame_upper) frame_lower:SetSize (380, 390) diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index fbe60a1f..dd82f772 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -1,18 +1,14 @@ ---[[ - Como sera dividido o painel de opções: - - - - ---]] +--[[ options panel file --]] local _detalhes = _G._detalhes local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") +local LDB = LibStub ("LibDataBroker-1.1", true) +local LDBIcon = LDB and LibStub ("LibDBIcon-1.0", true) local g = _detalhes.gump local _ -local preset_version = 1 +local preset_version = 2 function _detalhes:OpenOptionsWindow (instance) @@ -102,10 +98,17 @@ function _detalhes:OpenOptionsWindow (instance) --> select instance dropbox local onSelectInstance = function (_, _, instance) + local this_instance = _detalhes.tabela_instancias [instance] + if (not this_instance.iniciada) then this_instance:RestauraJanela (instance) + + elseif (not this_instance:IsEnabled()) then + _detalhes.CriarInstancia (_, _, this_instance.meu_id) + end + _detalhes:OpenOptionsWindow (this_instance) end @@ -144,7 +147,7 @@ function _detalhes:OpenOptionsWindow (instance) return InstanceList end - local instances = g:NewDropDown (window, _, "$parentInstanceSelectDropdown", "instanceDropdown", 180, 18, buildInstanceMenu, nil) + local instances = g:NewDropDown (window, _, "$parentInstanceSelectDropdown", "instanceDropdown", 200, 18, buildInstanceMenu, nil) instances:SetPoint ("bottomright", window, "bottomright", -17, 13) local instances_string = g:NewLabel (window, nil, nil, "instancetext", Loc ["STRING_OPTIONS_EDITINSTANCE"], "GameFontNormal", 12) @@ -170,11 +173,13 @@ function _detalhes:OpenOptionsWindow (instance) instances_string:Hide() end + -- ~altura + if (options_type == 1) then window.options [1][1].slider:SetMinMaxValues (0, 110) elseif (options_type == 2) then - window.options [2][1].slider:SetMinMaxValues (0, 620) - window.options [2][1].slider.scrollMax = 620 + 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) end @@ -272,6 +277,7 @@ function _detalhes:OpenOptionsWindow (instance) container_window.slider:Altura (225) container_window.slider:cimaPoint (0, 1) container_window.slider:baixoPoint (0, -3) + container_window.wheel_jump = 80 container_window.ultimo = 0 container_window.gump = container_slave @@ -283,7 +289,7 @@ function _detalhes:OpenOptionsWindow (instance) 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)) - + function window:hide_options (options) for _, widget in ipairs (window.options [options]) do widget:Hide() @@ -300,7 +306,7 @@ function _detalhes:OpenOptionsWindow (instance) if (self.background_frame) then self = self.background_frame end - self:SetBackdropColor (0, 0, 0, 0) + if (self.parent and self.parent.info) then info_text.active = true info_text.text = self.parent.info @@ -310,10 +316,10 @@ function _detalhes:OpenOptionsWindow (instance) if (self.background_frame) then self = self.background_frame end - self:SetBackdropColor (0, 0, 0, 0) + --self:SetBackdropColor (0, 0, 0, 0) if (info_text.active) then info_text.active = false - info_text.text = "" + --info_text.text = "" end end @@ -510,136 +516,90 @@ function _detalhes:OpenOptionsWindow (instance) 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:NewSwitch (frame1, _, "$parentMinimapSlider", "minimapSlider", 60, 20, _, _, not _detalhes.minimap.hide) + frame1.minimapSlider:SetPoint ("left", frame1.minimapLabel, "right", 2, 0) + frame1.minimapSlider.OnSwitch = function (self, _, value) + _detalhes.minimap.hide = not value + + LDBIcon:Refresh ("Details!", _detalhes.minimap) + if (_detalhes.minimap.hide) then + LDBIcon:Hide ("Details!") + else + LDBIcon:Show ("Details!") + end + end + + frame1.minimapSlider.info = Loc ["STRING_OPTIONS_MINIMAP_DESC"] + + window:create_line_background (frame1, frame1.minimapLabel, frame1.minimapSlider) + frame1.minimapSlider:SetHook ("OnEnter", background_on_enter) + frame1.minimapSlider: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 - + --> create functions and frames first: - - local default_preset = { - ["font_fixed_text_color"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - }, - ["bar_background_by_class"] = false, - ["bar_background"] = "Details D'ictum", - ["font_textL_class"] = false, - ["wallpaper"] = { - ["enabled"] = false, - ["texcoord"] = { - 0, -- [1] - 1, -- [2] - 0, -- [3] - 1, -- [4] - }, - ["overlay"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - 1, -- [4] - }, - ["anchor"] = "all", - ["height"] = 0, - ["alpha"] = 0.5, - ["width"] = 0, - }, - ["instance_skin"] = "Default Skin", - ["name"] = "default", - ["instance_color"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - 1, -- [4] - }, - ["instance_bg_colors"] = { - 0.0941, -- [1] - 0.0941, -- [2] - 0.0941, -- [3] - }, - ["font_textR_class"] = false, - ["font_face"] = "Arial Narrow", - ["font_textR_outline"] = false, - ["font_size"] = 10.5, - ["font_textL_outline"] = false, - ["version"] = 1, - ["bar_fixed_texture_color"] = { - 0, -- [1] - 0, -- [2] - 0, -- [3] - }, - ["bar_background_color"] = { - 0, -- [1] - 0, -- [2] - 0, -- [3] - 0, -- [4] - }, - ["bar_color_by_class"] = true, - ["instance_alpha"] = 0.7599999904632568, - ["bar_texture"] = "Details D'ictum", - } - 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 w = window.instance.wallpaper - local savedObject = { - --> geral - version = 1, - name = frame2.saveStyleName.text, --> preset name - - --> bars - bar_texture = frame2.textureDropdown.value, - bar_color_by_class = window.instance.row_texture_class_colors, - bar_fixed_texture_color = {unpack (window.instance.fixed_row_texture_color)}, - bar_background = window.instance.barrasInfo.textureNameBackground, - bar_background_color = {unpack (window.instance.barrasInfo.texturaBackgroundColor)}, - bar_background_by_class = window.instance.barrasInfo.texturaBackgroundByClass, - - --> text - font_size = tonumber (frame2.fonsizeSlider.value), - font_face = frame2.fontDropdown.value, - font_textL_class = window.instance.row_textL_class_colors, - font_textR_class = window.instance.row_textR_class_colors, - font_textL_outline = window.instance.row_textL_outline, - font_textR_outline = window.instance.row_textR_outline, - font_fixed_text_color = {unpack (window.instance.fixed_row_text_color)}, - - --> instance - instance_color = {unpack (window.instance.color)}, - instance_bg_colors = {window.instance.bg_r, window.instance.bg_g, window.instance.bg_b}, - instance_alpha = tonumber (frame2.alphaSlider.value), - instance_skin = window.instance.skin, - - --> wallpaper - wallpaper = {texture = w.texture, enabled = w.enabled, texcoord = {unpack (w.texcoord)}, overlay = {unpack(w.overlay)}, anchor = w.anchor, height = w.height, alpha = w.alpha, width = w.width}, + 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 @@ -656,50 +616,39 @@ function _detalhes:OpenOptionsWindow (instance) 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 end - if (not style.version or preset_version > style.version) then - return _detalhes:Msg (Loc ["STRING_OPTIONS_PRESETTOOLD"]) + --> set skin preset + 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 - --> bars - instance.barrasInfo.textura = SharedMedia:Fetch ("statusbar", style.bar_texture) - instance.barrasInfo.textureName = style.bar_texture - instance.row_texture_class_colors = style.bar_color_by_class - instance.fixed_row_texture_color = {unpack (style.bar_fixed_texture_color)} - instance.barrasInfo.texturaBackground = SharedMedia:Fetch ("statusbar", style.bar_background) - instance.barrasInfo.textureNameBackground = style.bar_background - instance.barrasInfo.texturaBackgroundColor = {unpack (style.bar_background_color)} - instance.barrasInfo.texturaBackgroundByClass = style.bar_background_by_class - - --> texts - instance.barrasInfo.font = SharedMedia:Fetch ("font", style.font_face) - instance.barrasInfo.fontName = style.font_face - instance.barrasInfo.fontSize = tonumber (style.font_size) - instance.row_textL_class_colors = style.font_textL_class - instance.row_textR_class_colors = style.font_textR_class - instance.row_textL_outline = style.font_textL_outline - instance.row_textR_outline = style.font_textR_outline - instance.fixed_row_text_color = {unpack (style.font_fixed_text_color)} - - --> instance - instance:InstanceColor (style.instance_color) - instance:SetBackgroundAlpha (style.instance_alpha) - instance:SetBackgroundColor (style.instance_bg_colors) - instance:ChangeSkin (style.instance_skin) - - --> wallpaper - instance:InstanceWallpaper (style.wallpaper) - - --> refresh - instance:RefreshBars() - instance:InstanceReset() - instance:InstanceRefreshRows() + --> apply all changed attributes + instance:ChangeSkin() + --> reload options panel _detalhes:OpenOptionsWindow (instance) end + local resetToDefaults = function() + loadStyle (nil, window.instance, _detalhes.instance_defaults) + end + ------ apply to all button local applyToAll = function() @@ -715,11 +664,6 @@ function _detalhes:OpenOptionsWindow (instance) _detalhes:OpenOptionsWindow (current_instance) end - - local resetToDefaults = function() - loadStyle (nil, window.instance, default_preset) - _detalhes:OpenOptionsWindow (window.instance) - end --> save and load stuff g:NewTextEntry (frame2, _, "$parentSaveStyleName", "saveStyleName", nil, 20, _, _, _, 178) --width will be auto adjusted if space parameter is passed @@ -730,7 +674,7 @@ function _detalhes:OpenOptionsWindow (instance) g:NewButton (frame2, _, "$parentResetToDefaultButton", "resetToDefaults", 100, 14, resetToDefaults, nil, nil, nil, Loc ["STRING_OPTIONS_SAVELOAD_RESET"]) --> text size - g:NewSlider (frame2, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.barrasInfo.fontSize)) + g:NewSlider (frame2, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.row_info.font_size)) --> instance color local selectedColor = function() @@ -739,8 +683,7 @@ function _detalhes:OpenOptionsWindow (instance) frame2.instancecolortexture:SetTexture (r, g, b) frame2.instancecolortexture:SetAlpha (a) - - window.instance.color[1], window.instance.color[2], window.instance.color[3], window.instance.color[4] = r, g, b, a + window.instance:InstanceColor (r, g, b, a) end @@ -749,7 +692,6 @@ function _detalhes:OpenOptionsWindow (instance) frame2.instancecolortexture:SetTexture (c [1], c [2], c [3]) frame2.instancecolortexture:SetAlpha (c [4]) - window.instance.color[1], window.instance.color[2], window.instance.color[3], window.instance.color[4] = c [1], c [2], c [3], c [4] window.instance:InstanceColor (c [1], c [2], c [3], c [4]) ColorPickerFrame.func = nil @@ -766,7 +708,6 @@ function _detalhes:OpenOptionsWindow (instance) frame2.instancecolortexture:SetTexture (r, g, b) frame2.instancecolortexture:SetAlpha (a) - window.instance.color[1], window.instance.color[2], window.instance.color[3], window.instance.color[4] = r, g, b, a window.instance:InstanceColor (r, g, b, a) end @@ -790,25 +731,15 @@ function _detalhes:OpenOptionsWindow (instance) local selectedRowBackgroundColor = function() local r, g, b = ColorPickerFrame:GetColorRGB() local a = OpacitySliderFrame:GetValue() - - local c = window.instance.barrasInfo.texturaBackgroundColor - c [1], c [2], c [3], c [4] = r, g, b, a - - window.instance:RefreshBars() - window.instance:InstanceReset() - window.instance:InstanceRefreshRows() - frame2.rowBackgroundColorTexture:SetTexture (r, g, b, a) + + window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) end local canceledRowBackgroundColor = function() - local c = window.instance.barrasInfo.texturaBackgroundColor - c [1], c [2], c [3], c [4] = unpack (ColorPickerFrame.previousValues) - - window.instance:RefreshBars() - window.instance:InstanceReset() - window.instance:InstanceRefreshRows() - + 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 @@ -817,15 +748,8 @@ function _detalhes:OpenOptionsWindow (instance) local selectedRowBackgroundAlpha = function() local r, g, b = ColorPickerFrame:GetColorRGB() local a = OpacitySliderFrame:GetValue() - - local c = window.instance.barrasInfo.texturaBackgroundColor - c [1], c [2], c [3], c [4] = r, g, b, a - - window.instance:RefreshBars() - window.instance:InstanceReset() - window.instance:InstanceRefreshRows() - frame2.rowBackgroundColorTexture:SetTexture (r, g, b, a) + window.instance:SetBarSettings (nil, nil, nil, nil, nil, nil, {r, g, b, a}) end local colorpickRowBackground = function() @@ -833,10 +757,10 @@ function _detalhes:OpenOptionsWindow (instance) ColorPickerFrame.opacityFunc = selectedRowBackgroundAlpha ColorPickerFrame.cancelFunc = canceledRowBackgroundColor ColorPickerFrame.hasOpacity = true --false - ColorPickerFrame.opacity = window.instance.barrasInfo.texturaBackgroundColor[4] - ColorPickerFrame.previousValues = window.instance.barrasInfo.texturaBackgroundColor + 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.barrasInfo.texturaBackgroundColor)) + ColorPickerFrame:SetColorRGB (unpack (window.instance.row_info.fixed_texture_background_color)) ColorPickerFrame:Show() end @@ -844,10 +768,10 @@ function _detalhes:OpenOptionsWindow (instance) 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.barrasInfo.texturaBackgroundByClass) + g:NewSwitch (frame2, _, "$parentBackgroundClassColorSlider", "rowBackgroundColorByClassSlider", 60, 20, _, _, instance.row_info.texture_background_class_color) --> bar height - g:NewSlider (frame2, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, 20, 10, 30, 1, tonumber (instance.barrasInfo.altura)) + 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) @@ -882,32 +806,164 @@ function _detalhes:OpenOptionsWindow (instance) --> 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} + 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) + + --> 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} + end + return fontTable + end + g:NewDropDown (frame2, _, "$parentInstanceTextFontDropdown", "instanceTextFontDropdown", DROPDOWN_WIDTH, 20, instance_text_color_build_font_menu, nil) + --> bar texture by class color - g:NewSwitch (frame2, _, "$parentClassColorSlider", "classColorSlider", 60, 20, _, _, instance.row_texture_class_colors) + 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_textL_class_colors) - g:NewSwitch (frame2, _, "$parentUseClassColorsRightTextSlider", "classColorsRightTextSlider", 60, 20, _, _, instance.row_textR_class_colors) + 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) --> row texture color local selectedColorClass = function() local r, g, b = ColorPickerFrame:GetColorRGB() frame2.fixedRowColorTexture:SetTexture (r, g, b) - window.instance.fixed_row_texture_color[1], window.instance.fixed_row_texture_color[2], window.instance.fixed_row_texture_color[3] = r, g, b - instance:InstanceReset() - instance:InstanceRefreshRows() + + 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]) + frame2.fixedRowColorTexture:SetTexture (c[1], c[2], c[3]) - window.instance.fixed_row_texture_color[1], window.instance.fixed_row_texture_color[2], window.instance.fixed_row_texture_color[3] = c [1], c [2], c [3] + window.instance:SetBarSettings (nil, nil, nil, {c[1], c[2], c[3], 1}) ColorPickerFrame.func = nil ColorPickerFrame.cancelFunc = nil - instance:InstanceReset() - instance:InstanceRefreshRows() end local colorpickClass = function() @@ -915,9 +971,9 @@ function _detalhes:OpenOptionsWindow (instance) ColorPickerFrame.cancelFunc = canceledColorClass ColorPickerFrame.opacityFunc = nil ColorPickerFrame.hasOpacity = false - ColorPickerFrame.previousValues = window.instance.fixed_row_texture_color + ColorPickerFrame.previousValues = window.instance.row_info.fixed_texture_color ColorPickerFrame:SetParent (window.widget) - ColorPickerFrame:SetColorRGB (unpack (window.instance.fixed_row_texture_color)) + ColorPickerFrame:SetColorRGB (unpack (window.instance.row_info.fixed_texture_color)) ColorPickerFrame:Show() end @@ -928,21 +984,16 @@ function _detalhes:OpenOptionsWindow (instance) local selectedTextColor = function() local r, g, b = ColorPickerFrame:GetColorRGB() frame2.fixedRowColorText:SetTexture (r, g, b) - window.instance.fixed_row_text_color[1], window.instance.fixed_row_text_color[2], window.instance.fixed_row_text_color[3] = r, g, b - instance:InstanceReset() - instance:InstanceRefreshRows() + 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]) + window.instance:SetBarTextSettings (nil, nil, {c [1], c [2], c [3], 1}) - window.instance.fixed_row_text_color[1], window.instance.fixed_row_text_color[2], window.instance.fixed_row_text_color[3] = c [1], c [2], c [3] - ColorPickerFrame.func = nil ColorPickerFrame.cancelFunc = nil - instance:InstanceReset() - instance:InstanceRefreshRows() end local colorpickTextColor = function() @@ -950,9 +1001,9 @@ function _detalhes:OpenOptionsWindow (instance) ColorPickerFrame.cancelFunc = canceledTextColor ColorPickerFrame.opacityFunc = nil ColorPickerFrame.hasOpacity = false - ColorPickerFrame.previousValues = window.instance.fixed_row_text_color + ColorPickerFrame.previousValues = window.instance.row_info.fixed_text_color ColorPickerFrame:SetParent (window.widget) - ColorPickerFrame:SetColorRGB (unpack (window.instance.fixed_row_text_color)) + ColorPickerFrame:SetColorRGB (unpack (window.instance.row_info.fixed_text_color)) ColorPickerFrame:Show() end @@ -960,8 +1011,8 @@ function _detalhes:OpenOptionsWindow (instance) g:NewButton (frame2, _, "$parentFixedRowColorTButton", "fixedRowColorTButton", COLOR_BUTTON_WIDTH, 14, colorpickTextColor, nil, nil, nil, Loc ["STRING_OPTIONS_PICKCOLOR"]) --> outline - g:NewSwitch (frame2, _, "$parentTextLeftOutlineSlider", "textLeftOutlineSlider", 60, 20, _, _, instance.row_textL_outline) - g:NewSwitch (frame2, _, "$parentTextRightOutlineSlider", "textRightOutlineSlider", 60, 20, _, _, instance.row_textR_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) --> wallpaper @@ -1192,25 +1243,11 @@ function _detalhes:OpenOptionsWindow (instance) g:NewDropDown (frame2, _, "$parentBackgroundDropdown", "backgroundDropdown", DROPDOWN_WIDTH, 20, buildBackgroundMenu, nil) g:NewDropDown (frame2, _, "$parentBackgroundDropdown2", "backgroundDropdown2", DROPDOWN_WIDTH, 20, buildBackgroundMenu2, nil) - --> bar texture - local onSelectTexture = function (_, instance, textureName) - instance.barrasInfo.textura = SharedMedia:Fetch ("statusbar", textureName) - instance.barrasInfo.textureName = textureName - instance:RefreshBars() - 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) + --> text font local onSelectFont = function (_, instance, fontName) - instance.barrasInfo.font = SharedMedia:Fetch ("font", fontName) - instance.barrasInfo.fontName = fontName - instance:RefreshBars() + instance:SetBarTextSettings (nil, fontName) end local fontObjects = SharedMedia:HashTable ("font") local fontTable = {} @@ -1221,12 +1258,8 @@ function _detalhes:OpenOptionsWindow (instance) g:NewDropDown (frame2, _, "$parentFontDropdown", "fontDropdown", DROPDOWN_WIDTH, 20, buildFontMenu, nil) --> bar background - local onSelectTextureBackground = function (_, instance, textureName) - instance.barrasInfo.texturaBackground = SharedMedia:Fetch ("statusbar", textureName) - instance.barrasInfo.textureNameBackground = textureName - instance:RefreshBars() - instance:InstanceReset() - instance:InstanceRefreshRows() + local onSelectTextureBackground = function (_, instance, textureName) + instance:SetBarSettings (nil, nil, nil, nil, textureName) end local textures2 = SharedMedia:HashTable ("statusbar") @@ -1238,6 +1271,20 @@ function _detalhes:OpenOptionsWindow (instance) 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) @@ -1280,10 +1327,10 @@ function _detalhes:OpenOptionsWindow (instance) -- background color g:NewLabel (frame2, _, "$parentRowBackgroundColorLabel", "rowBackgroundColorLabel", Loc ["STRING_OPTIONS_BAR_BCOLOR"]) - frame2.rowBackgroundColorTexture:SetPoint ("left", frame2.rowBackgroundColorLabel, "right", 2) + --frame2.rowBackgroundColorTexture:SetPoint ("left", frame2.rowBackgroundColorLabel, "right", 2) frame2.rowBackgroundColorTexture:SetTexture (1, 1, 1) - frame2.rowBackgroundColorButton:SetPoint ("left", frame2.rowBackgroundColorLabel, "right", 2) + frame2.rowBackgroundColorButton:SetPoint ("left", frame2.rowBackgroundColorTexture, "left") frame2.rowBackgroundColorButton:InstallCustomTexture() frame2.rowBackgroundColorButton.info = Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] @@ -1296,10 +1343,7 @@ function _detalhes:OpenOptionsWindow (instance) frame2.rowBackgroundColorByClassSlider:SetPoint ("left", frame2.rowBackgroundColorByClassLabel, "right", 2) frame2.rowBackgroundColorByClassSlider.OnSwitch = function (self, instance, value) - instance.barrasInfo.texturaBackgroundByClass = value - instance:RefreshBars() - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarSettings (nil, nil, nil, nil, nil, value) end frame2.rowBackgroundColorByClassSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] @@ -1313,8 +1357,8 @@ function _detalhes:OpenOptionsWindow (instance) frame2.rowHeightSlider:SetPoint ("left", frame2.rowHeightLabel, "right", 2) frame2.rowHeightSlider:SetThumbSize (50) frame2.rowHeightSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance.barrasInfo.altura = amount - instance.barrasInfo.alturaReal = instance.barrasInfo.altura+instance.barrasInfo.espaco.entre + instance.row_info.height = amount + instance.row_height = instance.row_info.height+instance.row_info.space.between instance:RefreshBars() instance:InstanceReset() instance:ReajustaGump() @@ -1329,9 +1373,7 @@ function _detalhes:OpenOptionsWindow (instance) 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.row_texture_class_colors = value - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarSettings (nil, nil, value) end frame2.classColorSlider.info = Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] @@ -1353,9 +1395,8 @@ function _detalhes:OpenOptionsWindow (instance) 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.barrasInfo.fontSize = amount - instance:RefreshBars() + 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) @@ -1375,11 +1416,8 @@ function _detalhes:OpenOptionsWindow (instance) g:NewLabel (frame2, _, "$parentUseClassColorsLeftText", "classColorsLeftTextLabel", Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"]) frame2.classColorsLeftTextSlider:SetPoint ("left", frame2.classColorsLeftTextLabel, "right", 2) - --frame2.classColorsLeftTextSlider.tooltip = "if enabled, left bar text color matches the class, \nelse, a fixed color is used." frame2.classColorsLeftTextSlider.OnSwitch = function (self, instance, value) - instance.row_textL_class_colors = value - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarTextSettings (nil, nil, nil, value) end frame2.classColorsLeftTextSlider.info = Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] @@ -1391,11 +1429,8 @@ function _detalhes:OpenOptionsWindow (instance) g:NewLabel (frame2, _, "$parentUseClassColorsRightText", "classColorsRightTextLabel", Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"]) frame2.classColorsRightTextSlider:SetPoint ("left", frame2.classColorsRightTextLabel, "right", 2) - --frame2.classColorsRightTextSlider.tooltip = "if enabled, right bar text color matches the class, \nelse, a fixed color is used." frame2.classColorsRightTextSlider.OnSwitch = function (self, instance, value) - instance.row_textR_class_colors = value - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarTextSettings (nil, nil, nil, nil, value) end frame2.classColorsRightTextSlider.info = Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] @@ -1417,9 +1452,7 @@ function _detalhes:OpenOptionsWindow (instance) frame2.textLeftOutlineSlider:SetPoint ("left", frame2.textLeftOutlineLabel, "right", 2) frame2.textLeftOutlineSlider.OnSwitch = function (self, instance, value) - instance.row_textL_outline = value - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarTextSettings (nil, nil, nil, nil, nil, value) end frame2.textLeftOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] @@ -1432,9 +1465,7 @@ function _detalhes:OpenOptionsWindow (instance) frame2.textRightOutlineSlider:SetPoint ("left", frame2.textRightOutlineLabel, "right", 2) frame2.textRightOutlineSlider.OnSwitch = function (self, instance, value) - instance.row_textR_outline = value - instance:InstanceReset() - instance:InstanceRefreshRows() + instance:SetBarTextSettings (nil, nil, nil, nil, nil, nil, value) end frame2.textRightOutlineSlider.info = Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] @@ -1458,8 +1489,9 @@ function _detalhes:OpenOptionsWindow (instance) frame2.instancecolorbutton:SetHook ("OnEnter", background_on_enter) frame2.instancecolorbutton:SetHook ("OnLeave", background_on_leave) - -- Alpha + -- Color and Alpha g:NewLabel (frame2, _, "$parentAlphaLabel", "alphaLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA"]) + g:NewLabel (frame2, _, "$parentBackgroundColorLabel", "backgroundColorLabel", Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"]) -- frame2.alphaSlider:SetPoint ("left", frame2.alphaLabel, "right", 2, 0) frame2.alphaSlider.useDecimals = true @@ -1469,12 +1501,11 @@ function _detalhes:OpenOptionsWindow (instance) return true end) frame2.alphaSlider.thumb:SetSize (30+(120*0.2)+2, 20*1.2) - --frame2.alphaSlider.tooltip = "Change the background alpha for this instance" - frame2.backgroundColorTexture:SetPoint ("left", frame2.alphaSlider, "right", 5) + frame2.backgroundColorTexture:SetPoint ("left", frame2.backgroundColorLabel, "right", 2) frame2.backgroundColorTexture:SetTexture (1, 1, 1) - frame2.backgroundColorButton:SetPoint ("left", frame2.alphaSlider, "right", 5) + frame2.backgroundColorButton:SetPoint ("left", frame2.backgroundColorLabel, "right", 2) frame2.backgroundColorButton:InstallCustomTexture() -- alpha background COLOR???? @@ -1489,7 +1520,6 @@ function _detalhes:OpenOptionsWindow (instance) g:NewLabel (frame2, _, "$parentAutoCurrentLabel", "autoCurrentLabel", Loc ["STRING_OPTIONS_INSTANCE_CURRENT"]) frame2.autoCurrentSlider:SetPoint ("left", frame2.autoCurrentLabel, "right", 2) - --frame2.autoCurrentSlider.tooltip = "Whenever a combat start and there is no other instance on\ncurrent segment, this instance auto switch to current segment." frame2.autoCurrentSlider.OnSwitch = function (self, instance, value) instance.auto_current = value end @@ -1499,6 +1529,316 @@ function _detalhes:OpenOptionsWindow (instance) 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) @@ -1579,7 +1919,6 @@ function _detalhes:OpenOptionsWindow (instance) ----- style name frame2.saveStyleName:SetLabelText (Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] .. ":") - frame2.saveStyleName:SetPoint (10, -830) ----- add style button @@ -1632,56 +1971,98 @@ function _detalhes:OpenOptionsWindow (instance) -- Anchors -------------------------------------------------------------------------------------------------------------------------------------------- - titulo_bars:SetPoint (10, -10) - titulo_bars_desc:SetPoint (10, -30) + --> 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) - -- bar - frame2.textureLabel:SetPoint (10, -70) --bar texture - frame2.rowHeightLabel:SetPoint (10, -90) --bar height - frame2.classColorsLabel:SetPoint (10, -110) - frame2.rowBackgroundColorLabel:SetPoint (10, -130) --bar background color - frame2.rowBackgroundColorByClassLabel:SetPoint (10, -150) - frame2.rowBackgroundLabel:SetPoint (10, -170) --select background + frame2.rowHeightLabel:SetPoint (10, -170) --bar height + frame2.barGrowDirectionLabel:SetPoint (10, -190) --grow direction + frame2.barSortDirectionLabel:SetPoint (10, -210) --sort direction - titulo_texts:SetPoint (10, -210) - titulo_texts_desc:SetPoint (10, -230) + 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 - --texts - frame2.fonsizeLabel:SetPoint (10, -270) - frame2.fontLabel:SetPoint (10, -290) - frame2.textLeftOutlineLabel:SetPoint (10, -310) - frame2.textRightOutlineLabel:SetPoint (10, -330) - frame2.classColorsLeftTextLabel:SetPoint (10, -350) - frame2.classColorsRightTextLabel:SetPoint (10, -370) + --> text bar settings + titulo_texts:SetPoint (10, -350) + titulo_texts_desc:SetPoint (10, -370) - titulo_instance:SetPoint (10, -410) - titulo_instance_desc:SetPoint (10, -430) + 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 - --instance - frame2.instancecolor:SetPoint (10, -470) - frame2.alphaLabel:SetPoint (10, -490) - frame2.autoCurrentLabel:SetPoint (10, -510) - frame2.skinLabel:SetPoint (10, -530) + --> window settings + titulo_instance:SetPoint (10, -550) + titulo_instance_desc:SetPoint (10, -570) - titulo_wallpaper:SetPoint (10, -570) - titulo_wallpaper_desc:SetPoint (10, -590) + frame2.instancecolor:SetPoint (10, -610) --window color + frame2.alphaLabel:SetPoint (10, -630) --background alpha + frame2.backgroundColorLabel:SetPoint (10, -650) --background color - --wallpaper - frame2.enablewallpaperLabel:SetPoint (10, -630) + 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) - frame2.wallpapergroupLabel:SetPoint (10, -650) - frame2.selectwallpaperLabel:SetPoint (135, -650) + --> wallpaper settings + titulo_wallpaper:SetPoint (10, -1270) + titulo_wallpaper_desc:SetPoint (10, -1290) + + frame2.enablewallpaperLabel:SetPoint (10, -1330) + + 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, -690) - frame2.editImage:SetPoint (10, -710) + frame2.anchorLabel:SetPoint (10, -1390) + frame2.editImage:SetPoint (10, -1410) - --save load + --> save and load - titulo_save:SetPoint (10, -750) - titulo_save_desc:SetPoint (10, -770) + titulo_save:SetPoint (10, -1450) + titulo_save_desc:SetPoint (10, -1470) + + frame2.saveStyleName:SetPoint (10, -1510) ---------------- performance local frame3 = window.options [3][1].gump @@ -1993,41 +2374,108 @@ function _detalhes:OpenOptionsWindow (instance) ---------------------------------------------------------------------------------------- --> 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.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.DetailsOptionsWindow2CloseOverlayColorImage.MyObject:SetTexture (unpack (instance.closebutton_info.color_overlay)) + + _G.DetailsOptionsWindow2SideBarsSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2SideBarsSlider.MyObject:SetValue (instance.show_sidebars) + + _G.DetailsOptionsWindow2StatusbarSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2StatusbarSlider.MyObject:SetValue (instance.show_statusbar) + + _G.DetailsOptionsWindow2StretchAnchorSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2StretchAnchorSlider.MyObject:SetValue (instance.stretch_button_side) + + _G.DetailsOptionsWindow2PluginIconsDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2PluginIconsDirectionSlider.MyObject:SetValue (instance.plugins_grow_direction) + + _G.DetailsOptionsWindow2InstanceToolbarSideSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2InstanceToolbarSideSlider.MyObject:SetValue (instance.toolbar_side) + + _G.DetailsOptionsWindow2BarSortDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2BarSortDirectionSlider.MyObject:SetValue (instance.bars_sort_direction) + + _G.DetailsOptionsWindow2BarGrowDirectionSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2BarGrowDirectionSlider.MyObject:SetValue (instance.bars_grow_direction) + + + _G.DetailsOptionsWindow2DesaturateMenuSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2DesaturateMenuSlider.MyObject:SetValue (instance.desaturated_menu) + + _G.DetailsOptionsWindow2HideIconSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2HideIconSlider.MyObject:SetValue (instance.hide_icon) + + _G.DetailsOptionsWindow2MenuAnchorXSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2MenuAnchorXSlider.MyObject:SetValue (instance.menu_anchor[1]) + + _G.DetailsOptionsWindow2MenuAnchorYSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2MenuAnchorYSlider.MyObject:SetValue (instance.menu_anchor[2]) + + _G.DetailsOptionsWindow2InstanceButtonAnchorXSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2InstanceButtonAnchorXSlider.MyObject:SetValue (instance.instance_button_anchor[1]) + + _G.DetailsOptionsWindow2InstanceButtonAnchorYSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2InstanceButtonAnchorYSlider.MyObject:SetValue (instance.instance_button_anchor[2]) + +---------------------------------------------------------------- + + --resetTextColor + _G.DetailsOptionsWindow2ResetTextFontDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2ResetTextSizeSlider.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2ResetAlwaysSmallSlider.MyObject:SetFixedParameter (instance) + --resetOverlayColorLabel + + --instanceTextColorLabel + _G.DetailsOptionsWindow2InstanceTextFontDropdown.MyObject:SetFixedParameter (instance) + _G.DetailsOptionsWindow2InstanceTextSizeSlider.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.barrasInfo.textureName) - _G.DetailsOptionsWindow2RowBackgroundTextureDropdown.MyObject:Select (instance.barrasInfo.textureNameBackground) - _G.DetailsOptionsWindow2RowBackgroundColor.MyObject:SetTexture (unpack (instance.barrasInfo.texturaBackgroundColor)) + _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.DetailsOptionsWindow2BackgroundClassColorSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2BackgroundClassColorSlider.MyObject:SetValue (instance.barrasInfo.texturaBackgroundByClass) + _G.DetailsOptionsWindow2BackgroundClassColorSlider.MyObject:SetValue (instance.row_info.texture_background_class_color) _G.DetailsOptionsWindow2FontDropdown.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2FontDropdown.MyObject:Select (instance.barrasInfo.fontName) + _G.DetailsOptionsWindow2FontDropdown.MyObject:Select (instance.row_info.font_face) -- _G.DetailsOptionsWindow2SliderRowHeight.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SliderRowHeight.MyObject:SetValue (instance.barrasInfo.altura) + _G.DetailsOptionsWindow2SliderRowHeight.MyObject:SetValue (instance.row_info.height) -- _G.DetailsOptionsWindow2SliderFontSize.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2SliderFontSize.MyObject:SetValue (instance.barrasInfo.fontSize) + _G.DetailsOptionsWindow2SliderFontSize.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_texture_class_colors) + _G.DetailsOptionsWindow2ClassColorSlider.MyObject:SetValue (instance.row_info.texture_class_colors) _G.DetailsOptionsWindow2UseClassColorsLeftTextSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2UseClassColorsLeftTextSlider.MyObject:SetValue (instance.row_textL_class_colors) + _G.DetailsOptionsWindow2UseClassColorsLeftTextSlider.MyObject:SetValue (instance.row_info.textL_class_colors) _G.DetailsOptionsWindow2UseClassColorsRightTextSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2UseClassColorsRightTextSlider.MyObject:SetValue (instance.row_textR_class_colors) + _G.DetailsOptionsWindow2UseClassColorsRightTextSlider.MyObject:SetValue (instance.row_info.textR_class_colors) _G.DetailsOptionsWindow2TextLeftOutlineSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2TextLeftOutlineSlider.MyObject:SetValue (instance.row_textL_outline) + _G.DetailsOptionsWindow2TextLeftOutlineSlider.MyObject:SetValue (instance.row_info.textL_outline) _G.DetailsOptionsWindow2TextRightOutlineSlider.MyObject:SetFixedParameter (instance) - _G.DetailsOptionsWindow2TextRightOutlineSlider.MyObject:SetValue (instance.row_textR_outline) + _G.DetailsOptionsWindow2TextRightOutlineSlider.MyObject:SetValue (instance.row_info.textR_outline) -- _G.DetailsOptionsWindow2AlphaSlider.MyObject:SetFixedParameter (instance) _G.DetailsOptionsWindow2AlphaSlider.MyObject:SetValue (instance.bg_alpha) @@ -2050,8 +2498,8 @@ function _detalhes:OpenOptionsWindow (instance) _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.fixed_row_texture_color)) - _G.DetailsOptionsWindow2FixedRowColorTTexture.MyObject:SetTexture (unpack (instance.fixed_row_text_color)) + _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) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index f5786522..cfc27fc3 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -5,6 +5,7 @@ local _detalhes = _G._detalhes local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) local _ local gump = _detalhes.gump +local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0") local atributos = _detalhes.atributos local sub_atributos = _detalhes.sub_atributos @@ -19,7 +20,7 @@ local _pairs = pairs local _string_lower = string.lower local _unpack = unpack --api locals -local _CreateFrame = CreateFrame +local CreateFrame = CreateFrame local _GetTime = GetTime local _GetCursorPosition = GetCursorPosition local _GameTooltip = GameTooltip @@ -35,7 +36,7 @@ local modo_grupo = _detalhes._detalhes_props["MODO_GROUP"] local modo_all = _detalhes._detalhes_props["MODO_ALL"] local gump_fundo_backdrop = { - bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, + bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}} function _detalhes:ScheduleUpdate (instancia) @@ -58,33 +59,36 @@ end local DEFAULT_SKIN = [[Interface\AddOns\Details\images\skins\default_skin]] - local COORDS_LEFT_BALL = {0.15673828125, 0.28076171875, 0.08251953125, 0.20654296875} -- x1 160 y1 84 x2 288 y2 212 - local COORDS_LEFT_CONNECTOR = {0.29541015625, 0.30224609375, 0.08251953125, 0.20654296875} --302 84 310 212 - local COORDS_TOP_BACKGROUND = {0.15673828125, 0.65576171875, 0.22314453125, 0.34716796875} -- 160 228 672 356 - local COORDS_RIGHT_BALL = {0.31591796875, 0.43994140625, 0.08251953125, 0.20654296875} --324 84 452 212 + local COORDS_LEFT_BALL = {0.15673828125, 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_LEFT_BALL_NO_ICON = {0.44970703125, 0.57275390625, 0.08251953125, 0.20556640625} --460 84 587 211 (updated) - local COORDS_LEFT_SIDE_BAR = {0.76611328125, 0.82861328125, 0.00244140625, 0.50244140625} -- 784 2 849 515 - local COORDS_RIGHT_SIDE_BAR = {0.70068359375, 0.76318359375, 0.00244140625, 0.50244140625} -- 717 2 782 515 + local COORDS_LEFT_SIDE_BAR = {0.76611328125, 0.82763671875, 0.00244140625, 0.50146484375} -- 784 2 848 514 (updated) + local COORDS_RIGHT_SIDE_BAR = {0.70068359375, 0.76220703125, 0.00244140625, 0.50146484375} -- 717 2 781 514 (updated) + local COORDS_BOTTOM_SIDE_BAR = {0.32861328125, 0.82666015625, 0.50537109375, 0.56494140625} -- 336 517 847 579 (updated) - local COORDS_SLIDER_TOP = {0.00146484375, 0.03173828125, 0.00244140625, 0.03271484375} -- 1 2 33 34 - local COORDS_SLIDER_MIDDLE = {0.00146484375, 0.03173828125, 0.03955078125, 0.10107421875} -- 1 40 33 104 - local COORDS_SLIDER_DOWN = {0.00146484375, 0.03173828125, 0.10986328125, 0.14013671875} -- 1 112 33 144 + local COORDS_SLIDER_TOP = {0.00146484375, 0.03076171875, 0.00244140625, 0.03173828125} -- 1 2 32 33 -ok + local COORDS_SLIDER_MIDDLE = {0.00146484375, 0.03076171875, 0.03955078125, 0.10009765625} -- 1 40 32 103 -ok + local COORDS_SLIDER_DOWN = {0.00146484375, 0.03076171875, 0.10986328125, 0.13916015625} -- 1 112 32 143 -ok - local COORDS_STRETCH = {0.00146484375, 0.03173828125, 0.21435546875, 0.22900390625} -- 1 219 33 235 - local COORDS_RESIZE_RIGHT = {0.00146484375, 0.01611328125, 0.24560546875, 0.26025390625} -- 1 251 17 267 - local COORDS_RESIZE_LEFT = {0.02001953125, 0.03271484375, 0.24560546875, 0.26025390625} -- 20 251 34 267 + local COORDS_STRETCH = {0.00146484375, 0.03076171875, 0.21435546875, 0.22802734375} -- 1 219 32 234 -ok + local COORDS_RESIZE_RIGHT = {0.00146484375, 0.01513671875, 0.24560546875, 0.25927734375} -- 1 251 16 266 -ok + local COORDS_RESIZE_LEFT = {0.02001953125, 0.03173828125, 0.24560546875, 0.25927734375} -- 20 251 33 266 -ok - local COORDS_UNLOCK_BUTTON = {0.00146484375, 0.01611328125, 0.27197265625, 0.28662109375} -- 1 278 17 294 + local COORDS_UNLOCK_BUTTON = {0.00146484375, 0.01513671875, 0.27197265625, 0.28564453125} -- 1 278 16 293 -ok - local COORDS_BOTTOM_BACKGROUND = {0.15673828125, 0.65576171875, 0.35400390625, 0.47802734375} -- 160 362 672 490 - local COORDS_PIN_LEFT = {0.00146484375, 0.03173828125, 0.30126953125, 0.33154296875} -- 1 308 33 340 - local COORDS_PIN_RIGHT = {0.03564453125, 0.06591796875, 0.30126953125, 0.33154296875} -- 36 308 68 340 + local COORDS_BOTTOM_BACKGROUND = {0.15673828125, 0.65478515625, 0.35400390625, 0.47705078125} -- 160 362 671 489 -ok + local COORDS_PIN_LEFT = {0.00146484375, 0.03076171875, 0.30126953125, 0.33056640625} -- 1 308 32 339 -ok + local COORDS_PIN_RIGHT = {0.03564453125, 0.06494140625, 0.30126953125, 0.33056640625} -- 36 308 67 339 -ok -- icones: 365 = 0.35693359375 // 397 = 0.38720703125 function _detalhes:AtualizarScrollBar (x) - local cabe = self.barrasInfo.cabem --> quantas barras cabem na janela + local cabe = self.rows_fit_in_window --> quantas barras cabem na janela if (not self.barraS[1]) then --primeira vez que as barras estão aparecendo self.barraS[1] = 1 --primeira barra @@ -97,7 +101,7 @@ function _detalhes:AtualizarScrollBar (x) if (not self.rolagem) then if (x > cabe) then --> Ligar a ScrollBar - self.barrasInfo.mostrando = x + self.rows_showing = x if (not self.baseframe.isStretching) then self:MostrarScrollBar() @@ -106,26 +110,26 @@ function _detalhes:AtualizarScrollBar (x) self.barraS[2] = cabe --> B é o total que cabe na barra else --> Do contrário B é o total de barras - self.barrasInfo.mostrando = x + self.rows_showing = x self.barraS[2] = x end else - if (x > self.barrasInfo.mostrando) then --> tem mais barras mostrando agora do que na última atualização - self.barrasInfo.mostrando = x - local nao_mostradas = self.barrasInfo.mostrando - self.barrasInfo.cabem - local slider_height = nao_mostradas*self.barrasInfo.alturaReal + if (x > self.rows_showing) then --> tem mais barras mostrando agora do que na última atualização + self.rows_showing = x + local nao_mostradas = self.rows_showing - self.rows_fit_in_window + local slider_height = nao_mostradas*self.row_height self.scroll.scrollMax = slider_height self.scroll:SetMinMaxValues (0, slider_height) else --> diminuiu a quantidade, acontece depois de uma coleta de lixo - self.barrasInfo.mostrando = x - local nao_mostradas = self.barrasInfo.mostrando - self.barrasInfo.cabem + self.rows_showing = x + local nao_mostradas = self.rows_showing - self.rows_fit_in_window if (nao_mostradas < 1) then --> se estiver mostrando menos do que realmente cabe não precisa scrollbar self:EsconderScrollBar() else --> contrário, basta atualizar o tamanho da scroll - local slider_height = nao_mostradas*self.barrasInfo.alturaReal + local slider_height = nao_mostradas*self.row_height self.scroll.scrollMax = slider_height self.scroll:SetMinMaxValues (0, slider_height) end @@ -151,10 +155,10 @@ local function move_barras (self, elapsed) self._move_func.time = 0 self._move_func.instancia.bgdisplay_loc = self._move_func.instancia.bgdisplay_loc + self._move_func.inc --> inc é -1 ou 1 e irá crescer ou diminuir a janela - for index = 1, self._move_func.instancia.barrasInfo.cabem do + for index = 1, self._move_func.instancia.rows_fit_in_window do self._move_func.instancia.barras [index]:SetWidth (self:GetWidth()+self._move_func.instancia.bgdisplay_loc-3) end - self._move_func.instancia.bgdisplay:SetPoint ("BOTTOMRIGHT", self, "BOTTOMRIGHT", self._move_func.instancia.bgdisplay_loc, 0) + self._move_func.instancia.bgdisplay:SetPoint ("bottomright", self, "bottomright", self._move_func.instancia.bgdisplay_loc, 0) self._move_func.instancia.bar_mod = self._move_func.instancia.bgdisplay_loc+(-3) @@ -207,11 +211,11 @@ function _detalhes:MostrarScrollBar (sem_animacao) self:MoveBarrasTo (mover_para) else --> set size of rows - for index = 1, self.barrasInfo.cabem do + for index = 1, self.rows_fit_in_window do self.barras [index]:SetWidth (self.baseframe:GetWidth()+mover_para -3) --> -3 distance between row end and scroll start end --> move the semi-background to the left (which moves the scroll) - self.bgdisplay:SetPoint ("BOTTOMRIGHT", self.baseframe, "BOTTOMRIGHT", mover_para, 0) + self.bgdisplay:SetPoint ("bottomright", self.baseframe, "bottomright", mover_para, 0) self.bar_mod = mover_para + (-3) self.bgdisplay_loc = mover_para @@ -222,8 +226,8 @@ function _detalhes:MostrarScrollBar (sem_animacao) end end - local nao_mostradas = self.barrasInfo.mostrando - self.barrasInfo.cabem - local slider_height = nao_mostradas*self.barrasInfo.alturaReal + local nao_mostradas = self.rows_showing - self.rows_fit_in_window + local slider_height = nao_mostradas*self.row_height self.scroll.scrollMax = slider_height self.scroll:SetMinMaxValues (0, slider_height) @@ -233,10 +237,10 @@ function _detalhes:MostrarScrollBar (sem_animacao) self.scroll:SetValue (0) --> set value pode chamar o atualizador self.baseframe.button_down:Enable() - main.resize_direita:SetPoint ("BOTTOMRIGHT", main, "BOTTOMRIGHT", self.largura_scroll*-1, 0) + main.resize_direita:SetPoint ("bottomright", main, "bottomright", self.largura_scroll*-1, 0) if (main.isLocked) then - main.lock_button:SetPoint ("BOTTOMRIGHT", main, "BOTTOMRIGHT", self.largura_scroll*-1, 0) + main.lock_button:SetPoint ("bottomright", main, "bottomright", self.largura_scroll*-1, 0) end end @@ -257,12 +261,12 @@ function _detalhes:EsconderScrollBar (sem_animacao, force) local main = self.baseframe if (not sem_animacao and _detalhes.animate_scroll) then - self:MoveBarrasTo (self.barrasInfo.espaco.direita + 3) --> + self:MoveBarrasTo (self.row_info.space.right + 3) --> else - for index = 1, self.barrasInfo.cabem do + for index = 1, self.rows_fit_in_window do self.barras [index]:SetWidth (self.baseframe:GetWidth() - 5) --> -5 space between row end and window right border end - self.bgdisplay:SetPoint ("BOTTOMRIGHT", self.baseframe, "BOTTOMRIGHT", 0, 0) -- voltar o background na pocição inicial + self.bgdisplay:SetPoint ("bottomright", self.baseframe, "bottomright", 0, 0) -- voltar o background na pocição inicial self.bar_mod = 0 -- zera o bar mod, uma vez que as barras vão estar na pocisão inicial self.bgdisplay_loc = -2 if (self.baseframe:GetScript ("OnUpdate") and self.baseframe:GetScript ("OnUpdate") == move_barras) then @@ -274,9 +278,9 @@ function _detalhes:EsconderScrollBar (sem_animacao, force) self.scroll:Disable() main:EnableMouseWheel (false) - main.resize_direita:SetPoint ("BOTTOMRIGHT", main, "BOTTOMRIGHT", 0, 0) + main.resize_direita:SetPoint ("bottomright", main, "bottomright", 0, 0) if (main.isLocked) then - main.lock_button:SetPoint ("BOTTOMRIGHT", main, "BOTTOMRIGHT", 0, 0) + main.lock_button:SetPoint ("bottomright", main, "bottomright", 0, 0) end end @@ -285,8 +289,8 @@ local function OnLeaveMainWindow (instancia, self) if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then --> resizes and lock button - gump:Fade (instancia.baseframe.resize_direita, 1) - gump:Fade (instancia.baseframe.resize_esquerda, 1) + instancia.baseframe.resize_direita:SetAlpha (0) + instancia.baseframe.resize_esquerda:SetAlpha (0) gump:Fade (instancia.baseframe.lock_button, 1) --> stretch button @@ -294,11 +298,12 @@ local function OnLeaveMainWindow (instancia, self) gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0) --> snaps - gump:Fade (instancia.botao_separar, 1) + instancia.botao_separar:SetAlpha (0) - elseif (instancia.baseframe.isLocked) then + elseif (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then gump:Fade (instancia.baseframe.lock_button, 1) gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0) + instancia.botao_separar:SetAlpha (0) end end @@ -309,57 +314,38 @@ local function OnEnterMainWindow (instancia, self) if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then --> resizes and lock button - gump:Fade (instancia.baseframe.resize_direita, 0) - gump:Fade (instancia.baseframe.resize_esquerda, 0) + instancia.baseframe.resize_direita:SetAlpha (1) + instancia.baseframe.resize_esquerda:SetAlpha (1) + gump:Fade (instancia.baseframe.lock_button, 0) --> stretch button gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0.6) --> snaps - if (modo == 0) then - for _, instancia_id in _pairs (instancia.snap) do - if (instancia_id) then - instancia.botao_separar.texture:Show() - instancia.botao_separar.texture:SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) - gump:Fade (instancia.botao_separar.texture, 0) - gump:Fade (instancia.botao_separar, 0) - break - end + for _, instancia_id in _pairs (instancia.snap) do + if (instancia_id) then + instancia.botao_separar:SetAlpha (1) + break end end - elseif (instancia.baseframe.isLocked) then + elseif (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and instancia.baseframe.isLocked) then gump:Fade (instancia.baseframe.lock_button, 0) gump:Fade (instancia.baseframe.button_stretch, "ALPHA", 0.6) + + --> snaps + for _, instancia_id in _pairs (instancia.snap) do + if (instancia_id) then + instancia.botao_separar:SetAlpha (1) + break + end + end end end _detalhes.OnEnterMainWindow = OnEnterMainWindow -local function resize_fade (instancia, modo) - if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then - gump:Fade (instancia.baseframe.resize_direita, modo) - gump:Fade (instancia.baseframe.resize_esquerda, modo) - gump:Fade (instancia.baseframe.lock_button, modo) - - if (modo == 0) then - for _, instancia_id in _pairs (instancia.snap) do - if (instancia_id) then - instancia.botao_separar.texture:Show() - instancia.botao_separar.texture:SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) - gump:Fade (instancia.botao_separar.texture, 0) - gump:Fade (instancia.botao_separar, 0) - break - end - end - else - gump:Fade (instancia.botao_separar, 1) - end - - end -end - local function VPL (instancia, esta_instancia) --> conferir esquerda if (instancia.ponto4.x < esta_instancia.ponto1.x) then --> a janela esta a esquerda @@ -447,27 +433,27 @@ local movement_onupdate = function (self, elapsed) end end -local function move_janela (BaseFrame, iniciando, instancia) +local function move_janela (baseframe, iniciando, instancia) instancia_alvo = _detalhes.tabela_instancias [instancia.meu_id-1] if (iniciando) then - BaseFrame.isMoving = true + baseframe.isMoving = true instancia:BaseFrameSnap() - BaseFrame:StartMoving() + baseframe:StartMoving() local _, ClampLeft, ClampRight = instancia:InstanciasHorizontais() local _, ClampBottom, ClampTop = instancia:InstanciasVerticais() if (ClampTop == 0) then - ClampTop = 33 + ClampTop = 0 end if (ClampBottom == 0) then - ClampBottom = 13 + ClampBottom = 0 end - BaseFrame:SetClampRectInsets (-ClampLeft-8, ClampRight, ClampTop, -ClampBottom) + baseframe:SetClampRectInsets (-ClampLeft, ClampRight, ClampTop, -ClampBottom) if (instancia_alvo) then @@ -504,7 +490,7 @@ local function move_janela (BaseFrame, iniciando, instancia) if (need_start) then --> se a instância não tiver sido aberta ainda - instancia_alvo:RestauraJanela (instancia_alvo.meu_id, true) --> problema do solo era aqui + instancia_alvo:RestauraJanela (instancia_alvo.meu_id, true) if (instancia_alvo:IsSoloMode()) then _detalhes.SoloTables:switch() end @@ -517,16 +503,16 @@ local function move_janela (BaseFrame, iniciando, instancia) need_start = false end - BaseFrame:SetScript ("OnUpdate", movement_onupdate) + baseframe:SetScript ("OnUpdate", movement_onupdate) end else - BaseFrame:StopMovingOrSizing() - BaseFrame.isMoving = false - BaseFrame:SetScript ("OnUpdate", nil) + baseframe:StopMovingOrSizing() + baseframe.isMoving = false + baseframe:SetScript ("OnUpdate", nil) - BaseFrame:SetClampRectInsets (unpack (_detalhes.window_clamp)) + --baseframe:SetClampRectInsets (unpack (_detalhes.window_clamp)) if (instancia_alvo) then instancia:AtualizaPontos() @@ -609,37 +595,33 @@ local function move_janela (BaseFrame, iniciando, instancia) end end -local function BGFrame_scripts (BG, BaseFrame, instancia) +local function BGFrame_scripts (BG, baseframe, instancia) BG:SetScript("OnEnter", function (self) - --resize_fade (instancia, 0) --mostrar - --gump:Fade (BaseFrame.button_stretch, "alpha", 0.6) OnEnterMainWindow (instancia, self) end) BG:SetScript("OnLeave", function (self) - --resize_fade (instancia, 1) --esconder - --gump:Fade (BaseFrame.button_stretch, -1) OnLeaveMainWindow (instancia, self) end) BG:SetScript ("OnMouseDown", function (frame, button) - if (BaseFrame.isMoving) then - move_janela (BaseFrame, false, instancia) + if (baseframe.isMoving) then + move_janela (baseframe, false, instancia) instancia:SaveMainWindowPosition() return end - if (not BaseFrame.isLocked and button == "LeftButton") then - move_janela (BaseFrame, true, instancia) --> novo movedor da janela + if (not baseframe.isLocked and button == "LeftButton") then + move_janela (baseframe, true, instancia) --> novo movedor da janela elseif (button == "RightButton") then _detalhes.switch:ShowMe (instancia) end end) BG:SetScript ("OnMouseUp", function (frame) - if (BaseFrame.isMoving) then - move_janela (BaseFrame, false, instancia) --> novo movedor da janela + if (baseframe.isMoving) then + move_janela (baseframe, false, instancia) --> novo movedor da janela instancia:SaveMainWindowPosition() end end) @@ -662,52 +644,44 @@ function gump:RegisterForDetailsMove (frame, instancia) end --> scripts do base frame -local function BFrame_scripts (BaseFrame, instancia) +local function BFrame_scripts (baseframe, instancia) - BaseFrame:SetScript("OnSizeChanged", function(self) + baseframe:SetScript("OnSizeChanged", function (self) instancia:SaveMainWindowPosition() instancia:ReajustaGump() _detalhes:SendEvent ("DETAILS_INSTANCE_SIZECHANGED", nil, instancia) end) - BaseFrame:SetScript("OnEnter", function (self) - --resize_fade (instancia, 0) --mostrar - --gump:Fade (BaseFrame.button_stretch, "alpha", 0.6) + baseframe:SetScript("OnEnter", function (self) OnEnterMainWindow (instancia, self) end) - BaseFrame:SetScript("OnLeave", function (self) - --resize_fade (instancia, 1) --esconder - --gump:Fade (BaseFrame.button_stretch, -1) + baseframe:SetScript("OnLeave", function (self) OnLeaveMainWindow (instancia, self) end) - BaseFrame:SetScript ("OnMouseDown", function (frame, button) - if (not BaseFrame.isLocked and button == "LeftButton") then - move_janela (BaseFrame, true, instancia) --> novo movedor da janela + baseframe:SetScript ("OnMouseDown", function (frame, button) + if (not baseframe.isLocked and button == "LeftButton") then + move_janela (baseframe, true, instancia) --> novo movedor da janela end end) - BaseFrame:SetScript ("OnMouseUp", function (frame) - if (BaseFrame.isMoving) then - move_janela (BaseFrame, false, instancia) --> novo movedor da janela + baseframe:SetScript ("OnMouseUp", function (frame) + if (baseframe.isMoving) then + move_janela (baseframe, false, instancia) --> novo movedor da janela instancia:SaveMainWindowPosition() end end) end -local function BackGroundDisplay_scripts (BackGroundDisplay, BaseFrame, instancia) +local function backgrounddisplay_scripts (backgrounddisplay, baseframe, instancia) - BackGroundDisplay:SetScript ("OnEnter", function (self) - --resize_fade (instancia, 0) --mostrar - --gump:Fade (BaseFrame.button_stretch, "alpha", 0.6) + backgrounddisplay:SetScript ("OnEnter", function (self) OnEnterMainWindow (instancia, self) end) - BackGroundDisplay:SetScript ("OnLeave", function (self) - --resize_fade (instancia, 1) --esconder - --gump:Fade (BaseFrame.button_stretch, -1) + backgrounddisplay:SetScript ("OnLeave", function (self) OnLeaveMainWindow (instancia, self) end) end @@ -957,21 +931,21 @@ local resizeTooltip = { {text = "|cff33CC00Click|cffEEEEEE: ".. Loc ["STRING_RESIZE_COMMON"]}, {text = "+|cff33CC00 Click|cffEEEEEE: " .. Loc ["STRING_RESIZE_HORIZONTAL"]}, - {icon = "Interface\\AddOns\\Details\\images\\key_shift", width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625}, + {icon = [[Interface\AddOns\Details\images\key_shift]], width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625}, {text = "+|cff33CC00 Click|cffEEEEEE: " .. Loc ["STRING_RESIZE_VERTICAL"]}, - {icon = "Interface\\AddOns\\Details\\images\\key_alt", width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625}, + {icon = [[Interface\AddOns\Details\images\key_alt]], width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625}, {text = "+|cff33CC00 Click|cffEEEEEE: " .. Loc ["STRING_RESIZE_ALL"]}, - {icon = "Interface\\AddOns\\Details\\images\\key_ctrl", width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625} + {icon = [[Interface\AddOns\Details\images\key_ctrl]], width = 24, height = 14, l = 0, r = 1, t = 0, b =0.640625} } --> search key: ~resizescript -local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe) +local function resize_scripts (resizer, instancia, scrollbar, side, baseframe) resizer:SetScript ("OnMouseDown", function (self, button) - _detalhes.popup:ShowMe (false) --> Hide Cooltip + _G.GameCooltip:ShowMe (false) --> Hide Cooltip if (not self:GetParent().isLocked and button == "LeftButton" and instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"]) then self:GetParent().isResizing = true @@ -999,39 +973,39 @@ local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe) if (side == "<") then if (_IsShiftKeyDown()) then - instancia.baseframe:StartSizing("LEFT") + instancia.baseframe:StartSizing("left") instancia.eh_horizontal = true elseif (_IsAltKeyDown()) then - instancia.baseframe:StartSizing("TOP") + instancia.baseframe:StartSizing("top") instancia.eh_vertical = true elseif (_IsControlKeyDown()) then - instancia.baseframe:StartSizing("BOTTOMLEFT") + instancia.baseframe:StartSizing("bottomleft") instancia.eh_tudo = true else - instancia.baseframe:StartSizing("BOTTOMLEFT") + instancia.baseframe:StartSizing("bottomleft") end - resizer:SetPoint ("BOTTOMLEFT", baseframe, "BOTTOMLEFT", -1, -1) + resizer:SetPoint ("bottomleft", baseframe, "bottomleft", -1, -1) resizer.afundado = true elseif (side == ">") then if (_IsShiftKeyDown()) then - instancia.baseframe:StartSizing("RIGHT") + instancia.baseframe:StartSizing("right") instancia.eh_horizontal = true elseif (_IsAltKeyDown()) then - instancia.baseframe:StartSizing("TOP") + instancia.baseframe:StartSizing("top") instancia.eh_vertical = true elseif (_IsControlKeyDown()) then - instancia.baseframe:StartSizing("BOTTOMRIGHT") + instancia.baseframe:StartSizing("bottomright") instancia.eh_tudo = true else - instancia.baseframe:StartSizing("BOTTOMRIGHT") + instancia.baseframe:StartSizing("bottomright") end if (instancia.rolagem and _detalhes.use_scroll) then - resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", (instancia.largura_scroll*-1) + 1, -1) + resizer:SetPoint ("bottomright", baseframe, "bottomright", (instancia.largura_scroll*-1) + 1, -1) else - resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", 1, -1) + resizer:SetPoint ("bottomright", baseframe, "bottomright", 1, -1) end resizer.afundado = true end @@ -1047,12 +1021,12 @@ local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe) resizer.afundado = false if (resizer.side == 2) then if (instancia.rolagem and _detalhes.use_scroll) then - resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", instancia.largura_scroll*-1, 0) + resizer:SetPoint ("bottomright", baseframe, "bottomright", instancia.largura_scroll*-1, 0) else - resizer:SetPoint ("BOTTOMRIGHT", baseframe, "BOTTOMRIGHT", 0, 0) + resizer:SetPoint ("bottomright", baseframe, "bottomright", 0, 0) end else - resizer:SetPoint ("BOTTOMLEFT", baseframe, "BOTTOMLEFT", 0, 0) + resizer:SetPoint ("bottomleft", baseframe, "bottomleft", 0, 0) end end @@ -1120,11 +1094,18 @@ local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe) end end) + resizer:SetScript ("OnHide", function (self) + if (self.going_hide) then + _G.GameCooltip:ShowMe (false) + self.going_hide = nil + end + end) + resizer:SetScript ("OnEnter", function (self) - - OnEnterMainWindow (instancia, self) - - if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked) then + if (instancia.modo ~= _detalhes._detalhes_props["MODO_ALONE"] and not instancia.baseframe.isLocked and not self.mostrando) then + + OnEnterMainWindow (instancia, self) + self.texture:SetBlendMode ("ADD") self.mostrando = true @@ -1139,20 +1120,24 @@ local function resize_scripts (resizer, instancia, ScrollBar, side, baseframe) resizer:SetScript ("OnLeave", function (self) - if (not self.movendo) then - OnLeaveMainWindow (instancia, self) + if (self.mostrando) then + + resizer.going_hide = true + if (not self.movendo) then + OnLeaveMainWindow (instancia, self) + end + + self.texture:SetBlendMode ("BLEND") + self.mostrando = false + + _G.GameCooltip:ShowMe (false) end - - self.texture:SetBlendMode ("BLEND") - _detalhes.popup:ShowMe (false) - - self.mostrando = false end) end local function lock_button_scripts (button, instancia) - button:SetScript ("OnEnter", function(self) + button:SetScript ("OnEnter", function (self) OnEnterMainWindow (instancia, self) @@ -1163,7 +1148,7 @@ local function lock_button_scripts (button, instancia) end) - button:SetScript ("OnLeave", function(self) + button:SetScript ("OnLeave", function (self) OnLeaveMainWindow (instancia, self) self.label:SetTextColor (.3, .3, .3, .6) @@ -1173,25 +1158,25 @@ local function lock_button_scripts (button, instancia) end local lockFunctionOnClick = function (button) - local BaseFrame = button:GetParent() - if (BaseFrame.isLocked) then - BaseFrame.isLocked = false - BaseFrame.instance.isLocked = false + local baseframe = button:GetParent() + if (baseframe.isLocked) then + baseframe.isLocked = false + baseframe.instance.isLocked = false button.label:SetText (Loc ["STRING_LOCK_WINDOW"]) button:SetWidth (button.label:GetStringWidth()+2) - gump:Fade (BaseFrame.resize_direita, 0) - gump:Fade (BaseFrame.resize_esquerda, 0) + baseframe.resize_direita:SetAlpha (1) + baseframe.resize_esquerda:SetAlpha (1) button:ClearAllPoints() - button:SetPoint ("right", BaseFrame.resize_direita, "left", -1, 1.5) + button:SetPoint ("right", baseframe.resize_direita, "left", -1, 1.5) else - BaseFrame.isLocked = true - BaseFrame.instance.isLocked = true + baseframe.isLocked = true + baseframe.instance.isLocked = true button.label:SetText (Loc ["STRING_UNLOCK_WINDOW"]) button:SetWidth (button.label:GetStringWidth()+2) button:ClearAllPoints() - button:SetPoint ("bottomright", BaseFrame, "bottomright", -3, 0) - gump:Fade (BaseFrame.resize_direita, 1) - gump:Fade (BaseFrame.resize_esquerda, 1) + button:SetPoint ("bottomright", baseframe, "bottomright", -3, 0) + baseframe.resize_direita:SetAlpha (0) + baseframe.resize_esquerda:SetAlpha (0) end end _detalhes.lock_instance_function = lockFunctionOnClick @@ -1212,14 +1197,12 @@ local function barra_scripts (esta_barra, instancia, i) esta_barra:SetScript ("OnEnter", function (self) self.mouse_over = true - --resize_fade (instancia, 0) --mostrar - --gump:Fade (instancia.baseframe.button_stretch, "alpha", 0.6) OnEnterMainWindow (instancia, esta_barra) instancia:MontaTooltip (self, i) self:SetBackdrop({ - bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", + bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16, insets = {left = 1, right = 1, top = 0, bottom = 1},}) self:SetBackdropColor (0.588, 0.588, 0.588, 0.7) @@ -1227,12 +1210,10 @@ local function barra_scripts (esta_barra, instancia, i) esta_barra:SetScript ("OnLeave", function (self) self.mouse_over = false - --resize_fade (instancia, 1) --esconder - --gump:Fade (instancia.baseframe.button_stretch, -1) OnLeaveMainWindow (instancia, self) _GameTooltip:Hide() - _detalhes.popup:ShowMe (false) + _G.GameCooltip:ShowMe (false) self:SetBackdrop({ bgFile = "", edgeFile = "", tile = true, tileSize = 16, edgeSize = 32, @@ -1252,8 +1233,8 @@ local function barra_scripts (esta_barra, instancia, i) return _detalhes.switch:ShowMe (instancia) end - esta_barra.texto_esquerdo:SetPoint ("LEFT", esta_barra.icone_classe, "right", 4, -1) - esta_barra.texto_direita:SetPoint ("RIGHT", esta_barra.statusbar, "RIGHT", 1, -1) + esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 4, -1) + esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right", 1, -1) self.mouse_down = _GetTime() self.button = button @@ -1283,8 +1264,8 @@ local function barra_scripts (esta_barra, instancia, i) end - esta_barra.texto_esquerdo:SetPoint ("LEFT", esta_barra.icone_classe, "right", 3, 0) - esta_barra.texto_direita:SetPoint ("RIGHT", esta_barra.statusbar, "RIGHT") + esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 3, 0) + esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right") local x, y = _GetCursorPosition() x = _math_floor (x) @@ -1304,7 +1285,7 @@ local function barra_scripts (esta_barra, instancia, i) end end) - esta_barra:SetScript ("OnClick", function(self, button) + esta_barra:SetScript ("OnClick", function (self, button) end) end @@ -1323,8 +1304,8 @@ function _detalhes:ReportSingleLine (instancia, barra) return _detalhes:Reportar (reportar, {_no_current = true, _no_inverse = true, _custom = true}) end -local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) - local button = BaseFrame.button_stretch +local function button_stretch_scripts (baseframe, backgrounddisplay, instancia) + local button = baseframe.button_stretch button:SetScript ("OnEnter", function (self) self.mouse_over = true @@ -1335,27 +1316,31 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) gump:Fade (self, "ALPHA", 0) end) - button:SetScript ("OnMouseDown", function(self) + button:SetScript ("OnMouseDown", function (self) if (instancia:IsSoloMode()) then return end instancia:EsconderScrollBar (true) - BaseFrame._place = instancia:SaveMainWindowPosition() - BaseFrame.isResizing = true - BaseFrame.isStretching = true - BaseFrame:SetFrameStrata ("TOOLTIP") + baseframe._place = instancia:SaveMainWindowPosition() + baseframe.isResizing = true + baseframe.isStretching = true + baseframe:SetFrameStrata ("TOOLTIP") - local _r, _g, _b, _a = BaseFrame:GetBackdropColor() - gump:GradientEffect ( BaseFrame, "frame", _r, _g, _b, _a, _r, _g, _b, 0.9, 1.5) + local _r, _g, _b, _a = baseframe:GetBackdropColor() + gump:GradientEffect ( baseframe, "frame", _r, _g, _b, _a, _r, _g, _b, 0.9, 1.5) if (instancia.wallpaper.enabled) then - _r, _g, _b = BaseFrame.wallpaper:GetVertexColor() - _a = BaseFrame.wallpaper:GetAlpha() - gump:GradientEffect (BaseFrame.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, 0.05, 0.5) + _r, _g, _b = baseframe.wallpaper:GetVertexColor() + _a = baseframe.wallpaper:GetAlpha() + gump:GradientEffect (baseframe.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, 0.05, 0.5) end - BaseFrame:StartSizing ("TOP") + if (instancia.stretch_button_side == 1) then + baseframe:StartSizing ("top") + elseif (instancia.stretch_button_side == 2) then + baseframe:StartSizing ("bottom") + end local linha_horizontal = {} @@ -1414,12 +1399,12 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) return end - if (BaseFrame.isResizing) then - BaseFrame:StopMovingOrSizing() - BaseFrame.isResizing = false - instancia:RestoreMainWindowPosition (BaseFrame._place) + if (baseframe.isResizing) then + baseframe:StopMovingOrSizing() + baseframe.isResizing = false + instancia:RestoreMainWindowPosition (baseframe._place) instancia:ReajustaGump() - BaseFrame.isStretching = false + baseframe.isStretching = false if (instancia.need_rolagem) then instancia:MostrarScrollBar (true) end @@ -1455,16 +1440,16 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) end - local _r, _g, _b, _a = BaseFrame:GetBackdropColor() - gump:GradientEffect ( BaseFrame, "frame", _r, _g, _b, _a, instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha, 0.5) + local _r, _g, _b, _a = baseframe:GetBackdropColor() + gump:GradientEffect ( baseframe, "frame", _r, _g, _b, _a, instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha, 0.5) if (instancia.wallpaper.enabled) then - _r, _g, _b = BaseFrame.wallpaper:GetVertexColor() - _a = BaseFrame.wallpaper:GetAlpha() - gump:GradientEffect (BaseFrame.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, instancia.wallpaper.alpha, 1.0) + _r, _g, _b = baseframe.wallpaper:GetVertexColor() + _a = baseframe.wallpaper:GetAlpha() + gump:GradientEffect (baseframe.wallpaper, "texture", _r, _g, _b, _a, _r, _g, _b, instancia.wallpaper.alpha, 1.0) end - BaseFrame:SetFrameStrata ("LOW") - BaseFrame.button_stretch:SetFrameStrata ("FULLSCREEN") + baseframe:SetFrameStrata ("LOW") + baseframe.button_stretch:SetFrameStrata ("FULLSCREEN") _detalhes:SnapTextures (false) @@ -1472,15 +1457,15 @@ local function button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) end) end -local function button_down_scripts (main_frame, BackGroundDisplay, instancia, ScrollBar) +local function button_down_scripts (main_frame, backgrounddisplay, instancia, scrollbar) main_frame.button_down:SetScript ("OnMouseDown", function(self) - if (not ScrollBar:IsEnabled()) then + if (not scrollbar:IsEnabled()) then return end local B = instancia.barraS[2] - if (B < instancia.barrasInfo.mostrando) then - ScrollBar:SetValue (ScrollBar:GetValue() + instancia.barrasInfo.alturaReal) + if (B < instancia.rows_showing) then + scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height) end self.precionado = true @@ -1490,8 +1475,8 @@ local function button_down_scripts (main_frame, BackGroundDisplay, instancia, Sc if (self.last_up > 0.03) then self.last_up = 0 B = instancia.barraS[2] - if (B < instancia.barrasInfo.mostrando) then - ScrollBar:SetValue (ScrollBar:GetValue() + instancia.barrasInfo.alturaReal) + if (B < instancia.rows_showing) then + scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height) else self:Disable() end @@ -1499,33 +1484,33 @@ local function button_down_scripts (main_frame, BackGroundDisplay, instancia, Sc end) end) - main_frame.button_down:SetScript ("OnMouseUp", function(self) + main_frame.button_down:SetScript ("OnMouseUp", function (self) self.precionado = false self:SetScript ("OnUpdate", nil) end) end -local function button_up_scripts (main_frame, BackGroundDisplay, instancia, ScrollBar) +local function button_up_scripts (main_frame, backgrounddisplay, instancia, scrollbar) main_frame.button_up:SetScript ("OnMouseDown", function(self) - if (not ScrollBar:IsEnabled()) then + if (not scrollbar:IsEnabled()) then return end local A = instancia.barraS[1] if (A > 1) then - ScrollBar:SetValue (ScrollBar:GetValue() - instancia.barrasInfo.alturaReal) + scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height) end self.precionado = true self.last_up = -0.3 - self:SetScript ("OnUpdate", function(self, elapsed) + self:SetScript ("OnUpdate", function (self, elapsed) self.last_up = self.last_up + elapsed if (self.last_up > 0.03) then self.last_up = 0 A = instancia.barraS[1] if (A > 1) then - ScrollBar:SetValue (ScrollBar:GetValue() - instancia.barrasInfo.alturaReal) + scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height) else self:Disable() end @@ -1533,47 +1518,47 @@ local function button_up_scripts (main_frame, BackGroundDisplay, instancia, Scro end) end) - main_frame.button_up:SetScript ("OnMouseUp", function(self) + main_frame.button_up:SetScript ("OnMouseUp", function (self) self.precionado = false self:SetScript ("OnUpdate", nil) end) main_frame.button_up:SetScript ("OnEnable", function (self) - local current = ScrollBar:GetValue() + local current = scrollbar:GetValue() if (current == 0) then main_frame.button_up:Disable() end end) end -local function iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseFrame, ScrollBar, instancia) +local function iterate_scroll_scripts (backgrounddisplay, backgroundframe, baseframe, scrollbar, instancia) - BaseFrame:SetScript ("OnMouseWheel", + baseframe:SetScript ("OnMouseWheel", function (self, delta) if (delta > 0) then --> rolou pra cima local A = instancia.barraS[1] if (A > 1) then - ScrollBar:SetValue (ScrollBar:GetValue() - instancia.barrasInfo.alturaReal) + scrollbar:SetValue (scrollbar:GetValue() - instancia.row_height) else - ScrollBar:SetValue (0) - ScrollBar.ultimo = 0 - BaseFrame.button_up:Disable() + scrollbar:SetValue (0) + scrollbar.ultimo = 0 + baseframe.button_up:Disable() end elseif (delta < 0) then --> rolou pra baixo local B = instancia.barraS[2] - if (B < instancia.barrasInfo.mostrando) then - ScrollBar:SetValue (ScrollBar:GetValue() + instancia.barrasInfo.alturaReal) + if (B < instancia.rows_showing) then + scrollbar:SetValue (scrollbar:GetValue() + instancia.row_height) else - local _, maxValue = ScrollBar:GetMinMaxValues() - ScrollBar:SetValue (maxValue) - ScrollBar.ultimo = maxValue - BaseFrame.button_down:Disable() + local _, maxValue = scrollbar:GetMinMaxValues() + scrollbar:SetValue (maxValue) + scrollbar.ultimo = maxValue + baseframe.button_down:Disable() end end end) - ScrollBar:SetScript ("OnValueChanged", function(self) + scrollbar:SetScript ("OnValueChanged", function (self) local ultimo = self.ultimo local meu_valor = self:GetValue() if (ultimo == meu_valor) then --> não mudou @@ -1581,47 +1566,47 @@ local function iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseF end --> shortcut - local minValue, maxValue = ScrollBar:GetMinMaxValues() + local minValue, maxValue = scrollbar:GetMinMaxValues() if (minValue == meu_valor) then instancia.barraS[1] = 1 - instancia.barraS[2] = instancia.barrasInfo.cabem + instancia.barraS[2] = instancia.rows_fit_in_window instancia:AtualizaGumpPrincipal (instancia, true) self.ultimo = meu_valor - BaseFrame.button_up:Disable() + baseframe.button_up:Disable() return elseif (maxValue == meu_valor) then - local min = instancia.barrasInfo.mostrando -instancia.barrasInfo.cabem + local min = instancia.rows_showing -instancia.rows_fit_in_window min = min+1 if (min < 1) then min = 1 end instancia.barraS[1] = min - instancia.barraS[2] = instancia.barrasInfo.mostrando + instancia.barraS[2] = instancia.rows_showing instancia:AtualizaGumpPrincipal (instancia, true) self.ultimo = meu_valor - BaseFrame.button_down:Disable() + baseframe.button_down:Disable() return end - if (not BaseFrame.button_up:IsEnabled()) then - BaseFrame.button_up:Enable() + if (not baseframe.button_up:IsEnabled()) then + baseframe.button_up:Enable() end - if (not BaseFrame.button_down:IsEnabled()) then - BaseFrame.button_down:Enable() + if (not baseframe.button_down:IsEnabled()) then + baseframe.button_down:Enable() end if (meu_valor > ultimo) then --> scroll down local B = instancia.barraS[2] - if (B < instancia.barrasInfo.mostrando) then --> se o valor maximo não for o máximo de barras a serem mostradas - local precisa_passar = ((B+1) * instancia.barrasInfo.alturaReal) - (instancia.barrasInfo.alturaReal*instancia.barrasInfo.cabem) + if (B < instancia.rows_showing) then --> se o valor maximo não for o máximo de barras a serem mostradas + local precisa_passar = ((B+1) * instancia.row_height) - (instancia.row_height*instancia.rows_fit_in_window) if (meu_valor > precisa_passar) then --> o valor atual passou o valor que precisa passar pra locomover local diff = meu_valor - ultimo --> pega a diferença de H - diff = diff / instancia.barrasInfo.alturaReal --> calcula quantas barras ele pulou + diff = diff / instancia.row_height --> calcula quantas barras ele pulou diff = _math_ceil (diff) --> arredonda para cima - if (instancia.barraS[2]+diff > instancia.barrasInfo.mostrando and ultimo > 0) then - instancia.barraS[1] = instancia.barrasInfo.mostrando - (instancia.barrasInfo.cabem-1) - instancia.barraS[2] = instancia.barrasInfo.mostrando + if (instancia.barraS[2]+diff > instancia.rows_showing and ultimo > 0) then + instancia.barraS[1] = instancia.rows_showing - (instancia.rows_fit_in_window-1) + instancia.barraS[2] = instancia.rows_showing else instancia.barraS[2] = instancia.barraS[2]+diff instancia.barraS[1] = instancia.barraS[1]+diff @@ -1632,14 +1617,14 @@ local function iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseF else --> scroll up local A = instancia.barraS[1] if (A > 1) then - local precisa_passar = (A-1) * instancia.barrasInfo.alturaReal + local precisa_passar = (A-1) * instancia.row_height if (meu_valor < precisa_passar) then --> calcula quantas barras passou local diff = ultimo - meu_valor - diff = diff / instancia.barrasInfo.alturaReal + diff = diff / instancia.row_height diff = _math_ceil (diff) if (instancia.barraS[1]-diff < 1) then - instancia.barraS[2] = instancia.barrasInfo.cabem + instancia.barraS[2] = instancia.rows_fit_in_window instancia.barraS[1] = 1 else instancia.barraS[2] = instancia.barraS[2]-diff @@ -1725,18 +1710,18 @@ function _detalhes:InstanceAlert (msg, icon, time, clickfunc) self.alert:Show() end -function CreateAlertFrame (BaseFrame, instancia) +function CreateAlertFrame (baseframe, instancia) - local alert_bg = CreateFrame ("frame", nil, BaseFrame) - alert_bg:SetPoint ("bottom", BaseFrame, "bottom") - alert_bg:SetPoint ("left", BaseFrame, "left", 3, 0) - alert_bg:SetPoint ("right", BaseFrame, "right", -3, 0) + local alert_bg = CreateFrame ("frame", nil, baseframe) + alert_bg:SetPoint ("bottom", baseframe, "bottom") + alert_bg:SetPoint ("left", baseframe, "left", 3, 0) + alert_bg:SetPoint ("right", baseframe, "right", -3, 0) alert_bg:SetHeight (12) - alert_bg:SetBackdrop ({bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, + alert_bg:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) alert_bg:SetBackdropColor (.1, .1, .1, 1) alert_bg:SetFrameStrata ("HIGH") - alert_bg:SetFrameLevel (BaseFrame:GetFrameLevel() + 6) + alert_bg:SetFrameLevel (baseframe:GetFrameLevel() + 6) alert_bg:Hide() local toptexture = alert_bg:CreateTexture (nil, "background") @@ -1827,401 +1812,378 @@ end --> inicio function gump:CriaJanelaPrincipal (ID, instancia, criando) - local BaseFrame = _CreateFrame ("ScrollFrame", "DetailsBaseFrame"..ID, _UIParent) - BaseFrame.instance = instancia - BaseFrame:SetFrameStrata ("LOW") - BaseFrame:SetFrameLevel (2) +-- main frames ----------------------------------------------------------------------------------------------------------------------------------------------- - local BackGroundFrame = _CreateFrame ("ScrollFrame", "Details_WindowFrame"..ID, BaseFrame) --> janela principal - local BackGroundDisplay = _CreateFrame ("Frame", "Details_GumpFrame"..ID, BackGroundFrame) --corpo - BackGroundFrame:SetFrameLevel (3) - BackGroundDisplay:SetFrameLevel (3) + local baseframe = CreateFrame ("scrollframe", "DetailsBaseFrame"..ID, _UIParent) --> main frame + baseframe.instance = instancia + baseframe:SetFrameStrata ("LOW") + baseframe:SetFrameLevel (2) - local SwitchButton = gump:NewDetailsButton (BackGroundDisplay, BaseFrame, _, function() end, nil, nil, 1, 1, "", "", "", "", + local backgroundframe = CreateFrame ("scrollframe", "Details_WindowFrame"..ID, baseframe) --> main window + local backgrounddisplay = CreateFrame ("frame", "Details_GumpFrame"..ID, backgroundframe) --> background window + backgroundframe:SetFrameLevel (3) + backgrounddisplay:SetFrameLevel (3) + + local switchbutton = gump:NewDetailsButton (backgrounddisplay, baseframe, _, function() end, nil, nil, 1, 1, "", "", "", "", {rightFunc = {func = function() _detalhes.switch:ShowMe (instancia) end, param1 = nil, param2 = nil}}) - SwitchButton:SetPoint ("topleft", BackGroundDisplay, "topleft") - SwitchButton:SetPoint ("bottomright", BackGroundDisplay, "bottomright") - SwitchButton:SetFrameLevel (BackGroundDisplay:GetFrameLevel()+1) + switchbutton:SetPoint ("topleft", backgrounddisplay, "topleft") + switchbutton:SetPoint ("bottomright", backgrounddisplay, "bottomright") + switchbutton:SetFrameLevel (backgrounddisplay:GetFrameLevel()+1) - local ScrollBar = _CreateFrame ("Slider", "Details_ScrollBar"..ID, BackGroundDisplay) --> scroll +-- scroll bar ----------------------------------------------------------------------------------------------------------------------------------------------- --- textura da scroll bar -------------------------------------------------------------------------------------------------------------------------------------------------- + local scrollbar = CreateFrame ("slider", "Details_ScrollBar"..ID, backgrounddisplay) --> scroll + --> scroll image-node up - BaseFrame.scroll_up = BackGroundDisplay:CreateTexture (nil, "BACKGROUND") - BaseFrame.scroll_up:SetPoint ("TOPLEFT", BackGroundDisplay, "TOPRIGHT", 0, 0) - BaseFrame.scroll_up:SetTexture (DEFAULT_SKIN) - BaseFrame.scroll_up:SetTexCoord (unpack (COORDS_SLIDER_TOP)) - BaseFrame.scroll_up:SetWidth (32) - BaseFrame.scroll_up:SetHeight (32) - --BaseFrame.scroll_up:SetTexture ("Interface\\AddOns\\Details\\images\\scrollbar") - --BaseFrame.scroll_up:SetTexCoord (0, 1, 0, 0.25) + baseframe.scroll_up = backgrounddisplay:CreateTexture (nil, "background") + baseframe.scroll_up:SetPoint ("topleft", backgrounddisplay, "topright", 0, 0) + baseframe.scroll_up:SetTexture (DEFAULT_SKIN) + baseframe.scroll_up:SetTexCoord (unpack (COORDS_SLIDER_TOP)) + baseframe.scroll_up:SetWidth (32) + baseframe.scroll_up:SetHeight (32) --> scroll image-node down - BaseFrame.scroll_down = BackGroundDisplay:CreateTexture (nil, "BACKGROUND") - BaseFrame.scroll_down:SetPoint ("BOTTOMLEFT", BackGroundDisplay, "BOTTOMRIGHT", 0, 0) - BaseFrame.scroll_down:SetTexture (DEFAULT_SKIN) - BaseFrame.scroll_down:SetTexCoord (unpack (COORDS_SLIDER_DOWN)) - BaseFrame.scroll_down:SetWidth (32) - BaseFrame.scroll_down:SetHeight (32) - --BaseFrame.scroll_down:SetTexture ("Interface\\AddOns\\Details\\images\\scrollbar") - --BaseFrame.scroll_down:SetTexCoord (0, 1, 0.751, 1) + baseframe.scroll_down = backgrounddisplay:CreateTexture (nil, "background") + baseframe.scroll_down:SetPoint ("bottomleft", backgrounddisplay, "bottomright", 0, 0) + baseframe.scroll_down:SetTexture (DEFAULT_SKIN) + baseframe.scroll_down:SetTexCoord (unpack (COORDS_SLIDER_DOWN)) + baseframe.scroll_down:SetWidth (32) + baseframe.scroll_down:SetHeight (32) --> scroll image-node middle - BaseFrame.scroll_middle = BackGroundDisplay:CreateTexture (nil, "BACKGROUND") - BaseFrame.scroll_middle:SetPoint ("TOP", BaseFrame.scroll_up, "BOTTOM", 0, 8) - BaseFrame.scroll_middle:SetPoint ("BOTTOM", BaseFrame.scroll_down, "TOP", 0, -11) - BaseFrame.scroll_middle:SetTexture (DEFAULT_SKIN) - BaseFrame.scroll_middle:SetTexCoord (unpack (COORDS_SLIDER_MIDDLE)) - BaseFrame.scroll_middle:SetWidth (32) - BaseFrame.scroll_middle:SetHeight (64) - --BaseFrame.scroll_middle:SetTexCoord (0, 1, 0.251, 0.75) - --BaseFrame.scroll_middle:SetTexture ("Interface\\AddOns\\Details\\images\\scrollbar") + baseframe.scroll_middle = backgrounddisplay:CreateTexture (nil, "background") + baseframe.scroll_middle:SetPoint ("top", baseframe.scroll_up, "bottom", 0, 8) + baseframe.scroll_middle:SetPoint ("bottom", baseframe.scroll_down, "top", 0, -11) + baseframe.scroll_middle:SetTexture (DEFAULT_SKIN) + baseframe.scroll_middle:SetTexCoord (unpack (COORDS_SLIDER_MIDDLE)) + baseframe.scroll_middle:SetWidth (32) + baseframe.scroll_middle:SetHeight (64) - --> três botões scroll up, down, window strech - BaseFrame.button_up = _CreateFrame ("Button", nil, BackGroundDisplay) - BaseFrame.button_down = _CreateFrame ("Button", nil, BackGroundDisplay) - BaseFrame.button_stretch = _CreateFrame ("Button", nil, BaseFrame) + --> scroll widgets + baseframe.button_up = CreateFrame ("button", nil, backgrounddisplay) + baseframe.button_down = CreateFrame ("button", nil, backgrounddisplay) - BaseFrame.button_stretch:SetPoint ("BOTTOM", BaseFrame, "TOP", 0, 20) - BaseFrame.button_stretch:SetPoint ("RIGHT", BaseFrame, "RIGHT", -27, 0) - BaseFrame.button_stretch:SetFrameStrata ("FULLSCREEN") - - local stretch_texture = BaseFrame.button_stretch:CreateTexture (nil, "overlay") - stretch_texture:SetTexture (DEFAULT_SKIN) - stretch_texture:SetTexCoord (unpack (COORDS_STRETCH)) - stretch_texture:SetWidth (32) - stretch_texture:SetHeight (16) - stretch_texture:SetAllPoints (BaseFrame.button_stretch) - BaseFrame.button_stretch.texture = stretch_texture - - BaseFrame.button_stretch:SetWidth (32) - BaseFrame.button_stretch:SetHeight (16) - gump:Fade (BaseFrame.button_stretch, "ALPHA", 0) - - BaseFrame.button_stretch:Show() + baseframe.button_up:SetWidth (29) + baseframe.button_up:SetHeight (32) + baseframe.button_up:SetNormalTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Up]]) + baseframe.button_up:SetPushedTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Down]]) + baseframe.button_up:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollUpButton-Disabled]]) + baseframe.button_up:Disable() - BaseFrame.button_up:SetWidth (29) - BaseFrame.button_up:SetHeight (32) - BaseFrame.button_up:SetNormalTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Up") - BaseFrame.button_up:SetPushedTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Down") - BaseFrame.button_up:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollUpButton-Disabled") - BaseFrame.button_up:Disable() + baseframe.button_down:SetWidth (29) + baseframe.button_down:SetHeight (32) + baseframe.button_down:SetNormalTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Up]]) + baseframe.button_down:SetPushedTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Down]]) + baseframe.button_down:SetDisabledTexture ([[Interface\BUTTONS\UI-ScrollBar-ScrollDownButton-Disabled]]) + baseframe.button_down:Disable() - BaseFrame.button_down:SetWidth (29) - BaseFrame.button_down:SetHeight (32) - BaseFrame.button_down:SetNormalTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Up") - BaseFrame.button_down:SetPushedTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Down") - BaseFrame.button_down:SetDisabledTexture ("Interface\\BUTTONS\\UI-ScrollBar-ScrollDownButton-Disabled") - BaseFrame.button_down:Disable() + baseframe.button_up:SetPoint ("topright", baseframe.scroll_up, "topright", -4, 3) + baseframe.button_down:SetPoint ("bottomright", baseframe.scroll_down, "bottomright", -4, -6) - BaseFrame.button_up:SetPoint ("TOPRIGHT", BaseFrame.scroll_up, "TOPRIGHT", -4, 3) - BaseFrame.button_down:SetPoint ("BOTTOMRIGHT", BaseFrame.scroll_down, "BOTTOMRIGHT", -4, -6) + scrollbar:SetPoint ("top", baseframe.button_up, "bottom", 0, 12) + scrollbar:SetPoint ("bottom", baseframe.button_down, "top", 0, -12) + scrollbar:SetPoint ("left", backgrounddisplay, "right", 3, 0) + scrollbar:Show() - ScrollBar:SetPoint ("TOP", BaseFrame.button_up, "BOTTOM", 0, 12) - ScrollBar:SetPoint ("BOTTOM", BaseFrame.button_down, "TOP", 0, -12) - ScrollBar:SetPoint ("LEFT", BackGroundDisplay, "RIGHT", 3, 0) - ScrollBar:Show() + --> config set + scrollbar:SetOrientation ("VERTICAL") + scrollbar.scrollMax = 0 --default - tamanho da janela de fundo + scrollbar:SetMinMaxValues (0, 0) + scrollbar:SetValue (0) + scrollbar.ultimo = 0 + + --> thumb + scrollbar.thumb = scrollbar:CreateTexture (nil, "overlay") + scrollbar.thumb:SetTexture ([[Interface\Buttons\UI-ScrollBar-Knob]]) + scrollbar.thumb:SetSize (29, 30) + scrollbar:SetThumbTexture (scrollbar.thumb) + + --> scripts + button_down_scripts (baseframe, backgrounddisplay, instancia, scrollbar) + button_up_scripts (baseframe, backgrounddisplay, instancia, scrollbar) - button_stretch_scripts (BaseFrame, BackGroundDisplay, instancia) - - button_down_scripts (BaseFrame, BackGroundDisplay, instancia, ScrollBar) - button_up_scripts (BaseFrame, BackGroundDisplay, instancia, ScrollBar) +-- stretch button ----------------------------------------------------------------------------------------------------------------------------------------------- + baseframe.button_stretch = CreateFrame ("button", nil, baseframe) + baseframe.button_stretch:SetPoint ("bottom", baseframe, "top", 0, 20) + baseframe.button_stretch:SetPoint ("right", baseframe, "right", -27, 0) + baseframe.button_stretch:SetFrameStrata ("FULLSCREEN") ---slider -------------------------------------------------------------------------------------------------------------------------------------------------- - ScrollBar.scrollMax = 0 --default - tamanho da janela de fundo - - -- coisinha do meio - ScrollBar.thumb = ScrollBar:CreateTexture (nil, "OVERLAY") - ScrollBar.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob") - ScrollBar.thumb:SetSize (29, 30) - ScrollBar:SetThumbTexture (ScrollBar.thumb) - - ScrollBar:SetOrientation ("VERTICAL") - ScrollBar:SetMinMaxValues(0, ScrollBar.scrollMax) - ScrollBar:SetValue(0) - ScrollBar.ultimo = 0 + local stretch_texture = baseframe.button_stretch:CreateTexture (nil, "overlay") + stretch_texture:SetTexture (DEFAULT_SKIN) + stretch_texture:SetTexCoord (unpack (COORDS_STRETCH)) + stretch_texture:SetWidth (32) + stretch_texture:SetHeight (16) + stretch_texture:SetAllPoints (baseframe.button_stretch) + baseframe.button_stretch.texture = stretch_texture + + baseframe.button_stretch:SetWidth (32) + baseframe.button_stretch:SetHeight (16) + + baseframe.button_stretch:Show() + gump:Fade (baseframe.button_stretch, "ALPHA", 0) --- janela principal -------------------------------------------------------------------------------------------------------------------------------------------------- + button_stretch_scripts (baseframe, backgrounddisplay, instancia) - BaseFrame:SetClampedToScreen (true) - BaseFrame:SetClampRectInsets (unpack (_detalhes.window_clamp)) - - BaseFrame:SetWidth (_detalhes.new_window_size.width) - BaseFrame:SetHeight (_detalhes.new_window_size.height) - - BaseFrame:SetPoint ("CENTER", _UIParent) - BaseFrame:EnableMouseWheel (false) - BaseFrame:EnableMouse (true) - BaseFrame:SetMovable (true) - BaseFrame:SetResizable (true) - BaseFrame:SetMinResize (150, 40) - BaseFrame:SetMaxResize (_detalhes.max_window_size.width, _detalhes.max_window_size.height) +-- main window config ------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame:SetBackdrop (gump_fundo_backdrop) - BaseFrame:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha) - --- fundo -------------------------------------------------------------------------------------------------------------------------------------------------- + baseframe:SetClampedToScreen (true) + --baseframe:SetClampRectInsets (unpack (_detalhes.window_clamp)) + + baseframe:SetSize (_detalhes.new_window_size.width, _detalhes.new_window_size.height) + + baseframe:SetPoint ("center", _UIParent) + baseframe:EnableMouseWheel (false) + baseframe:EnableMouse (true) + baseframe:SetMovable (true) + baseframe:SetResizable (true) + baseframe:SetMinResize (150, 40) + baseframe:SetMaxResize (_detalhes.max_window_size.width, _detalhes.max_window_size.height) - BackGroundFrame:SetAllPoints (BaseFrame) - BackGroundFrame:SetScrollChild (BackGroundDisplay) + baseframe:SetBackdrop (gump_fundo_backdrop) + baseframe:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha) - BackGroundDisplay:SetResizable (true) - BackGroundDisplay:SetPoint ("TOPLEFT", BaseFrame, "TOPLEFT") - BackGroundDisplay:SetPoint ("BOTTOMRIGHT", BaseFrame, "BOTTOMRIGHT") - BackGroundDisplay:SetBackdrop (gump_fundo_backdrop) - BackGroundDisplay:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha) - --- congelamento da instância -------------------------------------------------------------------------------------------------------------------------------------------------- +-- background window config ------------------------------------------------------------------------------------------------------------------------------------------------- - instancia.freeze_icon = BackGroundDisplay:CreateTexture (nil, "OVERLAY") - instancia.freeze_icon:SetWidth (64) - instancia.freeze_icon:SetHeight (64) - instancia.freeze_icon:SetPoint ("center", BackGroundDisplay, "center") - instancia.freeze_icon:SetPoint ("left", BackGroundDisplay, "left") - instancia.freeze_icon:Hide() + backgroundframe:SetAllPoints (baseframe) + backgroundframe:SetScrollChild (backgrounddisplay) + + backgrounddisplay:SetResizable (true) + backgrounddisplay:SetPoint ("topleft", baseframe, "topleft") + backgrounddisplay:SetPoint ("bottomright", baseframe, "bottomright") + backgrounddisplay:SetBackdrop (gump_fundo_backdrop) + backgrounddisplay:SetBackdropColor (instancia.bg_r, instancia.bg_g, instancia.bg_b, instancia.bg_alpha) - instancia.freeze_texto = BackGroundDisplay:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") - instancia.freeze_texto:SetHeight (64) - instancia.freeze_texto:SetPoint ("left", instancia.freeze_icon, "right", -18, 0) - instancia.freeze_texto:SetTextColor (1, 1, 1) - instancia.freeze_texto:Hide() +-- instance mini widgets ------------------------------------------------------------------------------------------------------------------------------------------------- - instancia._version = BaseFrame:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") - instancia._version:SetPoint ("left", BackGroundDisplay, "left", 20, 0) - instancia._version:SetTextColor (1, 1, 1) - instancia._version:SetText ("this is a alpha version of Details\nyou can help us sending bug reports\nuse the blue button.") - if (not _detalhes.initializing) then - instancia._version:Hide() - end - - BaseFrame.wallpaper = BackGroundDisplay:CreateTexture (nil, "overlay") - BaseFrame.wallpaper:Hide() + --> freeze icon + instancia.freeze_icon = backgrounddisplay:CreateTexture (nil, "overlay") + instancia.freeze_icon:SetWidth (64) + instancia.freeze_icon:SetHeight (64) + instancia.freeze_icon:SetPoint ("center", backgrounddisplay, "center") + instancia.freeze_icon:SetPoint ("left", backgrounddisplay, "left") + instancia.freeze_icon:Hide() - BaseFrame.alert = CreateAlertFrame (BaseFrame, instancia) + instancia.freeze_texto = backgrounddisplay:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + instancia.freeze_texto:SetHeight (64) + instancia.freeze_texto:SetPoint ("left", instancia.freeze_icon, "right", -18, 0) + instancia.freeze_texto:SetTextColor (1, 1, 1) + instancia.freeze_texto:Hide() ---cria os 2 resizers ------------------------------------------------------------------------------------------------------------------------------------------------------------- + --> details version + instancia._version = baseframe:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + instancia._version:SetPoint ("left", backgrounddisplay, "left", 20, 0) + instancia._version:SetTextColor (1, 1, 1) + instancia._version:SetText ("this is a alpha version of Details\nyou can help us sending bug reports\nuse the blue button.") + if (not _detalhes.initializing) then + instancia._version:Hide() + end - BaseFrame.resize_direita = _CreateFrame ("Button", "Details_Resize_Direita"..ID, BaseFrame) + --> wallpaper + baseframe.wallpaper = backgrounddisplay:CreateTexture (nil, "overlay") + baseframe.wallpaper:Hide() - local resize_direita_texture = BaseFrame.resize_direita:CreateTexture (nil, "overlay") - resize_direita_texture:SetWidth (16) - resize_direita_texture:SetHeight (16) - resize_direita_texture:SetTexture (DEFAULT_SKIN) - resize_direita_texture:SetTexCoord (unpack (COORDS_RESIZE_RIGHT)) - resize_direita_texture:SetAllPoints (BaseFrame.resize_direita) - BaseFrame.resize_direita.texture = resize_direita_texture + --> alert frame + baseframe.alert = CreateAlertFrame (baseframe, instancia) + +-- resizers & lock button ------------------------------------------------------------------------------------------------------------------------------------------------------------ - BaseFrame.resize_direita:SetWidth (16) - BaseFrame.resize_direita:SetHeight (16) - BaseFrame.resize_direita:SetPoint ("BOTTOMRIGHT", BaseFrame, "BOTTOMRIGHT", 0, 0) - BaseFrame.resize_direita:EnableMouse (true) - BaseFrame.resize_direita:SetFrameLevel (BaseFrame:GetFrameLevel() + 6) - BaseFrame.resize_direita:SetFrameStrata ("HIGH") - BaseFrame.resize_direita.side = 2 + --> right resizer + baseframe.resize_direita = CreateFrame ("button", "Details_Resize_Direita"..ID, baseframe) + + local resize_direita_texture = baseframe.resize_direita:CreateTexture (nil, "overlay") + resize_direita_texture:SetWidth (16) + resize_direita_texture:SetHeight (16) + resize_direita_texture:SetTexture (DEFAULT_SKIN) + resize_direita_texture:SetTexCoord (unpack (COORDS_RESIZE_RIGHT)) + resize_direita_texture:SetAllPoints (baseframe.resize_direita) + baseframe.resize_direita.texture = resize_direita_texture + + baseframe.resize_direita:SetWidth (16) + baseframe.resize_direita:SetHeight (16) + baseframe.resize_direita:SetPoint ("bottomright", baseframe, "bottomright", 0, 0) + baseframe.resize_direita:EnableMouse (true) + baseframe.resize_direita:SetFrameLevel (baseframe:GetFrameLevel() + 6) + baseframe.resize_direita:SetFrameStrata ("HIGH") + baseframe.resize_direita.side = 2 --> lock window button - BaseFrame.lock_button = _CreateFrame ("Button", "Details_Lock_Button"..ID, BaseFrame) - BaseFrame.lock_button:SetPoint ("right", BaseFrame.resize_direita, "left", -1, 1.5) - BaseFrame.lock_button:SetFrameLevel (BaseFrame:GetFrameLevel() + 6) - BaseFrame.lock_button:SetWidth (40) - BaseFrame.lock_button:SetHeight (16) - BaseFrame.lock_button.label = BaseFrame.lock_button:CreateFontString (nil, "overlay", "GameFontNormal") - BaseFrame.lock_button.label:SetPoint ("right", BaseFrame.lock_button, "right") - BaseFrame.lock_button.label:SetTextColor (.3, .3, .3, .6) - BaseFrame.lock_button.label:SetJustifyH ("right") - BaseFrame.lock_button.label:SetText (Loc ["STRING_LOCK_WINDOW"]) - BaseFrame.lock_button:SetWidth (BaseFrame.lock_button.label:GetStringWidth()+2) - BaseFrame.lock_button:SetScript ("OnClick", lockFunctionOnClick) + baseframe.lock_button = CreateFrame ("button", "Details_Lock_Button"..ID, baseframe) + baseframe.lock_button:SetPoint ("right", baseframe.resize_direita, "left", -1, 1.5) + baseframe.lock_button:SetFrameLevel (baseframe:GetFrameLevel() + 6) + baseframe.lock_button:SetWidth (40) + baseframe.lock_button:SetHeight (16) + baseframe.lock_button.label = baseframe.lock_button:CreateFontString (nil, "overlay", "GameFontNormal") + baseframe.lock_button.label:SetPoint ("right", baseframe.lock_button, "right") + baseframe.lock_button.label:SetTextColor (.3, .3, .3, .6) + baseframe.lock_button.label:SetJustifyH ("right") + baseframe.lock_button.label:SetText (Loc ["STRING_LOCK_WINDOW"]) + baseframe.lock_button:SetWidth (baseframe.lock_button.label:GetStringWidth()+2) + baseframe.lock_button:SetScript ("OnClick", lockFunctionOnClick) - --> options window button - --[[ - BaseFrame.options_button = _CreateFrame ("Button", "Details_Options_Button"..ID, BaseFrame) - BaseFrame.options_button:SetPoint ("right", BaseFrame.lock_button, "left", -1, 0) - BaseFrame.options_button:SetFrameLevel (BaseFrame:GetFrameLevel() + 3) --> lower then normal rows - BaseFrame.options_button:SetWidth (40) - BaseFrame.options_button:SetHeight (16) - BaseFrame.options_button.label = BaseFrame.options_button:CreateFontString (nil, "overlay", "GameFontNormal") - BaseFrame.options_button.label:SetPoint ("right", BaseFrame.options_button, "right") - BaseFrame.options_button.label:SetTextColor (.3, .3, .3, .4) - BaseFrame.options_button.label:SetJustifyH ("right") - BaseFrame.options_button.label:SetText (Loc ["STRING_OPTIONS_WINDOW"]) - --]] - - BaseFrame.resize_esquerda = _CreateFrame ("Button", "Details_Resize_Esquerda"..ID, BaseFrame) - - local resize_esquerda_texture = BaseFrame.resize_esquerda:CreateTexture (nil, "overlay") - resize_esquerda_texture:SetWidth (16) - resize_esquerda_texture:SetHeight (16) - resize_esquerda_texture:SetTexture (DEFAULT_SKIN) - resize_esquerda_texture:SetTexCoord (unpack (COORDS_RESIZE_LEFT)) - resize_esquerda_texture:SetAllPoints (BaseFrame.resize_esquerda) - BaseFrame.resize_esquerda.texture = resize_esquerda_texture - - --BaseFrame.resize_esquerda:SetNormalTexture ("Interface\\AddOns\\Details\\images\\ResizeGripL") - --BaseFrame.resize_esquerda:SetHighlightTexture ("Interface\\AddOns\\Details\\images\\ResizeGripL") - BaseFrame.resize_esquerda:SetWidth (16) - BaseFrame.resize_esquerda:SetHeight (16) - BaseFrame.resize_esquerda:SetPoint ("BOTTOMLEFT", BaseFrame, "BOTTOMLEFT", 0, 0) - BaseFrame.resize_esquerda:EnableMouse (true) - BaseFrame.resize_esquerda:SetFrameLevel (BaseFrame:GetFrameLevel() + 6) - BaseFrame.resize_esquerda:SetFrameStrata ("HIGH") - - gump:Fade (BaseFrame.resize_esquerda, "in", 3.0) - gump:Fade (BaseFrame.resize_direita, "in", 3.0) - - if (instancia.isLocked) then - instancia.isLocked = not instancia.isLocked - lockFunctionOnClick (BaseFrame.lock_button) - end - - gump:Fade (BaseFrame.lock_button, -1, 3.0) - - ------------------------------------------------------------------------------------------------------------------------------------------------------------- - ---seta os scripts dos frames ------------------------------------------------------------------------------------------------------------------------------------------------------------- - - - - BFrame_scripts (BaseFrame, instancia) - - --BackGroundDisplay_scripts (BackGroundDisplay, BaseFrame, instancia) - - BGFrame_scripts (SwitchButton, BaseFrame, instancia) - BGFrame_scripts (BackGroundDisplay, BaseFrame, instancia) - --BGFrame_scripts (BackGroundFrame, BaseFrame, instancia) - - iterate_scroll_scripts (BackGroundDisplay, BackGroundFrame, BaseFrame, ScrollBar, instancia) - ------------------------------------------------------------------------------------------------------------------------------------------------------------- - ---chama função para criar o cabeçalho ------------------------------------------------------------------------------------------------------------------------------------------------------------- - - gump:CriaCabecalho (BaseFrame, instancia) - - --- cria as duas barras laterais ------------------------------------------------------------------------------------------------------------------------------------------------------------- - --> barra borda direita lateral - - --> barra borda esquerda lateral - BaseFrame.barra_esquerda = BaseFrame.cabecalho.fechar:CreateTexture (nil, "ARTWORK") - --BaseFrame.barra_esquerda:SetTexture ("Interface\\AddOns\\Details\\images\\bar_main_leftright") - --BaseFrame.barra_esquerda:SetTexCoord (0.5, 1, 0, 1) - BaseFrame.barra_esquerda:SetTexture (DEFAULT_SKIN) - BaseFrame.barra_esquerda:SetTexCoord (unpack (COORDS_LEFT_SIDE_BAR)) - BaseFrame.barra_esquerda:SetWidth (64) - BaseFrame.barra_esquerda:SetHeight (512) - BaseFrame.barra_esquerda:SetPoint ("TOPLEFT", BaseFrame, "TOPLEFT", -56, 0) - BaseFrame.barra_esquerda:SetPoint ("BOTTOMLEFT", BaseFrame, "BOTTOMLEFT", -56, -14) + --> left resizer + baseframe.resize_esquerda = CreateFrame ("button", "Details_Resize_Esquerda"..ID, baseframe) - BaseFrame.barra_direita = BaseFrame.cabecalho.fechar:CreateTexture (nil, "ARTWORK") - --BaseFrame.barra_direita:SetTexture ("Interface\\AddOns\\Details\\images\\bar_main_leftright") - --BaseFrame.barra_direita:SetTexCoord (0, 0.5, 0, 1) - BaseFrame.barra_direita:SetTexture (DEFAULT_SKIN) - BaseFrame.barra_direita:SetTexCoord (unpack (COORDS_RIGHT_SIDE_BAR)) - BaseFrame.barra_direita:SetWidth (64) - BaseFrame.barra_direita:SetHeight (512) - BaseFrame.barra_direita:SetPoint ("TOPRIGHT", BaseFrame, "TOPRIGHT", 56, 0) - BaseFrame.barra_direita:SetPoint ("BOTTOMRIGHT", BaseFrame, "BOTTOMRIGHT", 56, -14) - - ---chama função para criar o rodapé ------------------------------------------------------------------------------------------------------------------------------------------------------------- + local resize_esquerda_texture = baseframe.resize_esquerda:CreateTexture (nil, "overlay") + resize_esquerda_texture:SetWidth (16) + resize_esquerda_texture:SetHeight (16) + resize_esquerda_texture:SetTexture (DEFAULT_SKIN) + resize_esquerda_texture:SetTexCoord (unpack (COORDS_RESIZE_LEFT)) + resize_esquerda_texture:SetAllPoints (baseframe.resize_esquerda) + baseframe.resize_esquerda.texture = resize_esquerda_texture - gump:CriaRodape (BaseFrame, instancia) + baseframe.resize_esquerda:SetWidth (16) + baseframe.resize_esquerda:SetHeight (16) + baseframe.resize_esquerda:SetPoint ("bottomleft", baseframe, "bottomleft", 0, 0) + baseframe.resize_esquerda:EnableMouse (true) + baseframe.resize_esquerda:SetFrameLevel (baseframe:GetFrameLevel() + 6) + baseframe.resize_esquerda:SetFrameStrata ("HIGH") + + baseframe.resize_esquerda:SetAlpha (0) + baseframe.resize_direita:SetAlpha (0) + + if (instancia.isLocked) then + instancia.isLocked = not instancia.isLocked + lockFunctionOnClick (baseframe.lock_button) + end + + gump:Fade (baseframe.lock_button, -1, 3.0) + +-- scripts ------------------------------------------------------------------------------------------------------------------------------------------------------------ + + BFrame_scripts (baseframe, instancia) + + BGFrame_scripts (switchbutton, baseframe, instancia) + BGFrame_scripts (backgrounddisplay, baseframe, instancia) + + iterate_scroll_scripts (backgrounddisplay, backgroundframe, baseframe, scrollbar, instancia) + + +-- create toolbar ---------------------------------------------------------------------------------------------------------------------------------------------------------- + + gump:CriaCabecalho (baseframe, instancia) + +-- create statusbar ---------------------------------------------------------------------------------------------------------------------------------------------------------- + + gump:CriaRodape (baseframe, instancia) + +-- left and right side bars ------------------------------------------------------------------------------------------------------------------------------------------------------------ + + --> left + baseframe.barra_esquerda = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork") + baseframe.barra_esquerda:SetTexture (DEFAULT_SKIN) + baseframe.barra_esquerda:SetTexCoord (unpack (COORDS_LEFT_SIDE_BAR)) + baseframe.barra_esquerda:SetWidth (64) + baseframe.barra_esquerda:SetHeight (512) + baseframe.barra_esquerda:SetPoint ("topleft", baseframe, "topleft", -56, 0) + baseframe.barra_esquerda:SetPoint ("bottomleft", baseframe, "bottomleft", -56, -14) + --> right + baseframe.barra_direita = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork") + baseframe.barra_direita:SetTexture (DEFAULT_SKIN) + baseframe.barra_direita:SetTexCoord (unpack (COORDS_RIGHT_SIDE_BAR)) + baseframe.barra_direita:SetWidth (64) + baseframe.barra_direita:SetHeight (512) + baseframe.barra_direita:SetPoint ("topright", baseframe, "topright", 56, 0) + baseframe.barra_direita:SetPoint ("bottomright", baseframe, "bottomright", 56, -14) + --> bottom + baseframe.barra_fundo = baseframe.cabecalho.fechar:CreateTexture (nil, "artwork") + baseframe.barra_fundo:SetTexture (DEFAULT_SKIN) + baseframe.barra_fundo:SetTexCoord (unpack (COORDS_BOTTOM_SIDE_BAR)) + baseframe.barra_fundo:SetWidth (512) + baseframe.barra_fundo:SetHeight (64) + baseframe.barra_fundo:SetPoint ("bottomleft", baseframe, "bottomleft", 0, -56) + baseframe.barra_fundo:SetPoint ("bottomright", baseframe, "bottomright", 0, -56) + +-- break snap button ---------------------------------------------------------------------------------------------------------------------------------------------------------- + + instancia.botao_separar = CreateFrame ("button", "DetailsBreakSnapButton" .. ID, baseframe.cabecalho.fechar) + instancia.botao_separar:SetPoint ("bottom", baseframe.resize_direita, "top", -1, 0) + instancia.botao_separar:SetFrameLevel (baseframe:GetFrameLevel() + 5) + instancia.botao_separar:SetSize (13, 13) ------------------------------------------------------------------------------------------------------------------------------------------------------------- + instancia.botao_separar:SetScript ("OnClick", function() + instancia:Desagrupar (-1) + end) --- BETA -- botão de separar as instâncias que estão agrupadas - instancia.botao_separar = gump:NewDetailsButton (BaseFrame.cabecalho.fechar, _, instancia, instancia.Desagrupar, instancia, -1, 13, 13) - instancia.botao_separar:SetPoint ("BOTTOM", BaseFrame.resize_direita, "TOP", -1, 0) - instancia.botao_separar:SetFrameLevel (BaseFrame:GetFrameLevel() + 5) + instancia.botao_separar:SetNormalTexture (DEFAULT_SKIN) + instancia.botao_separar:SetDisabledTexture (DEFAULT_SKIN) + instancia.botao_separar:SetHighlightTexture (DEFAULT_SKIN, "ADD") + instancia.botao_separar:SetPushedTexture (DEFAULT_SKIN) + + instancia.botao_separar:GetNormalTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) + instancia.botao_separar:GetDisabledTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) + instancia.botao_separar:GetHighlightTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) + instancia.botao_separar:GetPushedTexture():SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) + + instancia.botao_separar:SetAlpha (0) - local cadeado_texture = instancia.botao_separar:CreateTexture (nil, "overlay") - cadeado_texture:SetTexture (DEFAULT_SKIN) - cadeado_texture:SetTexCoord (unpack (COORDS_UNLOCK_BUTTON)) - cadeado_texture:SetAllPoints (instancia.botao_separar) - instancia.botao_separar.texture = cadeado_texture - BaseFrame.unlock_texture = cadeado_texture +-- scripts ------------------------------------------------------------------------------------------------------------------------------------------------------------ - gump:Fade (instancia.botao_separar, "in", 3.0) + resize_scripts (baseframe.resize_direita, instancia, scrollbar, ">", baseframe) + resize_scripts (baseframe.resize_esquerda, instancia, scrollbar, "<", baseframe) + lock_button_scripts (baseframe.lock_button, instancia) + bota_separar_script (instancia.botao_separar, instancia) - resize_scripts (BaseFrame.resize_direita, instancia, ScrollBar, ">", BaseFrame) - resize_scripts (BaseFrame.resize_esquerda, instancia, ScrollBar, "<", BaseFrame) - lock_button_scripts (BaseFrame.lock_button, instancia) - - bota_separar_script (instancia.botao_separar, instancia) - ---------------------------------- BORDAS HIGHLIGHT - local fcima = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) - fcima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37) - fcima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37) - gump:CreateFlashAnimation (fcima) - fcima:Hide() - - instancia.h_cima = fcima:CreateTexture (nil, "OVERLAY") - instancia.h_cima:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown") - instancia.h_cima:SetTexCoord (0, 1, 0.5, 1) - instancia.h_cima:SetPoint ("topleft", BaseFrame.cabecalho.top_bg, "bottomleft", -10, 37) - --instancia.h_cima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -33, 37) - instancia.h_cima:SetPoint ("topright", BaseFrame.cabecalho.ball_r, "bottomright", -97, 37) - --instancia.h_cima:Hide() - instancia.h_cima = fcima - -- - local fbaixo = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) - fbaixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17) - fbaixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17) - gump:CreateFlashAnimation (fbaixo) - fbaixo:Hide() - - instancia.h_baixo = fbaixo:CreateTexture (nil, "OVERLAY") - instancia.h_baixo:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_updown") - instancia.h_baixo:SetTexCoord (0, 1, 0, 0.5) - instancia.h_baixo:SetPoint ("topleft", BaseFrame.rodape.esquerdo, "bottomleft", 16, 17) - instancia.h_baixo:SetPoint ("topright", BaseFrame.rodape.direita, "bottomright", -16, 17) - --instancia.h_baixo:Hide() - instancia.h_baixo = fbaixo - -- - local fesquerda = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) - fesquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", -8, 0) - fesquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", -8, 0) - gump:CreateFlashAnimation (fesquerda) - fesquerda:Hide() - - instancia.h_esquerda = fesquerda:CreateTexture (nil, "OVERLAY") - instancia.h_esquerda:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright") - instancia.h_esquerda:SetTexCoord (0.5, 1, 0, 1) - instancia.h_esquerda:SetPoint ("topleft", BaseFrame.barra_esquerda, "topleft", 40, 0) - instancia.h_esquerda:SetPoint ("bottomleft", BaseFrame.barra_esquerda, "bottomleft", 40, 0) - --instancia.h_esquerda:Hide() - instancia.h_esquerda = fesquerda - -- - local fdireita = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) - fdireita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18) - fdireita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0) - gump:CreateFlashAnimation (fdireita) - fdireita:Hide() - - instancia.h_direita = fdireita:CreateTexture (nil, "OVERLAY") - instancia.h_direita:SetTexture ("Interface\\AddOns\\Details\\images\\highlight_leftright") - instancia.h_direita:SetTexCoord (0, 0.5, 1, 0) - instancia.h_direita:SetPoint ("topleft", BaseFrame.barra_direita, "topleft", 8, 18) - instancia.h_direita:SetPoint ("bottomleft", BaseFrame.barra_direita, "bottomleft", 8, 0) - --instancia.h_direita:Hide() - instancia.h_direita = fdireita +-- side bars highlights ------------------------------------------------------------------------------------------------------------------------------------------------------------ - --instancia.botao_separar:Hide() + --> top + local fcima = CreateFrame ("frame", nil, baseframe.cabecalho.fechar) + fcima:SetPoint ("topleft", baseframe.cabecalho.top_bg, "bottomleft", -10, 37) + fcima:SetPoint ("topright", baseframe.cabecalho.ball_r, "bottomright", -33, 37) + gump:CreateFlashAnimation (fcima) + fcima:Hide() + + instancia.h_cima = fcima:CreateTexture (nil, "overlay") + instancia.h_cima:SetTexture ([[Interface\AddOns\Details\images\highlight_updown]]) + instancia.h_cima:SetTexCoord (0, 1, 0.5, 1) + instancia.h_cima:SetPoint ("topleft", baseframe.cabecalho.top_bg, "bottomleft", -10, 37) + instancia.h_cima:SetPoint ("topright", baseframe.cabecalho.ball_r, "bottomright", -97, 37) + instancia.h_cima = fcima + + --> bottom + local fbaixo = CreateFrame ("frame", nil, baseframe.cabecalho.fechar) + fbaixo:SetPoint ("topleft", baseframe.rodape.esquerdo, "bottomleft", 16, 17) + fbaixo:SetPoint ("topright", baseframe.rodape.direita, "bottomright", -16, 17) + gump:CreateFlashAnimation (fbaixo) + fbaixo:Hide() + + instancia.h_baixo = fbaixo:CreateTexture (nil, "overlay") + instancia.h_baixo:SetTexture ([[Interface\AddOns\Details\images\highlight_updown]]) + instancia.h_baixo:SetTexCoord (0, 1, 0, 0.5) + instancia.h_baixo:SetPoint ("topleft", baseframe.rodape.esquerdo, "bottomleft", 16, 17) + instancia.h_baixo:SetPoint ("topright", baseframe.rodape.direita, "bottomright", -16, 17) + instancia.h_baixo = fbaixo + + --> left + local fesquerda = CreateFrame ("frame", nil, baseframe.cabecalho.fechar) + fesquerda:SetPoint ("topleft", baseframe.barra_esquerda, "topleft", -8, 0) + fesquerda:SetPoint ("bottomleft", baseframe.barra_esquerda, "bottomleft", -8, 0) + gump:CreateFlashAnimation (fesquerda) + fesquerda:Hide() + + instancia.h_esquerda = fesquerda:CreateTexture (nil, "overlay") + instancia.h_esquerda:SetTexture ([[Interface\AddOns\Details\images\highlight_leftright]]) + instancia.h_esquerda:SetTexCoord (0.5, 1, 0, 1) + instancia.h_esquerda:SetPoint ("topleft", baseframe.barra_esquerda, "topleft", 40, 0) + instancia.h_esquerda:SetPoint ("bottomleft", baseframe.barra_esquerda, "bottomleft", 40, 0) + instancia.h_esquerda = fesquerda + + --> right + local fdireita = CreateFrame ("frame", nil, baseframe.cabecalho.fechar) + fdireita:SetPoint ("topleft", baseframe.barra_direita, "topleft", 8, 18) + fdireita:SetPoint ("bottomleft", baseframe.barra_direita, "bottomleft", 8, 0) + gump:CreateFlashAnimation (fdireita) + fdireita:Hide() + + instancia.h_direita = fdireita:CreateTexture (nil, "overlay") + instancia.h_direita:SetTexture ([[Interface\AddOns\Details\images\highlight_leftright]]) + instancia.h_direita:SetTexCoord (0, 0.5, 1, 0) + instancia.h_direita:SetPoint ("topleft", baseframe.barra_direita, "topleft", 8, 18) + instancia.h_direita:SetPoint ("bottomleft", baseframe.barra_direita, "bottomleft", 8, 0) + instancia.h_direita = fdireita + +--> done if (criando) then local CProps = { @@ -2237,30 +2199,67 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.locs = CProps end - return BaseFrame, BackGroundFrame, BackGroundDisplay, ScrollBar + return baseframe, backgroundframe, backgrounddisplay, scrollbar end +function _detalhes:SetBarGrowDirection (direction) + + if (not direction) then + direction = self.bars_grow_direction + end + + self.bars_grow_direction = direction + + local x = self.row_info.space.left + + if (direction == 1) then --> top to bottom + for index, row in _ipairs (self.barras) do + local y = self.row_height * (index - 1) + y = y * -1 + row:ClearAllPoints() + row:SetPoint ("topleft", self.baseframe, "topleft", x, y) + end + + elseif (direction == 2) then --> bottom to top + for index, row in _ipairs (self.barras) do + local y = self.row_height * (index - 1) + row:ClearAllPoints() + row:SetPoint ("bottomleft", self.baseframe, "bottomleft", x, y + 2) + end + + end +end + --> Alias function gump:NewRow (instancia, index) return gump:CriaNovaBarra (instancia, index) end + +_detalhes.barras_criadas = 0 + --> search key: ~row ~barra function gump:CriaNovaBarra (instancia, index) - local BaseFrame = instancia.baseframe - local esta_barra = _CreateFrame ("Button", "DetailsBarra_"..instancia.meu_id.."_"..index, BaseFrame) + local baseframe = instancia.baseframe + local esta_barra = CreateFrame ("button", "DetailsBarra_"..instancia.meu_id.."_"..index, baseframe) esta_barra.row_id = index - local y = instancia.barrasInfo.alturaReal*(index-1) + local y = instancia.row_height*(index-1) - y = y*-1 + if (instancia.bars_grow_direction == 1) then + y = y*-1 + esta_barra:SetPoint ("topleft", baseframe, "topleft", instancia.row_info.space.left, y) + + elseif (instancia.bars_grow_direction == 2) then + --y = y*-1 + esta_barra:SetPoint ("bottomleft", baseframe, "bottomleft", instancia.row_info.space.left, y + 2) + + end - esta_barra:SetPoint ("TOPLEFT", BaseFrame, "TOPLEFT", instancia.barrasInfo.espaco.esquerda, y) - - esta_barra:SetHeight (instancia.barrasInfo.altura) --> altura determinada pela instância - esta_barra:SetWidth (BaseFrame:GetWidth()+instancia.barrasInfo.espaco.direita) + esta_barra:SetHeight (instancia.row_info.height) --> altura determinada pela instância + esta_barra:SetWidth (baseframe:GetWidth()+instancia.row_info.space.right) - esta_barra:SetFrameLevel (BaseFrame:GetFrameLevel() + 4) + esta_barra:SetFrameLevel (baseframe:GetFrameLevel() + 4) esta_barra.last_value = 0 esta_barra.w_mod = 0 @@ -2268,15 +2267,15 @@ function gump:CriaNovaBarra (instancia, index) esta_barra:EnableMouse (true) esta_barra:RegisterForClicks ("LeftButtonDown", "RightButtonDown") - esta_barra.statusbar = _CreateFrame ("StatusBar", nil, esta_barra) + esta_barra.statusbar = CreateFrame ("StatusBar", nil, esta_barra) esta_barra.statusbar:SetAllPoints (esta_barra) - esta_barra.textura = esta_barra.statusbar:CreateTexture (nil, "ARTWORK") + esta_barra.textura = esta_barra.statusbar:CreateTexture (nil, "artwork") esta_barra.textura:SetHorizTile (false) esta_barra.textura:SetVertTile (false) - esta_barra.textura:SetTexture (instancia.barrasInfo.textura) + esta_barra.textura:SetTexture (instancia.row_info.texture_file) - esta_barra.background = esta_barra:CreateTexture (nil, "BACKGROUND") + esta_barra.background = esta_barra:CreateTexture (nil, "background") esta_barra.background:SetTexture() esta_barra.background:SetAllPoints (esta_barra) @@ -2286,56 +2285,56 @@ function gump:CriaNovaBarra (instancia, index) esta_barra.statusbar:SetMinMaxValues (0, 100) esta_barra.statusbar:SetValue (100) - local icone_classe = esta_barra.statusbar:CreateTexture (nil, "OVERLAY") + local icone_classe = esta_barra.statusbar:CreateTexture (nil, "overlay") icone_classe:SetPoint ("left", esta_barra.statusbar, "left") - icone_classe:SetHeight (instancia.barrasInfo.altura) - icone_classe:SetWidth (instancia.barrasInfo.altura) - icone_classe:SetTexture ("Interface\\AddOns\\Details\\images\\classes_small") + icone_classe:SetHeight (instancia.row_info.height) + icone_classe:SetWidth (instancia.row_info.height) + icone_classe:SetTexture ([[Interface\AddOns\Details\images\classes_small]]) icone_classe:SetTexCoord (.75, 1, .75, 1) esta_barra.icone_classe = icone_classe - esta_barra.texto_esquerdo = esta_barra.statusbar:CreateFontString (nil, "OVERLAY", "GameFontHighlight") + esta_barra.texto_esquerdo = esta_barra.statusbar:CreateFontString (nil, "overlay", "GameFontHighlight") - esta_barra.texto_esquerdo:SetPoint ("LEFT", esta_barra.icone_classe, "right", 3, 0) - esta_barra.texto_esquerdo:SetJustifyH ("LEFT") + esta_barra.texto_esquerdo:SetPoint ("left", esta_barra.icone_classe, "right", 3, 0) + esta_barra.texto_esquerdo:SetJustifyH ("left") esta_barra.texto_esquerdo:SetNonSpaceWrap (true) - local icone_terceiro = esta_barra.statusbar:CreateTexture (nil, "OVERLAY") + local icone_terceiro = esta_barra.statusbar:CreateTexture (nil, "overlay") icone_terceiro:SetPoint ("left", esta_barra.statusbar, "left", 2, 0) - icone_terceiro:SetHeight (instancia.barrasInfo.altura) - icone_terceiro:SetWidth (instancia.barrasInfo.altura) + icone_terceiro:SetHeight (instancia.row_info.height) + icone_terceiro:SetWidth (instancia.row_info.height) esta_barra.icone_terceiro = icone_terceiro esta_barra.icone_terceiro:Hide() - esta_barra.texto_direita = esta_barra.statusbar:CreateFontString (nil, "OVERLAY", "GameFontHighlight") + esta_barra.texto_direita = esta_barra.statusbar:CreateFontString (nil, "overlay", "GameFontHighlight") - esta_barra.texto_direita:SetPoint ("RIGHT", esta_barra.statusbar, "RIGHT") - esta_barra.texto_direita:SetJustifyH ("RIGHT") + esta_barra.texto_direita:SetPoint ("right", esta_barra.statusbar, "right") + esta_barra.texto_direita:SetJustifyH ("right") - instancia:SetFontSize (esta_barra.texto_esquerdo, instancia.barrasInfo.fontSize) - instancia:SetFontFace (esta_barra.texto_esquerdo, instancia.barrasInfo.font) + instancia:SetFontSize (esta_barra.texto_esquerdo, instancia.row_info.font_size) + instancia:SetFontFace (esta_barra.texto_esquerdo, instancia.row_info.font_face_file) _detalhes.font_pool:add (esta_barra.texto_esquerdo) - instancia:SetFontSize (esta_barra.texto_direita, instancia.barrasInfo.fontSize) - instancia:SetFontFace (esta_barra.texto_direita, instancia.barrasInfo.font) + instancia:SetFontSize (esta_barra.texto_direita, instancia.row_info.font_size) + instancia:SetFontFace (esta_barra.texto_direita, instancia.row_info.font_face_file) _detalhes.font_pool:add (esta_barra.texto_direita) - if (instancia.row_textL_outline) then - instancia:SetFontOutline (esta_barra.texto_esquerdo, instancia.row_textL_outline) + if (instancia.row_info.textL_outline) then + instancia:SetFontOutline (esta_barra.texto_esquerdo, instancia.row_info.textL_outline) end - if (instancia.row_textR_outline) then - instancia:SetFontOutline (esta_barra.texto_direita, instancia.row_textR_outline) + if (instancia.row_info.textR_outline) then + instancia:SetFontOutline (esta_barra.texto_direita, instancia.row_info.textR_outline) end - if (not instancia.row_texture_class_colors) then - esta_barra.textura:SetVertexColor (_unpack (instancia.fixed_row_texture_color)) + if (not instancia.row_info.texture_class_colors) then + esta_barra.textura:SetVertexColor (_unpack (instancia.row_info.fixed_texture_color)) end - if (not instancia.row_textL_class_colors) then - esta_barra.texto_esquerdo:SetTextColor (_unpack (instancia.fixed_row_text_color)) + if (not instancia.row_info.textL_class_colors) then + esta_barra.texto_esquerdo:SetTextColor (_unpack (instancia.row_info.fixed_text_color)) end - if (not instancia.row_textR_class_colors) then - esta_barra.texto_direita:SetTextColor (_unpack (instancia.fixed_row_text_color)) + if (not instancia.row_info.textR_class_colors) then + esta_barra.texto_direita:SetTextColor (_unpack (instancia.row_info.fixed_text_color)) end --> inicia os scripts da barra @@ -2346,52 +2345,195 @@ function gump:CriaNovaBarra (instancia, index) return esta_barra end +function _detalhes:SetBarTextSettings (size, font, fixedcolor, leftcolorbyclass, rightcolorbyclass, leftoutline, rightoutline) + + --> size + if (size) then + self.row_info.font_size = size + end + + --> font + if (font) then + self.row_info.font_face = font + self.row_info.font_face_file = SharedMedia:Fetch ("font", font) + end + + --> fixed color + if (fixedcolor) then + local red, green, blue, alpha = gump:ParseColors (fixedcolor) + local c = self.row_info.fixed_text_color + c[1], c[2], c[3], c[4] = red, green, blue, alpha + end + + --> left color by class + if (type (leftcolorbyclass) == "boolean") then + self.row_info.textL_class_colors = leftcolorbyclass + end + + --> right color by class + if (type (rightcolorbyclass) == "boolean") then + self.row_info.textR_class_colors = rightcolorbyclass + end + + --> left text outline + if (type (leftoutline) == "boolean") then + self.row_info.textL_outline = leftoutline + end + + --> right text outline + if (type (rightoutline) == "boolean") then + self.row_info.textR_outline = rightoutline + end + + self:InstanceReset() + self:InstanceRefreshRows() +end + +function _detalhes:SetBarSettings (height, texture, colorclass, fixedcolor, backgroundtexture, backgroundcolorclass, backgroundfixedcolor) + + --> height + if (height) then + self.row_info.height = height + self.row_height = height + self.row_info.space.between + end + + --> texture + if (texture) then + self.row_info.texture = texture + self.row_info.texture_file = SharedMedia:Fetch ("statusbar", texture) + end + + --> color by class + if (type (colorclass) == "boolean") then + self.row_info.texture_class_colors = colorclass + end + + --> fixed color + if (fixedcolor) then + local red, green, blue, alpha = gump:ParseColors (fixedcolor) + local c = self.row_info.fixed_texture_color + c[1], c[2], c[3], c[4] = red, green, blue, alpha + end + + --> background texture + if (backgroundtexture) then + self.row_info.texture_background = backgroundtexture + self.row_info.texture_background_file = SharedMedia:Fetch ("statusbar", backgroundtexture) + end + + --> background color by class + if (type (backgroundcolorclass) == "boolean") then + self.row_info.texture_background_class_color = backgroundcolorclass + end + + --> background fixed color + if (backgroundfixedcolor) then + local red, green, blue, alpha = gump:ParseColors (backgroundfixedcolor) + local c = self.row_info.fixed_texture_background_color + c [1], c [2], c [3], c [4] = red, green, blue, alpha + end + + self:InstanceReset() + self:InstanceRefreshRows() + self:ReajustaGump() + +end + + +-- search key: ~row function _detalhes:InstanceRefreshRows (instancia) + if (instancia) then self = instancia end + + if (not self.barras or not self.barras[1]) then + return + end + + --> outline values + local left_text_outline = self.row_info.textL_outline + local right_text_outline = self.row_info.textR_outline + + --> texture color values + local texture_class_color = self.row_info.texture_class_colors + local texture_r, texture_g, texture_b + if (not texture_class_color) then + texture_r, texture_g, texture_b = _unpack (self.row_info.fixed_texture_color) + end - --outline - local L_outline = self.row_textL_outline - local R_outline = self.row_textR_outline - --texture color - local textureClassColor = self.row_texture_class_colors - local texture_r, texture_g, texture_b - if (not textureClassColor) then - texture_r, texture_g, texture_b = _unpack (self.fixed_row_texture_color) - end --text color - local leftTextClassColor = self.row_textL_class_colors - local rightTextClassColor = self.row_textR_class_colors - local text_r, text_g, text_b - if (not leftTextClassColor or not rightTextClassColor) then - text_r, text_g, text_b = _unpack (self.fixed_row_text_color) - end + local left_text_class_color = self.row_info.textL_class_colors + local right_text_class_color = self.row_info.textR_class_colors + local text_r, text_g, text_b + if (not left_text_class_color or not right_text_class_color) then + text_r, text_g, text_b = _unpack (self.row_info.fixed_text_color) + end + + local height = self.row_info.height + + -- do it for _, row in _ipairs (self.barras) do - - if (L_outline) then - self:SetFontOutline (row.texto_esquerdo, L_outline) + + --> positioning and size + row:SetHeight (height) + row.icone_classe:SetHeight (height) + row.icone_classe:SetWidth (height) + row.icone_terceiro:SetHeight (height) + row.icone_terceiro:SetWidth (height) + + if (not self.row_info.texture_background_class_color) then + local c = self.row_info.fixed_texture_background_color + row.background:SetVertexColor (c[1], c[2], c[3], c[4]) else - self:SetFontOutline (row.texto_esquerdo, nil) + local c = self.row_info.fixed_texture_background_color + local r, g, b = row.background:GetVertexColor() + row.background:SetVertexColor (r, g, b, c[4]) end - if (R_outline) then - self:SetFontOutline (row.texto_direita, R_outline) + + --> outline + if (left_text_outline) then + _detalhes:SetFontOutline (row.texto_esquerdo, left_text_outline) + else + _detalhes:SetFontOutline (row.texto_esquerdo, nil) + end + + if (right_text_outline) then + self:SetFontOutline (row.texto_direita, right_text_outline) else self:SetFontOutline (row.texto_direita, nil) end - -- - if (not textureClassColor) then + + --> texture: + row.textura:SetTexture (self.row_info.texture_file) + row.background:SetTexture (self.row_info.texture_background_file) + + --> 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) end - -- - if (not leftTextClassColor) then + + --> text class color: if true color changes on the fly through class refresh + if (not left_text_class_color) then row.texto_esquerdo:SetTextColor (text_r, text_g, text_b) end - if (not rightTextClassColor) then + if (not right_text_class_color) then row.texto_direita:SetTextColor (text_r, text_g, text_b) end + + --> text size + _detalhes:SetFontSize (row.texto_esquerdo, self.row_info.font_size or height * 0.75) + _detalhes:SetFontSize (row.texto_direita, self.row_info.font_size or height * 0.75) + + --> text font + _detalhes:SetFontFace (row.texto_esquerdo, self.row_info.font_face_file or "GameFontHighlight") + _detalhes:SetFontFace (row.texto_direita, self.row_info.font_face_file or "GameFontHighlight") + end + + self:SetBarGrowDirection() + end -- search key: ~wallpaper @@ -2509,10 +2651,20 @@ end function _detalhes:InstanceColor (red, green, blue, alpha) + + if (not red) then + red, green, blue, alpha = unpack (self.color) + end + if (type (red) ~= "number") then red, green, blue, alpha = gump:ParseColors (red) end + self.color [1] = red + self.color [2] = green + self.color [3] = blue + self.color [4] = alpha + local skin = _detalhes.skins [self.skin] self.baseframe.rodape.esquerdo:SetVertexColor (red, green, blue) @@ -2537,6 +2689,8 @@ function _detalhes:InstanceColor (red, green, blue, alpha) self.baseframe.barra_esquerda:SetAlpha (alpha) self.baseframe.barra_direita:SetVertexColor (red, green, blue) self.baseframe.barra_direita:SetAlpha (alpha) + self.baseframe.barra_fundo:SetVertexColor (red, green, blue) + self.baseframe.barra_fundo:SetAlpha (alpha) self.color[1], self.color[2], self.color[3], self.color[4] = red, green, blue, alpha end @@ -2608,88 +2762,228 @@ function _detalhes:StatusBarAlert (text, icon, color, time) end end -function gump:CriaRodape (BaseFrame, instancia) +function _detalhes:SetCloseButtonSettings (overlaycolor) - BaseFrame.rodape = {} + if (overlaycolor == "reset") then + overlaycolor = {1, 1, 1, 1} + end + + if (overlaycolor) then + local r, g, b, a = gump:ParseColors (overlaycolor) + self.closebutton_info.color_overlay [1] = r + self.closebutton_info.color_overlay [2] = g + self.closebutton_info.color_overlay [3] = b + self.closebutton_info.color_overlay [4] = a + end + + local r, g, b, a = unpack (self.closebutton_info.color_overlay) + self.baseframe.cabecalho.fechar:GetNormalTexture():SetVertexColor (r, g, b, a) + self.baseframe.cabecalho.fechar:GetPushedTexture():SetVertexColor (r, g, b, a) + self.baseframe.cabecalho.fechar:GetHighlightTexture():SetVertexColor (r, g, b, a) +end + +function _detalhes:SetInstanceButtonSettings (textfont, textsize, textcolor, overlaycolor) + + if (textfont == "reset") then + textfont = "Friz Quadrata TT" + textsize = 12 + textcolor = {1, 0.81, 0, 1} + overlaycolor = {1, 1, 1, 1} + end + + --> text color + if (textcolor) then + local r, g, b, a = gump:ParseColors (textcolor) + self.instancebutton_info.text_color [1] = r + self.instancebutton_info.text_color [2] = g + self.instancebutton_info.text_color [3] = b + self.instancebutton_info.text_color [4] = a + end + + _G [self.baseframe.cabecalho.novo:GetName().."Text"]:SetTextColor (unpack (self.instancebutton_info.text_color)) + + --> text font + if (textfont) then + self.instancebutton_info.text_face = textfont + end + + local font = SharedMedia:Fetch ("font", self.instancebutton_info.text_face) + _detalhes:SetFontFace (_G [self.baseframe.cabecalho.novo:GetName().."Text"], font) + + --> text size + if (textsize) then + self.instancebutton_info.text_size = textsize + end + + _detalhes:SetFontSize (_G [self.baseframe.cabecalho.novo:GetName().."Text"], self.instancebutton_info.text_size) + + --> overlay color + if (overlaycolor) then + local r, g, b, a = gump:ParseColors (overlaycolor) + self.instancebutton_info.color_overlay [1] = r + self.instancebutton_info.color_overlay [2] = g + self.instancebutton_info.color_overlay [3] = b + self.instancebutton_info.color_overlay [4] = a + end + + local r, g, b, a = unpack (self.instancebutton_info.color_overlay) + self.baseframe.cabecalho.novo.Left:SetVertexColor (r, g, b, a) + self.baseframe.cabecalho.novo.Middle:SetVertexColor (r, g, b, a) + self.baseframe.cabecalho.novo.Right:SetVertexColor (r, g, b, a) +end + +function _detalhes:SetDeleteButtonSettings (textfont, textsize, textcolor, overlaycolor, alwaysminimized) + + if (textfont == "reset") then + --print ("text color:", _G.DetailsResetButton1Text:GetTextColor()) + --print ("text font:", _detalhes:GetFontFace (_G.DetailsResetButton1Text)) + --print ("text size:", _detalhes:GetFontSize (_G.DetailsResetButton1Text)) + --print ("vertex color", _detalhes.ResetButton.Left:GetVertexColor()) + textfont = "Friz Quadrata TT" + textsize = 12 + textcolor = {1, 0.81, 0, 1} + overlaycolor = {1, 1, 1, 1} + alwaysminimized = false + end + + --> text color + if (textcolor) then + local r, g, b, a = gump:ParseColors (textcolor) + self.resetbutton_info.text_color [1] = r + self.resetbutton_info.text_color [2] = g + self.resetbutton_info.text_color [3] = b + self.resetbutton_info.text_color [4] = a + end + + if (_detalhes.ResetButtonInstance == self.meu_id) then + _G.DetailsResetButton1Text:SetTextColor (unpack (self.resetbutton_info.text_color)) + _G.DetailsResetButton2Text2:SetTextColor (unpack (self.resetbutton_info.text_color)) + end + + --> text font + if (textfont) then + self.resetbutton_info.text_face = textfont + end + + local font = SharedMedia:Fetch ("font", self.resetbutton_info.text_face) + _detalhes:SetFontFace (_G.DetailsResetButton1Text, font) + _detalhes:SetFontFace (_G.DetailsResetButton2Text2, font) + + --> text size + if (textsize) then + self.resetbutton_info.text_size = textsize + end + + _detalhes:SetFontSize (_G.DetailsResetButton1Text, self.resetbutton_info.text_size) + _detalhes:SetFontSize (_G.DetailsResetButton2Text2, self.resetbutton_info.text_size) + + --> overlay color + if (overlaycolor) then + local r, g, b, a = gump:ParseColors (overlaycolor) + self.resetbutton_info.color_overlay [1] = r + self.resetbutton_info.color_overlay [2] = g + self.resetbutton_info.color_overlay [3] = b + self.resetbutton_info.color_overlay [4] = a + end + + if (_detalhes.ResetButtonInstance == self.meu_id) then + local r, g, b, a = unpack (self.resetbutton_info.color_overlay) + _detalhes.ResetButton.Left:SetVertexColor (r, g, b, a) + _detalhes.ResetButton.Middle:SetVertexColor (r, g, b, a) + _detalhes.ResetButton.Right:SetVertexColor (r, g, b, a) + _detalhes.ResetButton2.Left:SetVertexColor (r, g, b, a) + _detalhes.ResetButton2.Middle:SetVertexColor (r, g, b, a) + _detalhes.ResetButton2.Right:SetVertexColor (r, g, b, a) + end + + --> always minimized + if (type (alwaysminimized) == "boolean") then + self.resetbutton_info.always_small = alwaysminimized + end + + self:ReajustaGump() +end + + +function gump:CriaRodape (baseframe, instancia) + + baseframe.rodape = {} --> esquerdo - BaseFrame.rodape.esquerdo = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") - BaseFrame.rodape.esquerdo:SetPoint ("TOPRIGHT", BaseFrame, "BOTTOMLEFT", 16, 0) - BaseFrame.rodape.esquerdo:SetTexture (DEFAULT_SKIN) - BaseFrame.rodape.esquerdo:SetTexCoord (unpack (COORDS_PIN_LEFT)) - BaseFrame.rodape.esquerdo:SetWidth (32) - BaseFrame.rodape.esquerdo:SetHeight (32) - --BaseFrame.rodape.esquerdo:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_left") + baseframe.rodape.esquerdo = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay") + baseframe.rodape.esquerdo:SetPoint ("topright", baseframe, "bottomleft", 16, 0) + baseframe.rodape.esquerdo:SetTexture (DEFAULT_SKIN) + baseframe.rodape.esquerdo:SetTexCoord (unpack (COORDS_PIN_LEFT)) + baseframe.rodape.esquerdo:SetWidth (32) + baseframe.rodape.esquerdo:SetHeight (32) --> direito - BaseFrame.rodape.direita = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") - BaseFrame.rodape.direita:SetPoint ("TOPLEFT", BaseFrame, "BOTTOMRIGHT", -16, 0) - BaseFrame.rodape.direita:SetTexture (DEFAULT_SKIN) - BaseFrame.rodape.direita:SetTexCoord (unpack (COORDS_PIN_RIGHT)) - BaseFrame.rodape.direita:SetWidth (32) - BaseFrame.rodape.direita:SetHeight (32) - --BaseFrame.rodape.direita:SetTexture ("Interface\\AddOns\\Details\\images\\bar_down_right") + baseframe.rodape.direita = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay") + baseframe.rodape.direita:SetPoint ("topleft", baseframe, "bottomright", -16, 0) + baseframe.rodape.direita:SetTexture (DEFAULT_SKIN) + baseframe.rodape.direita:SetTexCoord (unpack (COORDS_PIN_RIGHT)) + baseframe.rodape.direita:SetWidth (32) + baseframe.rodape.direita:SetHeight (32) --> barra centro - BaseFrame.rodape.top_bg = BaseFrame:CreateTexture (nil, "BACKGROUND") - BaseFrame.rodape.top_bg:SetTexture (DEFAULT_SKIN) - BaseFrame.rodape.top_bg:SetTexCoord (unpack (COORDS_BOTTOM_BACKGROUND)) - BaseFrame.rodape.top_bg:SetWidth (512) - BaseFrame.rodape.top_bg:SetHeight (128) - BaseFrame.rodape.top_bg:SetPoint ("LEFT", BaseFrame.rodape.esquerdo, "RIGHT", -16, -48) - BaseFrame.rodape.top_bg:SetPoint ("RIGHT", BaseFrame.rodape.direita, "LEFT", 16, -48) + baseframe.rodape.top_bg = baseframe:CreateTexture (nil, "background") + baseframe.rodape.top_bg:SetTexture (DEFAULT_SKIN) + baseframe.rodape.top_bg:SetTexCoord (unpack (COORDS_BOTTOM_BACKGROUND)) + baseframe.rodape.top_bg:SetWidth (512) + baseframe.rodape.top_bg:SetHeight (128) + baseframe.rodape.top_bg:SetPoint ("left", baseframe.rodape.esquerdo, "right", -16, -48) + baseframe.rodape.top_bg:SetPoint ("right", baseframe.rodape.direita, "left", 16, -48) - local StatusBarLeftAnchor = CreateFrame ("frame", nil, BaseFrame) - StatusBarLeftAnchor:SetPoint ("left", BaseFrame.rodape.top_bg, "left", 5, 57) + local StatusBarLeftAnchor = CreateFrame ("frame", nil, baseframe) + StatusBarLeftAnchor:SetPoint ("left", baseframe.rodape.top_bg, "left", 5, 57) StatusBarLeftAnchor:SetWidth (1) StatusBarLeftAnchor:SetHeight (1) - BaseFrame.rodape.StatusBarLeftAnchor = StatusBarLeftAnchor + baseframe.rodape.StatusBarLeftAnchor = StatusBarLeftAnchor - local StatusBarCenterAnchor = CreateFrame ("frame", nil, BaseFrame) - StatusBarCenterAnchor:SetPoint ("center", BaseFrame.rodape.top_bg, "center", 0, 57) + local StatusBarCenterAnchor = CreateFrame ("frame", nil, baseframe) + StatusBarCenterAnchor:SetPoint ("center", baseframe.rodape.top_bg, "center", 0, 57) StatusBarCenterAnchor:SetWidth (1) StatusBarCenterAnchor:SetHeight (1) - - BaseFrame.rodape.StatusBarCenterAnchor = StatusBarCenterAnchor + baseframe.rodape.StatusBarCenterAnchor = StatusBarCenterAnchor --> display frame - BaseFrame.statusbar = CreateFrame ("frame", nil, BaseFrame.cabecalho.fechar) - BaseFrame.statusbar:SetFrameLevel (BaseFrame.cabecalho.fechar:GetFrameLevel()+2) - BaseFrame.statusbar:SetPoint ("LEFT", BaseFrame.rodape.esquerdo, "RIGHT", -13, 10) - BaseFrame.statusbar:SetPoint ("RIGHT", BaseFrame.rodape.direita, "LEFT", 13, 10) - BaseFrame.statusbar:SetHeight (14) + baseframe.statusbar = CreateFrame ("frame", nil, baseframe.cabecalho.fechar) + baseframe.statusbar:SetFrameLevel (baseframe.cabecalho.fechar:GetFrameLevel()+2) + baseframe.statusbar:SetPoint ("left", baseframe.rodape.esquerdo, "right", -13, 10) + baseframe.statusbar:SetPoint ("right", baseframe.rodape.direita, "left", 13, 10) + baseframe.statusbar:SetHeight (14) - local statusbar_icon = BaseFrame.statusbar:CreateTexture (nil, "overlay") + local statusbar_icon = baseframe.statusbar:CreateTexture (nil, "overlay") statusbar_icon:SetWidth (14) statusbar_icon:SetHeight (14) - statusbar_icon:SetPoint ("left", BaseFrame.statusbar, "left") + statusbar_icon:SetPoint ("left", baseframe.statusbar, "left") - local statusbar_text = BaseFrame.statusbar:CreateFontString (nil, "overlay", "GameFontNormal") + local statusbar_text = baseframe.statusbar:CreateFontString (nil, "overlay", "GameFontNormal") statusbar_text:SetPoint ("left", statusbar_icon, "right", 2, 0) - BaseFrame.statusbar:SetBackdrop ({ - bgFile = "Interface\\AddOns\\Details\\images\\background", tile = true, tileSize = 16, + baseframe.statusbar:SetBackdrop ({ + bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}) - BaseFrame.statusbar:SetBackdropColor (0, 0, 0, 1) + baseframe.statusbar:SetBackdropColor (0, 0, 0, 1) - BaseFrame.statusbar.icon = statusbar_icon - BaseFrame.statusbar.text = statusbar_text - BaseFrame.statusbar.instancia = instancia + baseframe.statusbar.icon = statusbar_icon + baseframe.statusbar.text = statusbar_text + baseframe.statusbar.instancia = instancia - BaseFrame.statusbar:Hide() + baseframe.statusbar:Hide() --> frame invisível - BaseFrame.DOWNFrame = CreateFrame ("frame", nil, BaseFrame) - BaseFrame.DOWNFrame:SetPoint ("LEFT", BaseFrame.rodape.esquerdo, "RIGHT", 0, 10) - BaseFrame.DOWNFrame:SetPoint ("RIGHT", BaseFrame.rodape.direita, "LEFT", 0, 10) - BaseFrame.DOWNFrame:SetHeight (14) + baseframe.DOWNFrame = CreateFrame ("frame", nil, baseframe) + baseframe.DOWNFrame:SetPoint ("left", baseframe.rodape.esquerdo, "right", 0, 10) + baseframe.DOWNFrame:SetPoint ("right", baseframe.rodape.direita, "left", 0, 10) + baseframe.DOWNFrame:SetHeight (14) - BaseFrame.DOWNFrame:Show() - BaseFrame.DOWNFrame:EnableMouse (true) - BaseFrame.DOWNFrame:SetMovable (true) - BaseFrame.DOWNFrame:SetResizable (true) + baseframe.DOWNFrame:Show() + baseframe.DOWNFrame:EnableMouse (true) + baseframe.DOWNFrame:SetMovable (true) + baseframe.DOWNFrame:SetResizable (true) - BGFrame_scripts (BaseFrame.DOWNFrame, BaseFrame, instancia) + BGFrame_scripts (baseframe.DOWNFrame, baseframe, instancia) end function _detalhes:CheckConsolidates() @@ -2701,20 +2995,32 @@ function _detalhes:CheckConsolidates() end function _detalhes:ConsolidateIcons() + self.consolidate = true + self.consolidateButton:Show() - return self:DefaultIcons() + + self:DefaultIcons() + + return self:MenuAnchor() end function _detalhes:UnConsolidateIcons() + self.consolidate = false + if (not self.consolidateButton) then return self:DefaultIcons() end + self.consolidateButton:Hide() - return self:DefaultIcons() + + self:DefaultIcons() + + return self:MenuAnchor() end +--> search key: ~icon function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) if (_mode == nil) then @@ -2729,7 +3035,7 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) if (_report == nil) then _report = self.icons[4] end - + if (self.consolidate and not self.consolidateButton:IsShown()) then self.consolidateButton:Show() elseif (not self.consolidate and self.consolidateButton:IsShown()) then @@ -2760,13 +3066,15 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) if (not _gotFirst) then _thisIcon:ClearAllPoints() + if (self.consolidate) then - _thisIcon:SetPoint ("TOPLEFT", self.consolidateFrame, "TOPLEFT", -3, -5) + _thisIcon:SetPoint ("topleft", self.consolidateFrame, "topleft", -3, -5) _thisIcon:SetParent (self.consolidateFrame) else - _thisIcon:SetPoint ("BOTTOMLEFT", baseToolbar.ball, "BOTTOMRIGHT", 6 + anchors[index][1], 2 + anchors[index][2]) + _thisIcon:SetPoint ("bottomleft", baseToolbar.ball, "bottomright", anchors[index][1] + self.menu_anchor [1], anchors[index][2] + self.menu_anchor [2]) _thisIcon:SetParent (self.baseframe) _thisIcon:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1) + end _gotFirst = true @@ -2774,7 +3082,9 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) for dex = index-1, 1, -1 do local _thisIcon2 = icons [dex] if (_thisIcon2:IsShown()) then + _thisIcon:ClearAllPoints() + if (self.consolidate) then _thisIcon:SetPoint ("topleft", _thisIcon2.widget or _thisIcon2, "bottomleft", anchors[index][1], anchors[index][2]-2) _thisIcon:SetParent (self.consolidateFrame) @@ -2801,8 +3111,8 @@ function _detalhes:DefaultIcons (_mode, _segment, _attributes, _report) self.lastIcon = baseToolbar.ball end - _detalhes.ToolBar:ReorganizeIcons() --> aqui 2553 - + _detalhes.ToolBar:ReorganizeIcons() + return true end @@ -2811,8 +3121,8 @@ local parameters_table = {} local on_leave_menu = function (self, elapsed) parameters_table[2] = parameters_table[2] + elapsed if (parameters_table[2] > 0.3) then - if (not _detalhes.popup.mouseOver and not _detalhes.popup.buttonOver) then - _detalhes.popup:ShowMe (false) + if (not _G.GameCooltip.mouseOver and not _G.GameCooltip.buttonOver) then + _G.GameCooltip:ShowMe (false) end self:SetScript ("OnUpdate", nil) end @@ -2843,14 +3153,18 @@ local build_mode_list = function (self, elapsed) CoolTip:SetOption ("FixedWidthSub", 146) CoolTip:SetOption ("SubMenuIsTooltip", true) - if (_detalhes.tutorial.main_help_button > 9) then + if (_detalhes.tutorial.logons > 9) then CoolTip:SetOption ("IgnoreSubMenu", true) end if (instancia.consolidate) then CoolTip:SetOwner (self, "topleft", "topright", 3) else - CoolTip:SetOwner (self) + if (instancia.toolbar_side == 1) then + CoolTip:SetOwner (self) + elseif (instancia.toolbar_side == 2) then --> bottom + CoolTip:SetOwner (self, "bottom", "top", 0, -7) + end end CoolTip:ShowCooltip() end @@ -2929,7 +3243,7 @@ local build_segment_list = function (self, elapsed) if (thisCombat.is_trash) then CoolTip:AddIcon ([[Interface\AddOns\Details\images\icons]], "main", "left", 16, 12, 0.02734375, 0.11328125, 0.19140625, 0.3125) else - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16) + CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16) end end @@ -2948,7 +3262,7 @@ local build_segment_list = function (self, elapsed) else CoolTip:AddLine (Loc ["STRING_SEGMENT_LOWER"] .. " #" .. i, _, 1, "gray") CoolTip:AddMenu (1, instancia.TrocaTabela, i) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color) + CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, empty_segment_color) CoolTip:AddLine (Loc ["STRING_SEGMENT_EMPTY"], _, 2) end @@ -2967,7 +3281,7 @@ local build_segment_list = function (self, elapsed) ----------- current CoolTip:AddLine (segmentos.current_standard, _, 1, "white") CoolTip:AddMenu (1, instancia.TrocaTabela, 0) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") + CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange") local enemy = _detalhes.tabela_vigente.is_boss and _detalhes.tabela_vigente.is_boss.name or _detalhes.tabela_vigente.enemy or "--x--x--" @@ -3015,7 +3329,7 @@ local build_segment_list = function (self, elapsed) --CoolTip:AddLine (segmentos.overall_standard, _, 1, "white") Loc ["STRING_REPORT_LAST"] .. " " .. fight_amount .. " " .. Loc ["STRING_REPORT_FIGHTS"] CoolTip:AddLine (Loc ["STRING_SEGMENT_OVERALL"], _, 1, "white") CoolTip:AddMenu (1, instancia.TrocaTabela, -1) - CoolTip:AddIcon ("Interface\\QUESTFRAME\\UI-Quest-BulletPoint", "main", "left", 16, 16, nil, nil, nil, nil, "orange") + CoolTip:AddIcon ([[Interface\QUESTFRAME\UI-Quest-BulletPoint]], "main", "left", 16, 16, nil, nil, nil, nil, "orange") CoolTip:AddLine (Loc ["STRING_SEGMENT_ENEMY"] .. ":", "--x--x--", 2, "white", "white")--localize-me @@ -3068,7 +3382,11 @@ local build_segment_list = function (self, elapsed) if (instancia.consolidate) then CoolTip:SetOwner (self, "topleft", "topright", 3) else - CoolTip:SetOwner (self) + if (instancia.toolbar_side == 1) then + CoolTip:SetOwner (self) + elseif (instancia.toolbar_side == 2) then --> bottom + CoolTip:SetOwner (self, "bottom", "top", 0, -7) + end end CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) @@ -3089,6 +3407,67 @@ local build_segment_list = function (self, elapsed) end +function _detalhes:DisableUIPanelButton (button) + button.Right:Hide() + button.Middle:Hide() + + button:SetScript ("OnMouseDown", function() + button.Left:SetPoint ("topleft", button, "topleft", 1, -1) + button.Left:SetPoint ("bottomleft", button, "bottomleft", 1, -1) + end) + + button:SetScript ("OnMouseUp", function() + button.Left:SetPoint ("topleft", button, "topleft") + button.Left:SetPoint ("bottomleft", button, "bottomleft") + end) + button:SetScript ("OnShow", function()end) + button:SetScript ("OnDisable", function()end) + button:SetScript ("OnEnable", function()end) +end + +function _detalhes:RestoreUIPanelButton (button) + --> restaura o botão + button.Left:SetTexture ([[Interface\Buttons\UI-Panel-Button-Down]]) + button.Left:SetTexCoord (0, 0.0937, 0, 0.6875) + button.Left:SetSize (12, 22) + button.Right:Show() + button.Middle:Show() + + button:SetScript ("OnMouseDown", function (self) + if ( self:IsEnabled() ) then + self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]); + self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]); + self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Down]]); + end + end) + + button:SetScript ("OnMouseUp", function (self) + if ( self:IsEnabled() ) then + self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + end + end) + + button:SetScript ("OnShow", function (self) + if ( self:IsEnabled() ) then + self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + end + end) + button:SetScript ("OnDisable", function (self) + self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]); + self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]); + self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Disabled]]); + end) + button:SetScript ("OnEnable", function (self) + self.Left:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Middle:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + self.Right:SetTexture([[Interface\Buttons\UI-Panel-Button-Up]]); + end) +end + local botao_fechar_on_enter = function (self) OnEnterMainWindow (self.instancia, self, 3) end @@ -3096,48 +3475,197 @@ local botao_fechar_on_leave = function (self) OnLeaveMainWindow (self.instancia, self, 3) end +-- ~skin function _detalhes:ChangeSkin (skin_name) if (not skin_name) then skin_name = self.skin end - + local this_skin = _detalhes.skins [skin_name] - + if (not this_skin) then return false --> throw a msg end + + local just_updating = false + if (self.skin == skin_name) then + just_updating = true + end + + if (not just_updating) then + + --> reset all config + self:ResetInstanceConfig() + + --> overwrites + local overwrite_cprops = this_skin.instance_cprops + if (overwrite_cprops) then + for cprop, value in _pairs (overwrite_cprops) do + self [cprop] = value + end + end + + --> reset micro frames + _detalhes.StatusBar:Reset (self) + + --> reset instance button + self:SetInstanceButtonSettings ("reset") + + --> reset delete button + if (_detalhes.ResetButtonInstance == self.meu_id) then + self:SetDeleteButtonSettings ("reset") + end + + --> reset close button + self:SetCloseButtonSettings ("reset") + + end self.skin = skin_name + local skin_file = this_skin.file + + --> set textures + self.baseframe.cabecalho.ball:SetTexture (skin_file) --> bola esquerda + self.baseframe.cabecalho.emenda:SetTexture (skin_file) --> emenda que liga a bola a textura do centro + + self.baseframe.cabecalho.ball_r:SetTexture (skin_file) --> bola direita onde fica o botão de fechar + self.baseframe.cabecalho.top_bg:SetTexture (skin_file) --> top background + + self.baseframe.barra_esquerda:SetTexture (skin_file) --> barra lateral + self.baseframe.barra_direita:SetTexture (skin_file) --> barra lateral + + self.baseframe.scroll_up:SetTexture (skin_file) --> scrollbar parte de cima + self.baseframe.scroll_down:SetTexture (skin_file) --> scrollbar parte de baixo + self.baseframe.scroll_middle:SetTexture (skin_file) --> scrollbar parte do meio + + self.baseframe.rodape.top_bg:SetTexture (skin_file) --> rodape top background + self.baseframe.rodape.esquerdo:SetTexture (skin_file) --> rodape esquerdo + self.baseframe.rodape.direita:SetTexture (skin_file) --> rodape direito + + self.baseframe.button_stretch.texture:SetTexture (skin_file) --> botão de esticar a janela + + self.baseframe.resize_direita.texture:SetTexture (skin_file) --> botão de redimencionar da direita + self.baseframe.resize_esquerda.texture:SetTexture (skin_file) --> botão de redimencionar da esquerda + + self.botao_separar:SetNormalTexture (skin_file) --> cadeado + self.botao_separar:SetDisabledTexture (skin_file) + self.botao_separar:SetHighlightTexture (skin_file, "ADD") + self.botao_separar:SetPushedTexture (skin_file) + + +----------> custom reset button + if (this_skin.reset_button_coords) then + if (_detalhes.ResetButtonInstance == self.meu_id) then + --> seta o botão + _detalhes.ResetButton.Left:SetTexture (skin_file) + _detalhes.ResetButton.Left:SetTexCoord (unpack (this_skin.reset_button_coords)) + _detalhes.ResetButton.Left:SetSize (_detalhes.ResetButton:GetSize()) + + _detalhes.ResetButton2.Left:SetTexture (skin_file) + _detalhes.ResetButton2.Left:SetTexCoord (unpack (this_skin.reset_button_small_coords or this_skin.reset_button_coords)) + _detalhes.ResetButton2.Left:SetSize (_detalhes.ResetButton2:GetSize()) + + --> remove propriedades do botão da blizzard + _detalhes:DisableUIPanelButton (_detalhes.ResetButton) + _detalhes:DisableUIPanelButton (_detalhes.ResetButton2) + end + else + _detalhes:RestoreUIPanelButton (_detalhes.ResetButton) + _detalhes:RestoreUIPanelButton (_detalhes.ResetButton2) + end + +----------> custom instance button + + if (this_skin.instance_button_coords) then + + --> seta o botão + self.baseframe.cabecalho.novo:SetHeight (12) + self.baseframe.cabecalho.novo.Left:SetTexture (skin_file) + self.baseframe.cabecalho.novo.Left:SetTexCoord (unpack (this_skin.instance_button_coords)) + self.baseframe.cabecalho.novo.Left:SetSize (self.baseframe.cabecalho.novo:GetSize()) + + --> remove propriedades do botão da blizzard + _detalhes:DisableUIPanelButton (self.baseframe.cabecalho.novo) + + else + self.baseframe.cabecalho.novo:SetHeight (15) + _detalhes:RestoreUIPanelButton (self.baseframe.cabecalho.novo) + end - self.baseframe.cabecalho.ball:SetTexture (skin_file) --> bola esquerda - self.baseframe.cabecalho.emenda:SetTexture (skin_file) --> emenda que liga a bola a textura do centro +----------> custom close button + + if (this_skin.close_button_coords) then - self.baseframe.cabecalho.ball_r:SetTexture (skin_file) --> bola direita onde fica o botão de fechar - self.baseframe.cabecalho.top_bg:SetTexture (skin_file) --> top background + --> textures + self.baseframe.cabecalho.fechar:SetDisabledTexture (skin_file) + self.baseframe.cabecalho.fechar:SetNormalTexture (skin_file) + self.baseframe.cabecalho.fechar:SetPushedTexture (skin_file) + self.baseframe.cabecalho.fechar:SetHighlightTexture (skin_file) + + --> texcoords + self.baseframe.cabecalho.fechar:GetDisabledTexture():SetTexCoord (unpack (this_skin.close_button_coords)) + self.baseframe.cabecalho.fechar:GetNormalTexture():SetTexCoord (unpack (this_skin.close_button_coords)) + self.baseframe.cabecalho.fechar:GetPushedTexture():SetTexCoord (unpack (this_skin.close_button_coords)) + self.baseframe.cabecalho.fechar:GetHighlightTexture():SetTexCoord (unpack (this_skin.close_button_coords)) + + --> if the custom close button have a specified size + if (this_skin.close_button_size) then + self.baseframe.cabecalho.fechar:SetSize (unpack (this_skin.close_button_size)) + else + self.baseframe.cabecalho.fechar:SetSize (18, 18) + end + + self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", function() + self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", this_skin.close_button_anchor[1]+1, this_skin.close_button_anchor[2]-1) + end) + self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", function() + self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", this_skin.close_button_anchor[1], this_skin.close_button_anchor[2]) + end) + + else + self.baseframe.cabecalho.fechar:SetDisabledTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Disabled]]) + self.baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]]) + self.baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]]) + self.baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]) + + self.baseframe.cabecalho.fechar:GetDisabledTexture():SetTexCoord (0, 1, 0, 1) + self.baseframe.cabecalho.fechar:GetNormalTexture():SetTexCoord (0, 1, 0, 1) + self.baseframe.cabecalho.fechar:GetPushedTexture():SetTexCoord (0, 1, 0, 1) + self.baseframe.cabecalho.fechar:GetHighlightTexture():SetTexCoord (0, 1, 0, 1) + + self.baseframe.cabecalho.fechar:SetScript ("OnMouseDown", nil) + self.baseframe.cabecalho.fechar:SetScript ("OnMouseUp", nil) + + self.baseframe.cabecalho.fechar:SetSize (32, 32) + end + +----------> customize micro frames - self.baseframe.barra_esquerda:SetTexture (skin_file) --> barra lateral - self.baseframe.barra_direita:SetTexture (skin_file) --> barra lateral + if (this_skin.micro_frames) then + if (this_skin.micro_frames.color) then + _detalhes.StatusBar:ApplyOptions (self.StatusBar.left, "textcolor", this_skin.micro_frames.color) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.center, "textcolor", this_skin.micro_frames.color) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.right, "textcolor", this_skin.micro_frames.color) + end + if (this_skin.micro_frames.font) then + _detalhes.StatusBar:ApplyOptions (self.StatusBar.left, "textface", this_skin.micro_frames.font) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.center, "textface", this_skin.micro_frames.font) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.right, "textface", this_skin.micro_frames.font) + end + if (this_skin.micro_frames.size) then + _detalhes.StatusBar:ApplyOptions (self.StatusBar.left, "textsize", this_skin.micro_frames.size) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.center, "textsize", this_skin.micro_frames.size) + _detalhes.StatusBar:ApplyOptions (self.StatusBar.right, "textsize", this_skin.micro_frames.size) + end + end - self.baseframe.scroll_up:SetTexture (skin_file) --> scrollbar parte de cima - self.baseframe.scroll_down:SetTexture (skin_file) --> scrollbar parte de baixo - self.baseframe.scroll_middle:SetTexture (skin_file) --> scrollbar parte do meio - - self.baseframe.rodape.top_bg:SetTexture (skin_file) --> rodape top background - self.baseframe.rodape.esquerdo:SetTexture (skin_file) --> rodape esquerdo - self.baseframe.rodape.direita:SetTexture (skin_file) --> rodape direito - - self.baseframe.button_stretch.texture:SetTexture (skin_file) --> botão de esticar a janela - - self.baseframe.resize_direita.texture:SetTexture (skin_file) --> botão de redimencionar da direita - self.baseframe.resize_esquerda.texture:SetTexture (skin_file) --> botão de redimencionar da esquerda - - self.baseframe.unlock_texture:SetTexture (skin_file) --> cadeado +----------> icon anchor and size if (self.modo == 1 or self.modo == 4 or self.atributo == 5) then -- alone e raid local icon_anchor = this_skin.icon_anchor_plugins - self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2]) + self.baseframe.cabecalho.atributo_icon:SetPoint ("topright", self.baseframe.cabecalho.ball_point, "topright", icon_anchor[1], icon_anchor[2]) if (self.modo == 1) then local plugin_index = _detalhes.SoloTables.Mode if (plugin_index > 0 and _detalhes.SoloTables.Menu [plugin_index]) then @@ -3151,34 +3679,464 @@ function _detalhes:ChangeSkin (skin_name) end else local icon_anchor = this_skin.icon_anchor_main --> ancora do icone do canto direito superior - self.baseframe.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", self.baseframe.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2]) + self.baseframe.cabecalho.atributo_icon:SetPoint ("topright", self.baseframe.cabecalho.ball_point, "topright", icon_anchor[1], icon_anchor[2]) self:ChangeIcon() end +----------> lock alpha head + if (not this_skin.can_change_alpha_head) then self.baseframe.cabecalho.ball:SetAlpha (100) else self.baseframe.cabecalho.ball:SetAlpha (self.color[4]) end +----------> call widgets handlers + + --> refresh instance button + self:SetInstanceButtonSettings() + + --> refresh delete button + if (_detalhes.ResetButtonInstance == self.meu_id) then + self:SetDeleteButtonSettings() + end + + --> refresh close button + self:SetCloseButtonSettings() + + --> update toolbar + self:ToolbarSide() + + --> update stretch button + self:StretchButtonAnchor() + + --> update side bars + if (self.show_sidebars) then + self:ShowSideBars() + else + self:HideSideBars() + end + + --> update statusbar + if (self.show_statusbar) then + self:ShowStatusBar() + else + self:HideStatusBar() + end + + --> update wallpaper + if (self.wallpaper.enabled) then + self:InstanceWallpaper (true) + end + + --> update instance color + self:InstanceColor() + self:SetBackgroundColor() + self:SetBackgroundAlpha() + + --> refresh all bars + self:InstanceRefreshRows() + + --> refresh options panel if opened + if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then + _detalhes:OpenOptionsWindow (self) + end + end -function gump:CriaCabecalho (BaseFrame, instancia) +function _detalhes:ToolbarSide (side) + + if (not side) then + side = self.toolbar_side + end + + self.toolbar_side = side + + local skin = _detalhes.skins [self.skin] + + if (side == 1) then --> top + --> ball point + self.baseframe.cabecalho.ball_point:ClearAllPoints() + self.baseframe.cabecalho.ball_point:SetPoint ("bottomleft", self.baseframe, "topleft", unpack (skin.icon_point_anchor)) + --> ball + self.baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL)) + self.baseframe.cabecalho.ball:ClearAllPoints() + self.baseframe.cabecalho.ball:SetPoint ("bottomleft", self.baseframe, "topleft", unpack (skin.left_corner_anchor)) + --> botão fechar + self.baseframe.cabecalho.fechar:ClearAllPoints() + self.baseframe.cabecalho.fechar:SetPoint ("bottomright", self.baseframe, "topright", unpack (skin.close_button_anchor)) + --> ball r + self.baseframe.cabecalho.ball_r:SetTexCoord (unpack (COORDS_RIGHT_BALL)) + self.baseframe.cabecalho.ball_r:ClearAllPoints() + self.baseframe.cabecalho.ball_r:SetPoint ("bottomright", self.baseframe, "topright", unpack (skin.right_corner_anchor)) + + --> instance + self:InstanceButtonAnchor() + + --> tex coords + self.baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR)) + self.baseframe.cabecalho.top_bg:SetTexCoord (unpack (COORDS_TOP_BACKGROUND)) + + --> menu + self:MenuAnchor() + + + else --> bottom + + local y = 0 + if (self.show_statusbar) then + y = -14 + end + + --> ball point + self.baseframe.cabecalho.ball_point:ClearAllPoints() + local _x, _y = unpack (skin.icon_point_anchor_bottom) + self.baseframe.cabecalho.ball_point:SetPoint ("topleft", self.baseframe, "bottomleft", _x, _y + y) + --> ball + self.baseframe.cabecalho.ball:ClearAllPoints() + local _x, _y = unpack (skin.left_corner_anchor_bottom) + self.baseframe.cabecalho.ball:SetPoint ("topleft", self.baseframe, "bottomleft", _x, _y + y) + local l, r, t, b = unpack (COORDS_LEFT_BALL) + self.baseframe.cabecalho.ball:SetTexCoord (l, r, b, t) + --> botão fechar + self.baseframe.cabecalho.fechar:ClearAllPoints() + local _x, _y = unpack (skin.close_button_anchor_bottom) + self.baseframe.cabecalho.fechar:SetPoint ("topright", self.baseframe, "bottomright", _x, _y + y) + --> ball r + self.baseframe.cabecalho.ball_r:ClearAllPoints() + local _x, _y = unpack (skin.right_corner_anchor_bottom) + self.baseframe.cabecalho.ball_r:SetPoint ("topright", self.baseframe, "bottomright", _x, _y + y) + local l, r, t, b = unpack (COORDS_RIGHT_BALL) + self.baseframe.cabecalho.ball_r:SetTexCoord (l, r, b, t) + + --> tex coords + local l, r, t, b = unpack (COORDS_LEFT_CONNECTOR) + self.baseframe.cabecalho.emenda:SetTexCoord (l, r, b, t) + local l, r, t, b = unpack (COORDS_TOP_BACKGROUND) + self.baseframe.cabecalho.top_bg:SetTexCoord (l, r, b, t) + + --> instance button + self:InstanceButtonAnchor() + + --> menu buttons + self:MenuAnchor() + end + + self:StretchButtonAnchor() + self:HideMainIcon() + + if (self.show_sidebars) then + self:ShowSideBars() + end + +end + +function _detalhes:StretchButtonAnchor (side) + + if (not side) then + side = self.stretch_button_side + end + + if (side == 1 or string.lower (side) == "top") then + + self.baseframe.button_stretch:ClearAllPoints() + + local y = 0 + if (self.toolbar_side == 2) then --bottom + y = -20 + end + + self.baseframe.button_stretch:SetPoint ("bottom", self.baseframe, "top", 0, 20 + y) + self.baseframe.button_stretch:SetPoint ("right", self.baseframe, "right", -27, 0) + self.baseframe.button_stretch.texture:SetTexCoord (unpack (COORDS_STRETCH)) + self.stretch_button_side = 1 + + elseif (side == 2 or string.lower (side) == "bottom") then + + self.baseframe.button_stretch:ClearAllPoints() + + local y = 0 + if (self.toolbar_side == 2) then --bottom + y = y -20 + end + if (self.show_statusbar) then + y = y -14 + end + + self.baseframe.button_stretch:SetPoint ("center", self.baseframe, "center") + self.baseframe.button_stretch:SetPoint ("top", self.baseframe, "bottom", 0, y) + + local l, r, t, b = unpack (COORDS_STRETCH) + self.baseframe.button_stretch.texture:SetTexCoord (r, l, b, t) + + self.stretch_button_side = 2 + + end + +end + +function _detalhes:InstanceButtonAnchor (x, y) + + if (not x) then + x = self.instance_button_anchor [1] + end + if (not y) then + y = self.instance_button_anchor [2] + end + + self.instance_button_anchor [1] = x + self.instance_button_anchor [2] = y + + self.baseframe.cabecalho.novo:ClearAllPoints() + + if (self.toolbar_side == 2) then --> bottom + local y_mod = 0 + if (self.show_statusbar) then + y_mod = 14 + end + self.baseframe.cabecalho.novo:SetPoint ("topright", self.baseframe, "bottomright", x, (y + y_mod) * -1) + else + self.baseframe.cabecalho.novo:SetPoint ("bottomright", self.baseframe, "topright", x, y) + end + +end + +function _detalhes:MenuAnchor (x, y) + + if (not x) then + x = self.menu_anchor [1] + end + if (not y) then + y = self.menu_anchor [2] + end + + self.menu_anchor [1] = x + self.menu_anchor [2] = y + + if (self.consolidate) then + self.consolidateButton:ClearAllPoints() + + if (self.toolbar_side == 1) then --> top + self.consolidateButton:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y) + + else --> bottom + + self.consolidateButton:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1) + end + + else --> not consolidated + self.baseframe.cabecalho.modo_selecao:ClearAllPoints() + + if (self.toolbar_side == 1) then --> top + self.baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", self.baseframe.cabecalho.ball, "bottomright", x, y) + + else --> bottom + self.baseframe.cabecalho.modo_selecao:SetPoint ("topleft", self.baseframe.cabecalho.ball, "topright", x, y*-1) + + end + end +end + +function _detalhes:HideMainIcon (value) + + if (value == nil) then + value = self.hide_icon + end + + if (value) then + self.hide_icon = true + self.baseframe.cabecalho.atributo_icon:Hide() + self.baseframe.cabecalho.ball:SetParent (self.baseframe) + + if (self.toolbar_side == 1) then + self.baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL_NO_ICON)) + self.baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR_NO_ICON)) + + elseif (self.toolbar_side == 2) then + local l, r, t, b = unpack (COORDS_LEFT_BALL_NO_ICON) + self.baseframe.cabecalho.ball:SetTexCoord (l, r, b, t) + local l, r, t, b = unpack (COORDS_LEFT_CONNECTOR_NO_ICON) + self.baseframe.cabecalho.emenda:SetTexCoord (l, r, b, t) + + end + + else + self.hide_icon = false + self.baseframe.cabecalho.atributo_icon:Show() + self.baseframe.cabecalho.ball:SetParent (_detalhes.listener) + + if (self.toolbar_side == 1) then + + self.baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL)) + self.baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR)) + + elseif (self.toolbar_side == 2) then + + local l, r, t, b = unpack (COORDS_LEFT_BALL) + self.baseframe.cabecalho.ball:SetTexCoord (l, r, b, t) + local l, r, t, b = unpack (COORDS_LEFT_CONNECTOR) + self.baseframe.cabecalho.emenda:SetTexCoord (l, r, b, t) + end + end + +end + +--> search key: ~desaturate +function _detalhes:DesaturateMenu (value) + + if (value == nil) then + value = self.desaturated_menu + end + + if (value) then + self.desaturated_menu = true + self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated (true) + self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (true) + self.baseframe.cabecalho.atributo:GetNormalTexture():SetDesaturated (true) + self.baseframe.cabecalho.report:GetNormalTexture():SetDesaturated (true) + + if (self.meu_id == _detalhes:GetLowerInstanceNumber()) then + for _, button in _ipairs (_detalhes.ToolBar.AllButtons) do + button:GetNormalTexture():SetDesaturated (true) + end + end + + else + self.desaturated_menu = false + self.baseframe.cabecalho.modo_selecao:GetNormalTexture():SetDesaturated (false) + self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (false) + self.baseframe.cabecalho.atributo:GetNormalTexture():SetDesaturated (false) + self.baseframe.cabecalho.report:GetNormalTexture():SetDesaturated (false) + + if (self.meu_id == _detalhes:GetLowerInstanceNumber()) then + for _, button in _ipairs (_detalhes.ToolBar.AllButtons) do + button:GetNormalTexture():SetDesaturated (false) + end + end + + end +end + +function _detalhes:ShowSideBars (instancia) + if (instancia) then + self = instancia + end + + self.show_sidebars = true + + self.baseframe.barra_esquerda:Show() + self.baseframe.barra_direita:Show() + + 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) + + if (self.toolbar_side == 2) then + self.baseframe.barra_fundo:Show() + local l, r, t, b = unpack (COORDS_BOTTOM_SIDE_BAR) + self.baseframe.barra_fundo:SetTexCoord (l, r, b, t) + self.baseframe.barra_fundo:ClearAllPoints() + self.baseframe.barra_fundo:SetPoint ("bottomleft", self.baseframe, "topleft", -1, -6) + self.baseframe.barra_fundo:SetPoint ("bottomright", self.baseframe, "topright", -1, -6) + else + self.baseframe.barra_fundo:Hide() + end + else + self.baseframe.barra_esquerda:SetPoint ("bottomleft", self.baseframe, "bottomleft", -56, 0) + self.baseframe.barra_direita:SetPoint ("bottomright", self.baseframe, "bottomright", 56, 0) + + self.baseframe.barra_fundo:Show() + + if (self.toolbar_side == 2) then --tooltbar on bottom + local l, r, t, b = unpack (COORDS_BOTTOM_SIDE_BAR) + self.baseframe.barra_fundo:SetTexCoord (l, r, b, t) + self.baseframe.barra_fundo:ClearAllPoints() + self.baseframe.barra_fundo:SetPoint ("bottomleft", self.baseframe, "topleft", -1, -6) + self.baseframe.barra_fundo:SetPoint ("bottomright", self.baseframe, "topright", -1, -6) + else --tooltbar on top + self.baseframe.barra_fundo:SetTexCoord (unpack (COORDS_BOTTOM_SIDE_BAR)) + self.baseframe.barra_fundo:ClearAllPoints() + self.baseframe.barra_fundo:SetPoint ("bottomleft", self.baseframe, "bottomleft", -1, -56) + self.baseframe.barra_fundo:SetPoint ("bottomright", self.baseframe, "bottomright", -1, -56) + end + end + +end + +function _detalhes:HideSideBars (instancia) + if (instancia) then + self = instancia + end + + self.show_sidebars = false + + self.baseframe.barra_esquerda:Hide() + self.baseframe.barra_direita:Hide() + self.baseframe.barra_fundo:Hide() + +end + +function _detalhes:HideStatusBar (instancia) + if (instancia) then + self = instancia + end + + self.show_statusbar = false + + self.baseframe.rodape.esquerdo:Hide() + self.baseframe.rodape.direita:Hide() + self.baseframe.rodape.top_bg:Hide() + self.baseframe.rodape.StatusBarLeftAnchor:Hide() + self.baseframe.rodape.StatusBarCenterAnchor:Hide() + + if (self.toolbar_side == 2) then + self:ToolbarSide() + end + + if (self.show_sidebars) then + self:ShowSideBars() + end + + self:StretchButtonAnchor() + + _detalhes.StatusBar:Hide (self) --> mini displays widgets +end + +function _detalhes:ShowStatusBar (instancia) + if (instancia) then + self = instancia + end + + self.show_statusbar = true + + self.baseframe.rodape.esquerdo:Show() + self.baseframe.rodape.direita:Show() + self.baseframe.rodape.top_bg:Show() + self.baseframe.rodape.StatusBarLeftAnchor:Show() + self.baseframe.rodape.StatusBarCenterAnchor:Show() + + self:ToolbarSide() + self:StretchButtonAnchor() + + _detalhes.StatusBar:Show (self) --> mini displays widgets +end + +function gump:CriaCabecalho (baseframe, instancia) -- texturas da barra superior ------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho = {} + baseframe.cabecalho = {} --> FECHAR INSTANCIA ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.fechar = _CreateFrame ("Button", nil, BaseFrame, "UIPanelCloseButton") - BaseFrame.cabecalho.fechar:SetWidth (32) - BaseFrame.cabecalho.fechar:SetHeight (32) - BaseFrame.cabecalho.fechar:SetFrameLevel (5) --> altura mais alta que os demais frames - BaseFrame.cabecalho.fechar:SetPoint ("BOTTOMRIGHT", BaseFrame, "TOPRIGHT", 5, -6) --> seta o ponto dele fixando no base frame + baseframe.cabecalho.fechar = CreateFrame ("button", nil, baseframe, "UIPanelCloseButton") + baseframe.cabecalho.fechar:SetWidth (32) + baseframe.cabecalho.fechar:SetHeight (32) + baseframe.cabecalho.fechar:SetFrameLevel (5) --> altura mais alta que os demais frames + baseframe.cabecalho.fechar:SetPoint ("bottomright", baseframe, "topright", 5, -6) --> seta o ponto dele fixando no base frame - BaseFrame.cabecalho.fechar:SetScript ("OnClick", function() - BaseFrame.cabecalho.fechar:Disable() + baseframe.cabecalho.fechar:SetScript ("OnClick", function() + baseframe.cabecalho.fechar:Disable() instancia:DesativarInstancia() --> não há mais instâncias abertas, então manda msg alertando if (_detalhes.opened_windows == 0) then @@ -3186,80 +4144,74 @@ function gump:CriaCabecalho (BaseFrame, instancia) end end) - BaseFrame.cabecalho.fechar.instancia = instancia - BaseFrame.cabecalho.fechar:SetText ("x") - BaseFrame.cabecalho.fechar:SetScript ("OnEnter", botao_fechar_on_enter) - BaseFrame.cabecalho.fechar:SetScript ("OnLeave", botao_fechar_on_leave) + baseframe.cabecalho.fechar.instancia = instancia + baseframe.cabecalho.fechar:SetText ("x") + baseframe.cabecalho.fechar:SetScript ("OnEnter", botao_fechar_on_enter) + baseframe.cabecalho.fechar:SetScript ("OnLeave", botao_fechar_on_leave) --> bola do canto esquedo superior --> primeiro criar a armação para apoiar as texturas - BaseFrame.cabecalho.ball_point = BaseFrame.cabecalho.fechar:CreateTexture (nil, "OVERLAY") - BaseFrame.cabecalho.ball_point:SetPoint ("BOTTOMLEFT", BaseFrame, "TOPLEFT", -37, 0) - BaseFrame.cabecalho.ball_point:SetWidth (64) - BaseFrame.cabecalho.ball_point:SetHeight (32) + baseframe.cabecalho.ball_point = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay") + baseframe.cabecalho.ball_point:SetPoint ("bottomleft", baseframe, "topleft", -37, 0) + baseframe.cabecalho.ball_point:SetWidth (64) + baseframe.cabecalho.ball_point:SetHeight (32) --> icone do atributo - BaseFrame.cabecalho.atributo_icon = _detalhes.listener:CreateTexture (nil, "ARTWORK") + baseframe.cabecalho.atributo_icon = _detalhes.listener:CreateTexture (nil, "artwork") local icon_anchor = _detalhes.skins ["Default Skin"].icon_anchor_main - BaseFrame.cabecalho.atributo_icon:SetPoint ("TOPRIGHT", BaseFrame.cabecalho.ball_point, "TOPRIGHT", icon_anchor[1], icon_anchor[2]) - --BaseFrame.cabecalho.atributo_icon:SetTexture ("Interface\\AddOns\\Details\\images\\icon_mainwindow") - BaseFrame.cabecalho.atributo_icon:SetTexture (DEFAULT_SKIN) - BaseFrame.cabecalho.atributo_icon:SetWidth (32) - BaseFrame.cabecalho.atributo_icon:SetHeight (32) + baseframe.cabecalho.atributo_icon:SetPoint ("topright", baseframe.cabecalho.ball_point, "topright", icon_anchor[1], icon_anchor[2]) + baseframe.cabecalho.atributo_icon:SetTexture (DEFAULT_SKIN) + baseframe.cabecalho.atributo_icon:SetWidth (32) + baseframe.cabecalho.atributo_icon:SetHeight (32) --> bola overlay - BaseFrame.cabecalho.ball = _detalhes.listener:CreateTexture (nil, "OVERLAY") - BaseFrame.cabecalho.ball:SetPoint ("BOTTOMLEFT", BaseFrame, "TOPLEFT", -107, 0) - BaseFrame.cabecalho.ball:SetWidth (128) - BaseFrame.cabecalho.ball:SetHeight (128) + baseframe.cabecalho.ball = _detalhes.listener:CreateTexture (nil, "overlay") + baseframe.cabecalho.ball:SetPoint ("bottomleft", baseframe, "topleft", -107, 0) + baseframe.cabecalho.ball:SetWidth (128) + baseframe.cabecalho.ball:SetHeight (128) - --BaseFrame.cabecalho.ball:SetTexture ([[Interface\AddOns\Details\images\ball_left]]) - BaseFrame.cabecalho.ball:SetTexture (DEFAULT_SKIN) - BaseFrame.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL)) + baseframe.cabecalho.ball:SetTexture (DEFAULT_SKIN) + baseframe.cabecalho.ball:SetTexCoord (unpack (COORDS_LEFT_BALL)) --> emenda - BaseFrame.cabecalho.emenda = BaseFrame:CreateTexture (nil, "OVERLAY") - BaseFrame.cabecalho.emenda:SetPoint ("bottomleft", BaseFrame.cabecalho.ball, "bottomright") - BaseFrame.cabecalho.emenda:SetWidth (8) - BaseFrame.cabecalho.emenda:SetHeight (128) - --BaseFrame.cabecalho.emenda:SetTexture ([[Interface\AddOns\Details\images\emenda_left]]) - BaseFrame.cabecalho.emenda:SetTexture (DEFAULT_SKIN) - BaseFrame.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR)) + baseframe.cabecalho.emenda = baseframe:CreateTexture (nil, "overlay") + baseframe.cabecalho.emenda:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright") + baseframe.cabecalho.emenda:SetWidth (8) + baseframe.cabecalho.emenda:SetHeight (128) + baseframe.cabecalho.emenda:SetTexture (DEFAULT_SKIN) + baseframe.cabecalho.emenda:SetTexCoord (unpack (COORDS_LEFT_CONNECTOR)) - BaseFrame.cabecalho.atributo_icon:Hide() - BaseFrame.cabecalho.ball:Hide() + baseframe.cabecalho.atributo_icon:Hide() + baseframe.cabecalho.ball:Hide() --> bola do canto direito superior - BaseFrame.cabecalho.ball_r = BaseFrame:CreateTexture (nil, "BACKGROUND") - BaseFrame.cabecalho.ball_r:SetPoint ("BOTTOMRIGHT", BaseFrame, "TOPRIGHT", 96, 0) - BaseFrame.cabecalho.ball_r:SetWidth (128) - BaseFrame.cabecalho.ball_r:SetHeight (128) - --BaseFrame.cabecalho.ball_r:SetTexture ("Interface\\AddOns\\Details\\images\\bar_top_right") - BaseFrame.cabecalho.ball_r:SetTexture (DEFAULT_SKIN) - BaseFrame.cabecalho.ball_r:SetTexCoord (unpack (COORDS_RIGHT_BALL)) + baseframe.cabecalho.ball_r = baseframe:CreateTexture (nil, "background") + baseframe.cabecalho.ball_r:SetPoint ("bottomright", baseframe, "topright", 96, 0) + baseframe.cabecalho.ball_r:SetWidth (128) + baseframe.cabecalho.ball_r:SetHeight (128) + baseframe.cabecalho.ball_r:SetTexture (DEFAULT_SKIN) + baseframe.cabecalho.ball_r:SetTexCoord (unpack (COORDS_RIGHT_BALL)) --> barra centro - BaseFrame.cabecalho.top_bg = BaseFrame:CreateTexture (nil, "BACKGROUND") - --BaseFrame.cabecalho.top_bg:SetPoint ("LEFT", BaseFrame.cabecalho.ball, "RIGHT", -4, 0) - BaseFrame.cabecalho.top_bg:SetPoint ("LEFT", BaseFrame.cabecalho.emenda, "RIGHT", 0, 0) - BaseFrame.cabecalho.top_bg:SetPoint ("RIGHT", BaseFrame.cabecalho.ball_r, "LEFT") - BaseFrame.cabecalho.top_bg:SetTexture (DEFAULT_SKIN) - BaseFrame.cabecalho.top_bg:SetTexCoord (unpack (COORDS_TOP_BACKGROUND)) - BaseFrame.cabecalho.top_bg:SetWidth (512) - BaseFrame.cabecalho.top_bg:SetHeight (128) - --BaseFrame.cabecalho.top_bg:SetTexture ("Interface\\AddOns\\Details\\images\\bar_top_center") + baseframe.cabecalho.top_bg = baseframe:CreateTexture (nil, "background") + baseframe.cabecalho.top_bg:SetPoint ("left", baseframe.cabecalho.emenda, "right", 0, 0) + baseframe.cabecalho.top_bg:SetPoint ("right", baseframe.cabecalho.ball_r, "left") + baseframe.cabecalho.top_bg:SetTexture (DEFAULT_SKIN) + baseframe.cabecalho.top_bg:SetTexCoord (unpack (COORDS_TOP_BACKGROUND)) + baseframe.cabecalho.top_bg:SetWidth (512) + baseframe.cabecalho.top_bg:SetHeight (128) --> frame invisível - BaseFrame.UPFrame = _CreateFrame ("frame", nil, BaseFrame) - BaseFrame.UPFrame:SetPoint ("LEFT", BaseFrame.cabecalho.ball, "RIGHT", 0, -53) - BaseFrame.UPFrame:SetPoint ("RIGHT", BaseFrame.cabecalho.ball_r, "LEFT", 0, -53) - BaseFrame.UPFrame:SetHeight (20) + baseframe.UPFrame = CreateFrame ("frame", nil, baseframe) + baseframe.UPFrame:SetPoint ("left", baseframe.cabecalho.ball, "right", 0, -53) + baseframe.UPFrame:SetPoint ("right", baseframe.cabecalho.ball_r, "left", 0, -53) + baseframe.UPFrame:SetHeight (20) - BaseFrame.UPFrame:Show() - BaseFrame.UPFrame:EnableMouse (true) - BaseFrame.UPFrame:SetMovable (true) - BaseFrame.UPFrame:SetResizable (true) + baseframe.UPFrame:Show() + baseframe.UPFrame:EnableMouse (true) + baseframe.UPFrame:SetMovable (true) + baseframe.UPFrame:SetResizable (true) - BGFrame_scripts (BaseFrame.UPFrame, BaseFrame, instancia) + BGFrame_scripts (baseframe.UPFrame, baseframe, instancia) -- botões @@ -3269,53 +4221,57 @@ function gump:CriaCabecalho (BaseFrame, instancia) --> SELEÇÃO DO MODO ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.modo_selecao = gump:NewButton (BaseFrame, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\HealerGossipIcon]]) - BaseFrame.cabecalho.modo_selecao:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.modo_selecao:SetPoint ("BOTTOMLEFT", BaseFrame.cabecalho.ball, "BOTTOMRIGHT", 0, 2) + baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\HealerGossipIcon]]) + baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", instancia.menu_anchor [1], instancia.menu_anchor [2]) + baseframe.cabecalho.modo_selecao:SetFrameLevel (baseframe:GetFrameLevel()+5) --> Generating Cooltip menu from table template local modeMenuTable = { {text = Loc ["STRING_MODE_GROUP"]}, {func = instancia.AlteraModo, param1 = 2}, - {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 32/256, r = 32/256*2, t = 0, b = 1, width = 20, height = 20}, + {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256, r = 32/256*2, t = 0, b = 1, width = 20, height = 20}, {text = Loc ["STRING_HELP_MODEGROUP"], type = 2}, {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, {text = Loc ["STRING_MODE_ALL"]}, {func = instancia.AlteraModo, param1 = 3}, - {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 32/256*2, r = 32/256*3, t = 0, b = 1, width = 20, height = 20}, + {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*2, r = 32/256*3, t = 0, b = 1, width = 20, height = 20}, {text = Loc ["STRING_HELP_MODEALL"], type = 2}, {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, {text = Loc ["STRING_MODE_SELF"] .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"}, {func = instancia.AlteraModo, param1 = 1}, - {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 0, r = 32/256, t = 0, b = 1, width = 20, height = 20}, + {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 0, r = 32/256, t = 0, b = 1, width = 20, height = 20}, {text = Loc ["STRING_HELP_MODESELF"], type = 2}, {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, {text = Loc ["STRING_MODE_RAID"] .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)"}, {func = instancia.AlteraModo, param1 = 4}, - {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 32/256*3, r = 32/256*4, t = 0, b = 1, width = 20, height = 20}, + {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*3, r = 32/256*4, t = 0, b = 1, width = 20, height = 20}, {text = Loc ["STRING_HELP_MODERAID"], type = 2}, {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, {text = Loc ["STRING_OPTIONS_WINDOW"]}, {func = _detalhes.OpenOptionsWindow}, - {icon = "Interface\\AddOns\\Details\\images\\modo_icones", l = 32/256*4, r = 32/256*5, t = 0, b = 1, width = 20, height = 20}, + {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*4, r = 32/256*5, t = 0, b = 1, width = 20, height = 20}, } --> Cooltip raw method for enter/leave show/hide - BaseFrame.cabecalho.modo_selecao:SetScript ("OnEnter", function (self) + baseframe.cabecalho.modo_selecao:SetScript ("OnEnter", function (self) - --gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) + --gump:Fade (baseframe.button_stretch, "alpha", 0.3) OnEnterMainWindow (instancia, self, 3) - _detalhes.popup.buttonOver = true - BaseFrame.cabecalho.button_mouse_over = true + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (false) + end + + _G.GameCooltip.buttonOver = true + baseframe.cabecalho.button_mouse_over = true local passou = 0 - if (_detalhes.popup.active) then + if (_G.GameCooltip.active) then passou = 0.15 end @@ -3338,14 +4294,17 @@ function gump:CriaCabecalho (BaseFrame, instancia) self:SetScript ("OnUpdate", build_mode_list) end) - BaseFrame.cabecalho.modo_selecao:SetScript ("OnLeave", function (self) - --gump:Fade (BaseFrame.button_stretch, -1) + baseframe.cabecalho.modo_selecao:SetScript ("OnLeave", function (self) OnLeaveMainWindow (instancia, self, 3) - _detalhes.popup.buttonOver = false - BaseFrame.cabecalho.button_mouse_over = false + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (true) + end - if (_detalhes.popup.active) then + _G.GameCooltip.buttonOver = false + baseframe.cabecalho.button_mouse_over = false + + if (_G.GameCooltip.active) then parameters_table [2] = 0 self:SetScript ("OnUpdate", on_leave_menu) else @@ -3354,10 +4313,10 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) --> SELECIONAR O SEGMENTO ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.segmento = gump:NewButton (BaseFrame, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\TrainerGossipIcon]]) - BaseFrame.cabecalho.segmento:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) + baseframe.cabecalho.segmento = gump:NewButton (baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\GossipFrame\TrainerGossipIcon]]) + baseframe.cabecalho.segmento:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.segmento:SetHook ("OnMouseUp", function (button, buttontype) + baseframe.cabecalho.segmento:SetHook ("OnMouseUp", function (button, buttontype) if (buttontype == "LeftButton") then @@ -3404,18 +4363,22 @@ function gump:CriaCabecalho (BaseFrame, instancia) end end) - BaseFrame.cabecalho.segmento:SetPoint ("left", BaseFrame.cabecalho.modo_selecao, "right", 0, 0) + baseframe.cabecalho.segmento:SetPoint ("left", baseframe.cabecalho.modo_selecao, "right", 0, 0) --> Cooltip raw method for show/hide onenter/onhide - BaseFrame.cabecalho.segmento:SetScript ("OnEnter", function (self) - --gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) + baseframe.cabecalho.segmento:SetScript ("OnEnter", function (self) + --gump:Fade (baseframe.button_stretch, "alpha", 0.3) OnEnterMainWindow (instancia, self, 3) - _detalhes.popup.buttonOver = true - BaseFrame.cabecalho.button_mouse_over = true + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (false) + end + + _G.GameCooltip.buttonOver = true + baseframe.cabecalho.button_mouse_over = true local passou = 0 - if (_detalhes.popup.active) then + if (_G.GameCooltip.active) then passou = 0.15 end @@ -3425,14 +4388,18 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) --> Cooltip raw method - BaseFrame.cabecalho.segmento:SetScript ("OnLeave", function (self) - --gump:Fade (BaseFrame.button_stretch, -1) + baseframe.cabecalho.segmento:SetScript ("OnLeave", function (self) + --gump:Fade (baseframe.button_stretch, -1) OnLeaveMainWindow (instancia, self, 3) - _detalhes.popup.buttonOver = false - BaseFrame.cabecalho.button_mouse_over = false + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (true) + end - if (_detalhes.popup.active) then + _G.GameCooltip.buttonOver = false + baseframe.cabecalho.button_mouse_over = false + + if (_G.GameCooltip.active) then parameters_table [2] = 0 self:SetScript ("OnUpdate", on_leave_menu) else @@ -3441,9 +4408,9 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) --> SELECIONAR O ATRIBUTO ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.atributo = gump:NewDetailsButton (BaseFrame, _, instancia, instancia.TrocaTabela, instancia, -3, 16, 16, "Interface\\AddOns\\Details\\images\\sword") - BaseFrame.cabecalho.atributo:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.atributo:SetPoint ("left", BaseFrame.cabecalho.segmento.widget, "right", 0, 0) + baseframe.cabecalho.atributo = gump:NewDetailsButton (baseframe, _, instancia, instancia.TrocaTabela, instancia, -3, 16, 16, [[Interface\AddOns\Details\images\sword]]) + baseframe.cabecalho.atributo:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) + baseframe.cabecalho.atributo:SetPoint ("left", baseframe.cabecalho.segmento.widget, "right", 0, 0) --> Cooltip automatic method through Injection @@ -3460,57 +4427,74 @@ function gump:CriaCabecalho (BaseFrame, instancia) --> Now we create a table with some parameters --> your frame need to have a member called CoolTip - BaseFrame.cabecalho.atributo.CoolTip = { + baseframe.cabecalho.atributo.CoolTip = { Type = "menu", --> the type, menu tooltip tooltipbars BuildFunc = BuildAttributeMenu, --> called when user mouse over the frame - OnEnterFunc = function() BaseFrame.cabecalho.button_mouse_over = true; OnEnterMainWindow (instancia, BaseFrame.cabecalho.atributo, 3) end, - OnLeaveFunc = function() BaseFrame.cabecalho.button_mouse_over = false; OnLeaveMainWindow (instancia, BaseFrame.cabecalho.atributo, 3) end, + OnEnterFunc = function (self) + baseframe.cabecalho.button_mouse_over = true; + OnEnterMainWindow (instancia, baseframe.cabecalho.atributo, 3) + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (false) + end + end, + OnLeaveFunc = function (self) + baseframe.cabecalho.button_mouse_over = false; + OnLeaveMainWindow (instancia, baseframe.cabecalho.atributo, 3) + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (true) + end + end, FixedValue = instancia, ShowSpeed = 0.15, Options = function() if (instancia.consolidate) then return {Anchor = instancia.consolidateFrame, MyAnchor = "topleft", RelativeAnchor = "topright", TextSize = _detalhes.font_sizes.menus} else - return {TextSize = _detalhes.font_sizes.menus} + if (instancia.toolbar_side == 1) then --top + return {TextSize = _detalhes.font_sizes.menus} + elseif (instancia.toolbar_side == 2) then --bottom + return {TextSize = _detalhes.font_sizes.menus, HeightAnchorMod = -7} + end end end} --> install cooltip - _detalhes.popup:CoolTipInject (BaseFrame.cabecalho.atributo) + _G.GameCooltip:CoolTipInject (baseframe.cabecalho.atributo) --> REPORTAR ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.report = gump:NewDetailsButton (BaseFrame, _, instancia, _detalhes.Reportar, instancia, nil, 16, 16, [[Interface\COMMON\VOICECHAT-ON]]) - BaseFrame.cabecalho.report:SetPoint ("left", BaseFrame.cabecalho.atributo, "right", -6, 0) - BaseFrame.cabecalho.report:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.report:SetScript ("OnEnter", function (self) + baseframe.cabecalho.report = gump:NewDetailsButton (baseframe, _, instancia, _detalhes.Reportar, instancia, nil, 16, 16, [[Interface\COMMON\VOICECHAT-ON]]) + baseframe.cabecalho.report:SetPoint ("left", baseframe.cabecalho.atributo, "right", -6, 0) + baseframe.cabecalho.report:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) + baseframe.cabecalho.report:SetScript ("OnEnter", function (self) OnEnterMainWindow (instancia, self, 3) + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (false) + end end) - BaseFrame.cabecalho.report:SetScript ("OnLeave", function (self) + baseframe.cabecalho.report:SetScript ("OnLeave", function (self) OnLeaveMainWindow (instancia, self, 3) + if (instancia.desaturated_menu) then + self:GetNormalTexture():SetDesaturated (true) + end end) - - --> BOSS INFO ---------------------------------------------------------------------------------------------------------------------------------------------------- - --BaseFrame.cabecalho.boss_info = gump:NewDetailsButton (BaseFrame, BaseFrame, instancia, _detalhes.AbrirEncounterWindow, instancia, nil, 16, 16, - --"Interface\\COMMON\\help-i", "Interface\\COMMON\\help-i", "Interface\\COMMON\\help-i", "Interface\\COMMON\\help-i") - --BaseFrame.cabecalho.boss_info:SetPoint ("left", BaseFrame.cabecalho.report, "right", 1, 0) - --BaseFrame.cabecalho.boss_info:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - --> NOVA INSTANCIA ---------------------------------------------------------------------------------------------------------------------------------------------------- - BaseFrame.cabecalho.novo = _CreateFrame ("Button", nil, BaseFrame, "OptionsButtonTemplate") - BaseFrame.cabecalho.novo:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) + baseframe.cabecalho.novo = CreateFrame ("button", "DetailsInstanceButton"..instancia.meu_id, baseframe, "OptionsButtonTemplate") + baseframe.cabecalho.novo:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) - BaseFrame.cabecalho.novo:SetWidth (30) - BaseFrame.cabecalho.novo:SetHeight (15) - BaseFrame.cabecalho.novo:SetPoint ("RIGHT", BaseFrame.cabecalho.fechar, "LEFT", 1, 0) - BaseFrame.cabecalho.novo:SetScript ("OnClick", function() _detalhes:CriarInstancia (_, true); _detalhes.popup:ShowMe (false) end) - BaseFrame.cabecalho.novo:SetText ("#"..instancia.meu_id) + baseframe.cabecalho.novo:SetWidth (30) + baseframe.cabecalho.novo:SetHeight (15) + + baseframe.cabecalho.novo:SetPoint ("bottomright", baseframe, "topright", instancia.instance_button_anchor [1], instancia.instance_button_anchor [2]) + + baseframe.cabecalho.novo:SetScript ("OnClick", function() _detalhes:CriarInstancia (_, true); _G.GameCooltip:ShowMe (false) end) + baseframe.cabecalho.novo:SetText ("#"..instancia.meu_id) --> cooltip through inject --> OnClick Function [1] caller [2] fixed param [3] param1 [4] param2 local OnClickNovoMenu = function (_, _, id) _detalhes.CriarInstancia (_, _, id) - _detalhes.popup:ExecFunc (BaseFrame.cabecalho.novo) + _G.GameCooltip:ExecFunc (baseframe.cabecalho.novo) end --> Build Menu Function @@ -3544,15 +4528,23 @@ function gump:CriaCabecalho (BaseFrame, instancia) atributo = _detalhes.SoloTables.Mode or 1 local SoloInfo = _detalhes.SoloTables.Menu [atributo] - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. SoloInfo [1], _, true) - CoolTip:AddIcon (SoloInfo [2], 1, 1, 20, 20, 0, 1, 0, 1) + if (SoloInfo) then + CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. SoloInfo [1], _, true) + CoolTip:AddIcon (SoloInfo [2], 1, 1, 20, 20, 0, 1, 0, 1) + else + CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " Unknown Plugin", _, true) + end elseif (modo == 4) then --raid atributo = _detalhes.RaidTables.Mode or 1 local RaidInfo = _detalhes.RaidTables.Menu [atributo] - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. RaidInfo [1], _, true) - CoolTip:AddIcon (RaidInfo [2], 1, 1, 20, 20, 0, 1, 0, 1) + if (RaidInfo) then + CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. RaidInfo [1], _, true) + CoolTip:AddIcon (RaidInfo [2], 1, 1, 20, 20, 0, 1, 0, 1) + else + CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " Unknown Plugin", _, true) + end else @@ -3568,7 +4560,7 @@ function gump:CriaCabecalho (BaseFrame, instancia) end --> Inject Options Table - BaseFrame.cabecalho.novo.CoolTip = { + baseframe.cabecalho.novo.CoolTip = { --> cooltip type "menu" "tooltip" "tooltipbars" Type = "menu", --> how much time wait with mouse over the frame until cooltip show up @@ -3576,17 +4568,24 @@ function gump:CriaCabecalho (BaseFrame, instancia) --> will call for build menu BuildFunc = BuildClosedInstanceMenu, --> a hook for OnEnterScript - OnEnterFunc = function() OnEnterMainWindow (instancia, BaseFrame.cabecalho.novo, 3) end, + OnEnterFunc = function() OnEnterMainWindow (instancia, baseframe.cabecalho.novo, 3) end, --> a hook for OnLeaveScript - OnLeaveFunc = function() OnLeaveMainWindow (instancia, BaseFrame.cabecalho.novo, 3) end, + OnLeaveFunc = function() OnLeaveMainWindow (instancia, baseframe.cabecalho.novo, 3) end, --> default message if there is no option avaliable Default = Loc ["STRING_NOCLOSED_INSTANCES"], --> instancia is the first parameter sent after click, before parameters FixedValue = instancia, - Options = {TextSize = 10, NoLastSelectedBar = true}} + Options = function() + if (instancia.toolbar_side == 1) then --top + return {TextSize = 10, NoLastSelectedBar = true} + elseif (instancia.toolbar_side == 2) then --bottom + return {HeightAnchorMod = -7, TextSize = 10, NoLastSelectedBar = true} + end + end + } --> Inject - _detalhes.popup:CoolTipInject (BaseFrame.cabecalho.novo) + _G.GameCooltip:CoolTipInject (baseframe.cabecalho.novo) --> RESETAR HISTORICO ---------------------------------------------------------------------------------------------------------------------------------------------------- if (not _detalhes.ResetButton) then @@ -3609,8 +4608,8 @@ function gump:CriaCabecalho (BaseFrame, instancia) _detalhes.ResetButton:SetParent (instancia.baseframe) _detalhes.ResetButton2:SetParent (instancia.baseframe) - _detalhes.ResetButton:SetPoint ("RIGHT", instancia.baseframe.cabecalho.novo, "LEFT") - _detalhes.ResetButton2:SetPoint ("RIGHT", instancia.baseframe.cabecalho.novo, "LEFT", 3, 0) + _detalhes.ResetButton:SetPoint ("right", instancia.baseframe.cabecalho.novo, "left") + _detalhes.ResetButton2:SetPoint ("right", instancia.baseframe.cabecalho.novo, "left", 3, 0) _detalhes.ResetButton:SetFrameLevel (instancia.baseframe.UPFrame:GetFrameLevel()+1) _detalhes.ResetButton2:SetFrameLevel (instancia.baseframe.UPFrame:GetFrameLevel()+1) @@ -3625,11 +4624,11 @@ function gump:CriaCabecalho (BaseFrame, instancia) end -----------------> big button - _detalhes.ResetButton = _CreateFrame ("Button", nil, BaseFrame, "OptionsButtonTemplate") - _detalhes.ResetButton:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) + _detalhes.ResetButton = CreateFrame ("button", "DetailsResetButton1", baseframe, "UIPanelButtonTemplate") + _detalhes.ResetButton:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) _detalhes.ResetButton:SetWidth (50) - _detalhes.ResetButton:SetHeight (15) - _detalhes.ResetButton:SetPoint ("RIGHT", BaseFrame.cabecalho.novo, "LEFT") + _detalhes.ResetButton:SetHeight (12) + _detalhes.ResetButton:SetPoint ("right", baseframe.cabecalho.novo, "left") _detalhes.ResetButton:SetText (Loc ["STRING_ERASE"]) @@ -3649,13 +4648,13 @@ function gump:CriaCabecalho (BaseFrame, instancia) OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), self, 3) end - if (_detalhes.popup.active) then + if (_G.GameCooltip.active) then local passou = 0 self:SetScript ("OnUpdate", function (self, elapsed) passou = passou+elapsed if (passou > 0.3) then - if (not _detalhes.popup.mouse_over and not _detalhes.popup.button_over) then - _detalhes.popup:ShowMe (false) + if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then + _G.GameCooltip:ShowMe (false) end self:SetScript ("OnUpdate", nil) end @@ -3666,13 +4665,13 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) ----------------> small button - _detalhes.ResetButton2 = _CreateFrame ("Button", nil, BaseFrame, "OptionsButtonTemplate") - _detalhes.ResetButton2:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) + _detalhes.ResetButton2 = CreateFrame ("button", "DetailsResetButton2", baseframe, "OptionsButtonTemplate") + _detalhes.ResetButton2:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) _detalhes.ResetButton2:SetWidth (22) _detalhes.ResetButton2:SetHeight (15) - _detalhes.ResetButton2:SetPoint ("RIGHT", BaseFrame.cabecalho.novo, "LEFT", 2, 0) + _detalhes.ResetButton2:SetPoint ("right", baseframe.cabecalho.novo, "left", 2, 0) - local text = _detalhes.ResetButton2:CreateFontString (nil, "overlay", "GameFont_Gigantic") + local text = _detalhes.ResetButton2:CreateFontString ("DetailsResetButton2Text2", "overlay", "GameFont_Gigantic") text:SetText ("-") _detalhes.ResetButton2:SetFontString (text) _detalhes.ResetButton2:SetNormalFontObject ("GameFont_Gigantic") @@ -3693,13 +4692,13 @@ function gump:CriaCabecalho (BaseFrame, instancia) OnLeaveMainWindow (_detalhes:GetInstance (lower_instance), self, 3) end - if (_detalhes.popup.active) then + if (_G.GameCooltip.active) then local passou = 0 self:SetScript ("OnUpdate", function (self, elapsed) passou = passou+elapsed if (passou > 0.3) then - if (not _detalhes.popup.mouse_over and not _detalhes.popup.button_over) then - _detalhes.popup:ShowMe (false) + if (not _G.GameCooltip.mouse_over and not _G.GameCooltip.button_over) then + _G.GameCooltip:ShowMe (false) end self:SetScript ("OnUpdate", nil) end @@ -3715,12 +4714,10 @@ function gump:CriaCabecalho (BaseFrame, instancia) --> Botão de Ajuda ---------------------------------------------------------------------------------------------------------------------------------------------------- - if (instancia.meu_id == 1 and _detalhes.tutorial.main_help_button < 10) then - - _detalhes.tutorial.main_help_button = _detalhes.tutorial.main_help_button + 1 + if (instancia.meu_id == 1 and _detalhes.tutorial.logons < 3) then --> help button - local helpButton = CreateFrame ("button", "DetailsMainWindowHelpButton", BaseFrame, "MainHelpPlateButton") + local helpButton = CreateFrame ("button", "DetailsMainWindowHelpButton", baseframe, "MainHelpPlateButton") helpButton:SetWidth (28) helpButton:SetHeight (28) helpButton.I:SetWidth (22) @@ -3729,7 +4726,7 @@ function gump:CriaCabecalho (BaseFrame, instancia) helpButton.Ring:SetHeight (28) helpButton.Ring:SetPoint ("center", 5, -6) - helpButton:SetPoint ("topright", BaseFrame, "topleft", 37, 37) + helpButton:SetPoint ("topright", baseframe, "topleft", 37, 37) helpButton:SetFrameLevel (0) helpButton:SetFrameStrata ("LOW") @@ -3741,43 +4738,43 @@ function gump:CriaCabecalho (BaseFrame, instancia) --> modo, segmento e atributo [1] ={HighLightBox = {x = 25, y = 10, width = 60, height = 20}, ButtonPos = { x = 32, y = 40}, - ToolTipDir = "RIGHT", + ToolTipDir = "right", ToolTipText = Loc ["STRING_HELP_MENUS"] }, --> delete [2] ={HighLightBox = {x = 195, y = 10, width = 47, height = 20}, ButtonPos = { x = 197, y = 5}, - ToolTipDir = "LEFT", + ToolTipDir = "left", ToolTipText = Loc ["STRING_HELP_ERASE"] }, --> menu da instancia [3] ={HighLightBox = {x = 244, y = 10, width = 30, height = 20}, ButtonPos = { x = 237, y = 5}, - ToolTipDir = "RIGHT", + ToolTipDir = "right", ToolTipText = Loc ["STRING_HELP_INSTANCE"] }, --> stretch [4] ={HighLightBox = {x = 244, y = 30, width = 30, height = 20}, ButtonPos = { x = 237, y = 57}, - ToolTipDir = "RIGHT", + ToolTipDir = "right", ToolTipText = Loc ["STRING_HELP_STRETCH"] }, --> status bar [5] ={HighLightBox = {x = 0, y = -101, width = 300, height = 20}, ButtonPos = { x = 126, y = -88}, - ToolTipDir = "LEFT", + ToolTipDir = "left", ToolTipText = Loc ["STRING_HELP_STATUSBAR"] }, --> switch menu [6] ={HighLightBox = {x = 0, y = -10, width = 300, height = 95}, ButtonPos = { x = 127, y = -37}, - ToolTipDir = "LEFT", + ToolTipDir = "left", ToolTipText = Loc ["STRING_HELP_SWITCH"] }, --> resizer [7] ={HighLightBox = {x = 250, y = -81, width = 50, height = 20}, ButtonPos = { x = 253, y = -52}, - ToolTipDir = "RIGHT", + ToolTipDir = "right", ToolTipText = Loc ["STRING_HELP_RESIZE"] }, } @@ -3787,7 +4784,7 @@ function gump:CriaCabecalho (BaseFrame, instancia) instancia:SetSize (300, 95) - HelpPlate_Show (mainWindowHelp, BaseFrame, helpButton, true) + HelpPlate_Show (mainWindowHelp, baseframe, helpButton, true) else HelpPlate_Hide (true) end @@ -3800,8 +4797,8 @@ function gump:CriaCabecalho (BaseFrame, instancia) local consolidateFrame = CreateFrame ("frame", nil, _detalhes.listener) consolidateFrame:SetWidth (21) consolidateFrame:SetHeight (83) - consolidateFrame:SetFrameLevel (BaseFrame:GetFrameLevel()-1) - consolidateFrame:SetPoint ("BOTTOMLEFT", BaseFrame.cabecalho.ball, "BOTTOMRIGHT", 0, 20) + consolidateFrame:SetFrameLevel (baseframe:GetFrameLevel()-1) + --consolidateFrame:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", 0, 20) consolidateFrame:SetFrameStrata ("FULLSCREEN") consolidateFrame:Hide() instancia.consolidateFrame = consolidateFrame @@ -3809,7 +4806,7 @@ function gump:CriaCabecalho (BaseFrame, instancia) ---------> consolidate texture local frameTexture = consolidateFrame:CreateTexture (nil, "background") - frameTexture:SetTexture ("Interface\\AddOns\\Details\\images\\consolidate_frame") + frameTexture:SetTexture ([[Interface\AddOns\Details\images\consolidate_frame]]) frameTexture:SetPoint ("top", consolidateFrame, "top", .5, 0) frameTexture:SetWidth (32) frameTexture:SetHeight (83) @@ -3817,18 +4814,16 @@ function gump:CriaCabecalho (BaseFrame, instancia) ---------> consolidate button - local consolidateButton = CreateFrame ("button", nil, BaseFrame) + local consolidateButton = CreateFrame ("button", nil, baseframe) consolidateButton:SetWidth (16) consolidateButton:SetHeight (16) - consolidateButton:SetFrameLevel (BaseFrame.UPFrame:GetFrameLevel()+1) - consolidateButton:SetPoint ("BOTTOMLEFT", BaseFrame.cabecalho.ball, "BOTTOMRIGHT", 6, 2) + consolidateButton:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) + consolidateButton:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", 6, 2) + consolidateFrame:SetPoint ("bottom", consolidateButton, "top", 3, 0) local normal_texture = consolidateButton:CreateTexture (nil, "overlay") - --normal_texture:SetTexture ("Interface\\AddOns\\Details\\images\\consolidate_frame") - normal_texture:SetTexture ("Interface\\GossipFrame\\HealerGossipIcon") + normal_texture:SetTexture ([[Interface\GossipFrame\HealerGossipIcon]]) normal_texture:SetVertexColor (.9, .8, 0) - --normal_texture:SetTexCoord (0, .5, 0.875, 1) - --normal_texture:SetTexCoord (0, 0.375, 0.75, 0.875) normal_texture:SetWidth (16) normal_texture:SetHeight (16) normal_texture:SetPoint ("center", consolidateButton, "center") @@ -3850,9 +4845,8 @@ function gump:CriaCabecalho (BaseFrame, instancia) self:SetScript ("OnUpdate", function (self, elapsed) passou = passou+elapsed if (passou > 0.5) then - if (not _detalhes.popup.active and not BaseFrame.cabecalho.button_mouse_over) then + if (not _G.GameCooltip.active and not baseframe.cabecalho.button_mouse_over) then consolidateFrame:Hide() - --normal_texture:SetTexCoord (0, .5, 0.875, 1) normal_texture:SetBlendMode ("BLEND") self:SetScript ("OnUpdate", nil) end @@ -3862,14 +4856,14 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) consolidateButton:SetScript ("OnEnter", function (self) - gump:Fade (BaseFrame.button_stretch, "alpha", 0.3) + gump:Fade (baseframe.button_stretch, "alpha", 0.3) local passou = 0 consolidateFrame:SetScript ("OnUpdate", nil) - --normal_texture:SetTexCoord (.5, 1, 0.875, 1) normal_texture:SetBlendMode ("ADD") self:SetScript ("OnUpdate", function (self, elapsed) passou = passou+elapsed if (passou > 0.3) then + consolidateFrame:SetPoint ("bottom", self, "top", 3, 0) consolidateFrame:Show() self:SetScript ("OnUpdate", nil) end @@ -3877,15 +4871,14 @@ function gump:CriaCabecalho (BaseFrame, instancia) end) consolidateButton:SetScript ("OnLeave", function (self) - gump:Fade (BaseFrame.button_stretch, -1) + gump:Fade (baseframe.button_stretch, -1) local passou = 0 self:SetScript ("OnUpdate", function (self, elapsed) passou = passou+elapsed if (passou > 0.3) then - if (not consolidateFrame.mouse_over and not BaseFrame.cabecalho.button_mouse_over and not _detalhes.popup.active) then + if (not consolidateFrame.mouse_over and not baseframe.cabecalho.button_mouse_over and not _G.GameCooltip.active) then consolidateFrame:Hide() normal_texture:SetBlendMode ("BLEND") - --normal_texture:SetTexCoord (0, .5, 0.875, 1) end self:SetScript ("OnUpdate", nil) end diff --git a/images/icons.tga b/images/icons.tga index 0634c4e33ff6058fecc0898677acda067e04a770..e654f7cfaf1af3de581ab67941f5473bb3bf9857 100644 GIT binary patch delta 9103 zcma)hc|cQF+V>4NxuIBWi?y{nS{W*p`pUqET6h^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DGNWT^ku2uRXz?=aIJ7HvCW1^sNl^^9n_87Mf`>IW@J@;gb6$DE=PQ zJO;7EjuBfk0q4QJpuGR`9jwB6a4+yR`#V^WV@W_-x&`Oa)zL-z`}^q+v(dp7j`&>k z>M0t&9y#!I)!e+PC#I~NomG0h55|{CffvA8*W3!8_YHvdr+e- znQ-XPA+QmTA3h-}si`a}tE)b6a&lrjAO z3*;Guq|AZo@gqvNAKT*cp42*a6aN`2m56e4K;mdXJ=$)W`-_& z9TlV>EJS~-@TnD}slWNy8}#hl9A`;Y)xN=*$!N&a4DktK3UaU_a3T(z2zPE}WOL!9 z9Jp_=NO0HmjE#+v;o)JNuXcqhv;@tzVxI-rJMYi2vF*7zxrRf`$zVuP3Gos#j6jzb z;JA#lt&psY5jYzM&K8rJ#DZj)oSYoe-QA57@zbxAqRT66ndNBCeweSV&tJXLIC=iO zlQC;9dw@0fD5J9SE5t0sa%6s86Nt#jF9MwKvH){63ej@lkO^}B!g+STO{BY*qFd<+ z6=?2?>48c##|W+(&hd!}iORY<>$oJ^)j`&LJ2XFtn}$}GB5>1O(CQLy8DavWKRh=6 zA!NvS^y)1kJ2xBO6zQE+sKttDmumF-Y4*;`UQZEt)oq4{XFeFrgEcjEl)&)F7DzMj z^y9~A$gqf0LEr?F5MLo)JbL}U@_zTrAO}YW-Orytvn}C<*xL*}zXs)@yVRg6E1bhM zXthx^{)2xx*%^Y-Q-1a8O^AboOJjF`{~MU0;l{3~zaYLtj`vUAe7O7cZ7_mq({`F(ku3v^=PeZ{6Equ_-h9K9dT}M&fxRl zpu?X%Jw6a;;K7qEFO@EHbEOG>pr_tMGZp@o7mFKW|7Que!;U=x7m2t3e^12;boGXR YJjA9OP(H$noUOOe6D#weTPXQ|09_Gv=>Px# diff --git a/images/skins/default_skin.tga b/images/skins/default_skin.tga index 4bf512e4d5f4c28d5f8579ade0bdad4a03009d82..b3f8bb343f7e4bb9b6094a1313e632a49152eff8 100644 GIT binary patch delta 12476 zcmeHMd3aP+mV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VsumUPDi^T=Dut;Vgnds9A%x^EQ3L2PiR*5^yR(3@2AfuVt&8@o}8Q4{Yhk#oTI4XFKVeP!O zb&5Ds@YH^E@GSS+1Ji_Kg4e<=XB-ncpDAoKjQ2 up9MQub=oTr_kRtrr0Lfe1?P)d8tMknuLbt^rx1O2for#$YA+355B?91LnSc) diff --git a/images/skins/simplygray_skin.tga b/images/skins/simplygray_skin.tga index d291b44ca2a7aaa6f7a27812eff3da7247d629e9..30c15afc4a8273dd4ab8d8bd7eaba140e41be641 100644 GIT binary patch delta 21032 zcmeHvcU%{XK}Pu7t?4gXxz9l2$`nLPEgx0XDe}>KDdUTo#l+)=)14XQ{QXL4SqBm+T;Yh(Gms(_()^4<)rIE-nUALh4Oe{VPsy zkH`ODY~MdKwQtXL@-xoL{8KI;f0-Bru27NTcEg*uVv|xT6RqcZ_wEf_$!hUxJ5?;A zTe00ix)s^az+aOBPRntssdTvjPfGEs0Ixo{Y`Tuk-{|qCG%f0YooD@Dve9w*0A=Q& zAZ3m1q%_+9U)wHPB7!Mmy9HVOy)nQ6({eV1yaS!yzFPi{GDEwS|F-t6zGSuo`N!Kb zv<8Oa)!#SgJLD=JbqW4@G@Nw_nR;~cBf;J(AY&I zasPx`i2sMMAuVJ6DVZpeaEqoP(dzQN4~QMqh2w?}9m?ec26L0chYxdfv1iX7vGn=# z=i>d9D_6Kyty*zYsFG2iWy_Z7`k0+LbA}4U5?x>I9 zYhc6?BT;~OB`UUZkCk8UiN5npQWex3t7*C^G}<%fx?cp_W|dT@LeaM-BV@Lw+dYFZ%}p{hN4d z6+QHp{!eFtIPtgA#D61A)z;*xVsuj(2OB9QQCQJOFeXJXLv*7OF#wrSD>|geNIfYM zN}QzNRz!`&oOlZ5znrO`pPv}{D3sDc9f++|E{dQEYZB3;M-MT&(Jw_fijId7t&$8?abB!G_h_0`2( z{>D*v?R!R{W)MWJ+$5VM_$0AXIf+Q z(8x|n31X^Sq^JcA0sWFVf?D(@1r4X9EVV%SlR3)$IV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4 zB4@H5Ph+DZk8^yIybWt5$&5NDpeNxC*bfGQ02(LadD2=Q@32f@G&XuInuj}=B3x%* zk>hcGaUf@;Au+gzGq5(|E8thsN{Q)xQaM(UC!5Q5vtc}4nO$?H$3+2edO&GV4w>16 gP-Ljk-mA>Z< color and details name Loc ["STRING_YES"] = "Yes" Loc ["STRING_NO"] = "No" + Loc ["STRING_TOP"] = "top" + Loc ["STRING_BOTTOM"] = "bottom" + Loc ["STRING_AUTO"] = "auto" + Loc ["STRING_LEFT"] = "left" + Loc ["STRING_CENTER"] = "center" + Loc ["STRING_RIGHT"] = "right" + Loc ["STRING_MINIMAP_TOOLTIP1"] = "|cFFCFCFCFleft click|r: open options panel" Loc ["STRING_MINIMAP_TOOLTIP2"] = "|cFFCFCFCFright click|r: quick menu" @@ -21,19 +30,18 @@ if not Loc then return end Loc ["STRING_MINIMAPMENU_UNLOCK"] = "Unlock" Loc ["STRING_MINIMAPMENU_LOCK"] = "Lock" + Loc ["STRING_RESETBUTTON_WRONG_INSTANCE"] = "Warning, reset button isn't in the current editing instance." + Loc ["STRING_INTERFACE_OPENOPTIONS"] = "Open Options Panel" Loc ["STRING_RIGHTCLICK_TYPEVALUE"] = "right click to type the value" - Loc ["STRING_AUTO"] = "auto" - Loc ["STRING_LEFT"] = "left" - Loc ["STRING_CENTER"] = "center" - Loc ["STRING_RIGHT"] = "right" Loc ["STRING_TOOOLD"] = "could not be installed because your Details! version is too old." Loc ["STRING_TOOOLD2"] = "your Details! version isn't the same." Loc ["STRING_CHANGED_TO_CURRENT"] = "Segment changed to current" Loc ["STRING_SEGMENT_TRASH"] = "Next Boss Cleanup" Loc ["STRING_VERSION_UPDATE"] = "new version: what's changed? click here" Loc ["STRING_NEWS_TITLE"] = "What's New In This Version" + Loc ["STRING_NEWS_REINSTALL"] = "Found problems after a update? try '/details reinstall' command." Loc ["STRING_TIME_OF_DEATH"] = "Death" Loc ["STRING_SHORTCUT_RIGHTCLICK"] = "Shortcut Menu (right click to close)" @@ -408,6 +416,8 @@ if not Loc then return end 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_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 mensure Dps and Hps.\n\n|cFFFFFFFFEffective|r: used on rankings, this method uses the elapsed combat time for mensure the Dps and Hps of all raid members." @@ -454,14 +464,13 @@ if not Loc then return end Loc ["STRING_OPTIONS_CLOUD"] = "Cloud Capture" Loc ["STRING_OPTIONS_CLOUD_DESC"] = "When enabled, the data of disabled collectors are collected within others raid members." - - Loc ["STRING_OPTIONS_BARS"] = "Bar Settings" + Loc ["STRING_OPTIONS_BARS"] = "Bar General Settings" Loc ["STRING_OPTIONS_BARS_DESC"] = "This options control the appearance of the instance bars." Loc ["STRING_OPTIONS_BAR_TEXTURE"] = "Texture" Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] = "Choose the texture of bars." - Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Background Texture" + Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Texture (bg)" Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] = "Choose the background texture of bars." Loc ["STRING_OPTIONS_BAR_BCOLOR"] = "Background Color" @@ -471,12 +480,12 @@ if not Loc then return end Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] = "Change the height of bars." 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\nDisabled: bars have a fixed color." + 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"] = "Background Color By Class" - Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "When enabled, the instance bars background have the color of the character class.\n\nDisabled: bars have a fixed color." + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Color By Class (bg)" + 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_TEXT"] = "Text Settings" + Loc ["STRING_OPTIONS_TEXT"] = "Bar Text Settings" Loc ["STRING_OPTIONS_TEXT_DESC"] = "This options control the appearance of the instance bar texts." Loc ["STRING_OPTIONS_TEXT_SIZE"] = "Size" @@ -500,17 +509,94 @@ 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" - Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color of instance window." + Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Color and Transparency" + Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color and alpha of instance window." - Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Alpha" - Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the color and transparency of instance window background." + Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Background Alpha" + Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the transparency of the instance window background." + Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"] = "Background Color" + Loc ["STRING_OPTIONS_INSTANCE_ALPHA2_DESC"] = "This option let you change the color of the instance window background." Loc ["STRING_OPTIONS_INSTANCE_CURRENT"] = "Auto Switch To Current" Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] = "Whenever a combat start and there is no other instance on current segment, this instance auto switch to current segment." + Loc ["STRING_OPTIONS_SHOW_SIDEBARS"] = "Show Borders" + Loc ["STRING_OPTIONS_SHOW_SIDEBARS_DESC"] = "Show or hide window borders." + + Loc ["STRING_OPTIONS_SHOW_STATUSBAR"] = "Show Statusbar" + Loc ["STRING_OPTIONS_SHOW_STATUSBAR_DESC"] = "Show or hide the bottom statusbar." + Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Skin" - Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify all window textures based on a skin theme." + Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify window appearance based on a skin theme." + +Loc ["STRING_OPTIONS_SKIN_A"] = "Skin Settings" +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_DESATURATE_MENU"] = "Desaturate Menu" +Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"] = "Enabling this option, all menu icons on toolbar became black and white." + +Loc ["STRING_OPTIONS_HIDE_ICON"] = "Hide Icon" +Loc ["STRING_OPTIONS_HIDE_ICON_DESC"] = "When enabled, the icon on the top left corner isn't draw.\n\nSome skins may prefer remove this icon." + +Loc ["STRING_OPTIONS_MENU_X"] = "Menu Pos X" +Loc ["STRING_OPTIONS_MENU_X_DESC"] = "Slightly move the main menu on tooltip to the left or right direction." + +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_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_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_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_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_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_DESC"] = "Change the instance button text color." + +Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"] = "Instance 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_DESC"] = "Change the instance button text size." + +Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"] = "Instance 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_DESC"] = "Change the close button overlay color." + +Loc ["STRING_OPTIONS_STRETCH"] = "Stretch Button Anchor" +Loc ["STRING_OPTIONS_STRETCH_DESC"] = "Alternate the stretch button position.\n\nTop: the grab is placed on the top right corner.\n\nBottom: the grab is placed on the bottom center." + +Loc ["STRING_OPTIONS_PICONS_DIRECTION"] = "Plugin Icons Direction" +Loc ["STRING_OPTIONS_PICONS_DIRECTION_DESC"] = "Change the direction which plugins icons are displayed on the toolbar." + +Loc ["STRING_OPTIONS_INSBUTTON_X"] = "Instance Button X" +Loc ["STRING_OPTIONS_INSBUTTON_X_DESC"] = "Change the instance button position." + +Loc ["STRING_OPTIONS_INSBUTTON_Y"] = "Instance Button Y" +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_DESC"] = "Change the bars grow method.." + +Loc ["STRING_OPTIONS_BARSORT_DIRECTION"] = "Bar Sort Direction" +Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Change the order which characters are shown within the bars." Loc ["STRING_OPTIONS_WP"] = "Wallpaper Settings" Loc ["STRING_OPTIONS_WP_DESC"] = "This options control the wallpaper of instance." diff --git a/locales/Details-ptBR.lua b/locales/Details-ptBR.lua index 9db58395..1d3a7bc0 100644 --- a/locales/Details-ptBR.lua +++ b/locales/Details-ptBR.lua @@ -2,13 +2,21 @@ local Loc = LibStub("AceLocale-3.0"):NewLocale("Details", "ptBR") if not Loc then return end -------------------------------------------------------------------------------------------------------------------------------------------- - Loc ["STRING_VERSION_LOG"] = "|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.\n\n|cFFFFFF00v1.8.0|r\n\n- Adicionado novo plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r Novo painel de opcoes!\n\n|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Corrigido:\n- problema com o tempo de debuffs.\n- dps dos dados gerais e o dps no micro display .\n- varios bugs envolvendo o menu da espada e do livro.\n- o coletor de lixo nao ira mais apagar jogadores com vinculo a membros do grupo.\n\n|cFFFFFF00-|r dados gerais agora sempre ira usar o tempo do combate para medir dps e hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n" + + Loc ["STRING_VERSION_LOG"] = "|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.\n\n|cFFFFFF00v1.8.0|r\n\n- Adicionado novo plugin: You Are Not Prepared.\n\n|cFFFFFF00-|r Novo painel de opcoes!\n\n|cFFFFFF00v1.7.0|r\n\n- Corrigido alguns problemas com as cores das barras de inimigos.\n\n|cFFFFFF00-|r CC Quebrado foi inteiramente reescrito e agora deve funcionar corretamente.\n\n|cFFFFFF00-|r Adicionado novo sub atributo ao dano: Voidzones & Debuffs.|cFFFFFF00v1.6.7|r\n\n- Adicionado suporte a skins, troque ela atraves do painel de opcoes.\n\n|cFFFFFF00v1.6.5|r\n\n|cFFFFFF00-|r Adicionado o sub atributo 'Inimigos' que mostra, eh claro, somente inimigos.\n\n|cFFFFFF00-|r Corrigido um problema na captura das magias conjuradas.|cFFFFFF00v1.6.3|r\n\n|cFFFFFF00-|r captura de dados agora roda 4% mais rapido.\n\n|cFFFFFF00-|r Corrigido problema onde os ajudantes nao atualizavam o tempo de atividade do dono.\n\n|cFFFFFF00-|r Corrigido problema onde o healing era contado mesmo fora do combate.\n\n|cFFFFFF00-|r Corrigido problema com chefes multiplos como Twin Consorts.\n\n|cFFFFFF00-|r Adicionada opcao para juntar os segmentos de trash mobs.\n\n|cFFFFFF00-|r Adicionada opcao para auto remover os segmentos de trash mobs. \n\n|cFFFFFF00-|r Adicionada opcao para alterar a altura das barras.\n\n|cFFFFFF00-|r Plugin Encounter Details agora mostra quantos cast bem sucedidos as magias interrompidas tiveram.\n\n|cFFFFFF00v1.6.1|r\n\n|cFFFFFF00-|r Corrigido:\n- problema com o tempo de debuffs.\n- dps dos dados gerais e o dps no micro display .\n- varios bugs envolvendo o menu da espada e do livro.\n- o coletor de lixo nao ira mais apagar jogadores com vinculo a membros do grupo.\n\n|cFFFFFF00-|r dados gerais agora sempre ira usar o tempo do combate para medir dps e hps.\n\n|cFFFFFF00v1.6.0|r\n\n|cFFFFFF00-|r Adicionado tempo de debuff no atributo miscelanea.\n\n|cFFFFFF00-|r Atributos desativados agora ficam escurecidos no menu da espada.\n\n|cFFFFFF00-|r Corrigido um problema aonde algumas vezes era necessario dar /reload para trocar um talento.\n\n|cFFFFFF00v1.5.3|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar durante o combate.\n\n|cFFFFFF00-|r Melhorado a reconhecimento dos donos de ajudantes.\n\n|cFFFFFF00-|r Adicionada uma opcao para mostrar apenas frags em cima de jogadores inimigos.\n\n|cFFFFFF00-|r Adicionado cor e icone aos frags.\n\n|cFFFFFF00v1.5.2|r\n\n|cFFFFFF00-|r Corrigido problema onde desativando o tempo dos buffs estava desativando tambem a cura feita.\n\n|cFFFFFF00-|r Estatisticas de Avoidance nao seram mais capturadas para pessoas foram do grupo, monstros ou ajudantes.\n\n|cFFFFFF00-|r Corrigido problema onde as vezes estava demorando muito para salvar o tempo dos buffs ao sair do jogo.\n\n|cFFFFFF00v1.5.1|r\n\n|cFFFFFF00-|r Corrigido problema ao reportar o Dps onde as vezes nao mostrava nenhum jogador.\n\n|cFFFFFF00v1.5.0|r\n\n" Loc ["STRING_DETAILS1"] = "|cffffaeaeDetalhes:|r " --> color and details name Loc ["STRING_YES"] = "Sim" Loc ["STRING_NO"] = "Nao" + Loc ["STRING_TOP"] = "topo" + Loc ["STRING_BOTTOM"] = "baixo" + Loc ["STRING_AUTO"] = "auto" + Loc ["STRING_LEFT"] = "esquerda" + Loc ["STRING_CENTER"] = "centro" + Loc ["STRING_RIGHT"] = "direita" + Loc ["STRING_MINIMAP_TOOLTIP1"] = "|cFFCFCFCFbotao esquerdo|r: abrir o painel de opcoes" Loc ["STRING_MINIMAP_TOOLTIP2"] = "|cFFCFCFCFbotao direito|r: menu rapido" @@ -19,19 +27,18 @@ if not Loc then return end Loc ["STRING_MINIMAPMENU_UNLOCK"] = "Destravar" Loc ["STRING_MINIMAPMENU_LOCK"] = "Travar" + Loc ["STRING_RESETBUTTON_WRONG_INSTANCE"] = "Aviso, o botao de reset nao esta na janela que esta sendo editada." + Loc ["STRING_INTERFACE_OPENOPTIONS"] = "Abrir Painel de Opcoes" Loc ["STRING_RIGHTCLICK_TYPEVALUE"] = "botao direito para digitar o valor" - Loc ["STRING_AUTO"] = "auto" - Loc ["STRING_LEFT"] = "esquerda" - Loc ["STRING_CENTER"] = "centro" - Loc ["STRING_RIGHT"] = "direita" Loc ["STRING_TOOOLD"] = "nao pode ser instalado pois sua versao do Details! e muito antiga." Loc ["STRING_TOOOLD2"] = "a sua versao do Details! nao e a mesma." Loc ["STRING_CHANGED_TO_CURRENT"] = "Segmento trocado para atual" Loc ["STRING_SEGMENT_TRASH"] = "Caminho do Proximo Boss" Loc ["STRING_VERSION_UPDATE"] = "nova versao: clique para ver o que mudou" Loc ["STRING_NEWS_TITLE"] = "Quais As Novidades Desta Versao" + Loc ["STRING_NEWS_REINSTALL"] = "Encontrou problemas apos atualizar? tente o comando '/details reinstall'." Loc ["STRING_TIME_OF_DEATH"] = "Morreu" Loc ["STRING_SHORTCUT_RIGHTCLICK"] = "Menu de Atalho (botao direito para fechar)" @@ -401,6 +408,8 @@ if not Loc then return end Loc ["STRING_OPTIONS_MAXINSTANCES_DESC"] = "Limita o numero de janelas que podem ser criadas.\n\nVoce pode abrir ou reabrir as janelas atraves do botao de instancia localizado a esquerda do botao de fechar." Loc ["STRING_OPTIONS_PVPFRAGS"] = "Apenas Frags de Pvp" Loc ["STRING_OPTIONS_PVPFRAGS_DESC"] = "Quando ativado, serao registrados apenas mortes de jogadores da faccao inimiga." + Loc ["STRING_OPTIONS_MINIMAP"] = "Icone no Mini Mapa" + Loc ["STRING_OPTIONS_MINIMAP_DESC"] = "Mostra ou esconde o icone no mini mapa." Loc ["STRING_OPTIONS_TIMEMEASURE"] = "Medidas do Tempo" Loc ["STRING_OPTIONS_TIMEMEASURE_DESC"] = "|cFFFFFFFFTempo de Atividade|r: o tempo de cada membro da raide eh posto em pausa quando ele ficar ocioso e volta a contar o tempo quando ele voltar a atividade, eh a maneira mais comum de medir o Dps e Hps.\n\n|cFFFFFFFFTempo Efetivo|r: muito usado para ranqueamentos, este metodo usa o tempo total da luta para medir o Dps e Hps de todos os membros da raide." @@ -448,90 +457,164 @@ if not Loc then return end Loc ["STRING_OPTIONS_CLOUD_DESC"] = "Quando ativado, as informacoes de capturas deligadas eh buscada em outros membros da raide." - Loc ["STRING_OPTIONS_BARS"] = "Bar Settings" - Loc ["STRING_OPTIONS_BARS_DESC"] = "This options control the appearance of the instance bars." + Loc ["STRING_OPTIONS_BARS"] = "Configuracoes das Barras" + Loc ["STRING_OPTIONS_BARS_DESC"] = "Estas opcoes controlam a aparencia das barra da janela." - Loc ["STRING_OPTIONS_BAR_TEXTURE"] = "Texture" - Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] = "Choose the texture of bars." + Loc ["STRING_OPTIONS_BAR_TEXTURE"] = "Textura" + Loc ["STRING_OPTIONS_BAR_TEXTURE_DESC"] = "Esta opcao altera a textura superior das barras." - Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Background Texture" - Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] = "Choose the background texture of bars." + Loc ["STRING_OPTIONS_BAR_BTEXTURE"] = "Textura de Fundo" + Loc ["STRING_OPTIONS_BAR_BTEXTURE_DESC"] = "Altere a textura do fundo da barra, lembre-se de alterar a cor da textura e diminuir sua transparencia." - Loc ["STRING_OPTIONS_BAR_BCOLOR"] = "Background Color" - Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] = "Choose the background color of bars." + Loc ["STRING_OPTIONS_BAR_BCOLOR"] = "Cor da Textura de Fundo" + Loc ["STRING_OPTIONS_BAR_BCOLOR_DESC"] = "Escolha a cor que a textura do fundo da barra tera, no painel, ha um controle de transparencia, nao esqueca de alterar." - Loc ["STRING_OPTIONS_BAR_HEIGHT"] = "Height" - Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] = "Change the height of bars." + Loc ["STRING_OPTIONS_BAR_HEIGHT"] = "Altura" + Loc ["STRING_OPTIONS_BAR_HEIGHT_DESC"] = "Altera a altura das barras." - 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\nDisabled: bars have a fixed color." + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS"] = "Cor da Classe" + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS_DESC"] = "Quando ativada, as barras aplicam a cor da classe do personagem na textura superior.\n\nQuando desligado, a barra ira utilizar a cor fixa determinada na caixa a direita." - Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Background Color By Class" - Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "When enabled, the instance bars background have the color of the character class.\n\nDisabled: bars have a fixed color." + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2"] = "Cor da Classe (fundo)" + Loc ["STRING_OPTIONS_BAR_COLORBYCLASS2_DESC"] = "Quando ativada, as barras aplicam a cor da classe do personagem na textura de fundo.\n\nQuando desligado, a barra ira utilizar a cor fixa determinada na caixa a direita." -- - Loc ["STRING_OPTIONS_TEXT"] = "Text Settings" - Loc ["STRING_OPTIONS_TEXT_DESC"] = "This options control the appearance of the instance bar texts." + Loc ["STRING_OPTIONS_TEXT"] = "Opcoes dos Textos das Barras" + Loc ["STRING_OPTIONS_TEXT_DESC"] = "Os ajustes abaixo personalizam os textos mostrados nas barras." - Loc ["STRING_OPTIONS_TEXT_SIZE"] = "Size" - Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"] = "Change the size of bar texts." + Loc ["STRING_OPTIONS_TEXT_SIZE"] = "Tamanho" + Loc ["STRING_OPTIONS_TEXT_SIZE_DESC"] = "Altera o tamanho da fonte do texto." Loc ["STRING_OPTIONS_TEXT_FONT"] = "Font" - Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] = "Change the font of bar texts." + Loc ["STRING_OPTIONS_TEXT_FONT_DESC"] = "Modifica a fonte do texto usado nas barras." - Loc ["STRING_OPTIONS_TEXT_LOUTILINE"] = "Left Text Outline" - Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] = "Enable or Disable the outline for left text." + Loc ["STRING_OPTIONS_TEXT_LOUTILINE"] = "Sombra do Texto Esquerdo" + Loc ["STRING_OPTIONS_TEXT_LOUTILINE_DESC"] = "Quando ativado o texto esquerdo ganhara um efeito de sombra ao seu redor." - Loc ["STRING_OPTIONS_TEXT_ROUTILINE"] = "Right Text Outline" - Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] = "Enable or Disable the outline for right text." + Loc ["STRING_OPTIONS_TEXT_ROUTILINE"] = "Sombra do Texto Direito" + Loc ["STRING_OPTIONS_TEXT_ROUTILINE_DESC"] = "Quando ativado o texto da direita ganhara um efeito de sombra ao seu redor." - Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"] = "Left Text Color By Class" - Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] = "When enabled, the left text uses the class color of the character.\n\nIf disabled, choose the color on the color picker button." + Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR"] = "Texto Esquerdo Cor da Classe" + Loc ["STRING_OPTIONS_TEXT_LCLASSCOLOR_DESC"] = "Quando ativado a cor do texto esquerdo sera automaticamento ajustado para a cor da classe do personagem mostrado.\n\nQuando desligado a cor na caixa a direita eh usado." - Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"] = "Right Text Color By Class" - Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] = "When enabled, the right text uses the class color of the character.\n\nIf disabled, choose the color on the color picker button." + Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR"] = "Texto Direito Cor da Classe" + Loc ["STRING_OPTIONS_TEXT_RCLASSCOLOR_DESC"] = "Quando ativado a cor do texto da direita sera automaticamento ajustado para a cor da classe do personagem mostrado.\n\nQuando desligado a cor na caixa a direita eh usado." -- - 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"] = "Configuracoes da Janela" + Loc ["STRING_OPTIONS_INSTANCE_DESC"] = "Estes ajustes configuram atributos basicos da janela da instancia." - Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Color" - Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Change the color of instance window." + Loc ["STRING_OPTIONS_INSTANCE_COLOR"] = "Cor e Transparencia" + Loc ["STRING_OPTIONS_INSTANCE_COLOR_DESC"] = "Altera a cor e a transparencia da janela." - Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Alpha" - Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "This option let you change the color and transparency of instance window background." + Loc ["STRING_OPTIONS_INSTANCE_ALPHA"] = "Transparencia do Fundo" + Loc ["STRING_OPTIONS_INSTANCE_ALPHA_DESC"] = "Esta opcao altera a transparencia do fundo da janela." + Loc ["STRING_OPTIONS_INSTANCE_ALPHA2"] = "Cor de Fundo" + Loc ["STRING_OPTIONS_INSTANCE_ALPHA2_DESC"] = "Seleciona a cor do fundo da janela." - Loc ["STRING_OPTIONS_INSTANCE_CURRENT"] = "Auto Switch To Current" - Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] = "Whenever a combat start and there is no other instance on current segment, this instance auto switch to current segment." + Loc ["STRING_OPTIONS_INSTANCE_CURRENT"] = "Mudar Para Atual" + Loc ["STRING_OPTIONS_INSTANCE_CURRENT_DESC"] = "Quando qualquer combate comecar e nao ha nenhuma instancia no segmento atual, esta instancia automaticamente troca para o segmento atual." - Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Skin" - Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modify all window textures based on a skin theme." + Loc ["STRING_OPTIONS_SHOW_SIDEBARS"] = "Mostrar Barras Laterais" + Loc ["STRING_OPTIONS_SHOW_SIDEBARS_DESC"] = "Mostrar ou esconder as barras laterais na esquerda e direita da janela." - Loc ["STRING_OPTIONS_WP"] = "Wallpaper Settings" - Loc ["STRING_OPTIONS_WP_DESC"] = "This options control the wallpaper of instance." + Loc ["STRING_OPTIONS_INSTANCE_SKIN"] = "Pele (skin)" + Loc ["STRING_OPTIONS_INSTANCE_SKIN_DESC"] = "Modifica todas as texturas e opcoes da janela atraves de um padrao pre definido." - Loc ["STRING_OPTIONS_WP_ENABLE"] = "Show" - Loc ["STRING_OPTIONS_WP_ENABLE_DESC"] = "Enable or Disable the wallpaper of the instance.\n\nSelect the category and the image you want on the two following boxes." - - Loc ["STRING_OPTIONS_WP_GROUP"] = "Category" - Loc ["STRING_OPTIONS_WP_GROUP_DESC"] = "In this box, you select the group of the wallpaper, the images of this category can be chosen on the next dropbox." - - Loc ["STRING_OPTIONS_WP_GROUP2"] = "Wallpaper" - 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_EDIT"] = "Edit Image" - Loc ["STRING_OPTIONS_WP_EDIT_DESC"] = "Open the image editor to change some wallpaper aspects." + Loc ["STRING_OPTIONS_SKIN_A"] = "Ajustes da Pele (Skin)" + Loc ["STRING_OPTIONS_SKIN_A_DESC"] = "Estas opcoes alteram as caracteristicas gerais da janela." - 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_TOOLBAR_SETTINGS"] = "Ajustes da Barra de Menus" + Loc ["STRING_OPTIONS_TOOLBAR_SETTINGS_DESC"] = "Estas opcoes lidam com a barra de ferramentas." + + Loc ["STRING_OPTIONS_DESATURATE_MENU"] = "Menu em Preto e Branco" + Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"] = "Ativando esta opcao o menu na barra de ferramentas torna-se preto e branco." + + Loc ["STRING_OPTIONS_HIDE_ICON"] = "Esconder Icone" + Loc ["STRING_OPTIONS_HIDE_ICON_DESC"] = "Quando ativado, o icone do atributo na barra de ferramentas eh escondido." + + Loc ["STRING_OPTIONS_MENU_X"] = "Posicao X Do Menu" + Loc ["STRING_OPTIONS_MENU_X_DESC"] = "Move a barra de menus para a esquerda ou direita no eixo horizontal." + + Loc ["STRING_OPTIONS_MENU_Y"] = "Posicao Y Do Menu" + Loc ["STRING_OPTIONS_MENU_Y_DESC"] = "Move a barra de menus para cima ou para baixo no eixo vertical." + + Loc ["STRING_OPTIONS_RESET_TEXTCOLOR"] = "Cor do Texto (reset)" + Loc ["STRING_OPTIONS_RESET_TEXTCOLOR_DESC"] = "Muda a cor do texto do botao de reset.\n\nO botao de reset eh apenas mostrado na janela 'mais baixa' (com o menor numero)." + + Loc ["STRING_OPTIONS_RESET_TEXTFONT"] = "Fonte do Texto (reset)" + Loc ["STRING_OPTIONS_RESET_TEXTFONT_DESC"] = "Muda a fonte do texto do botao de reset.\n\nO botao de reset eh apenas mostrado na janela 'mais baixa' (com o menor numero)." + + Loc ["STRING_OPTIONS_RESET_TEXTSIZE"] = "Tamanho do Texto (reset)" + Loc ["STRING_OPTIONS_RESET_TEXTSIZE_DESC"] = "Muda o tamanho do texto do botao de reset.\n\nO botao de reset eh apenas mostrado na janela 'mais baixa' (com o menor numero)." + + Loc ["STRING_OPTIONS_RESET_OVERLAY"] = "Overlay (reset)" + Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"] = "Altera a cor do botao de reset.\n\nO botao de reset eh apenas mostrado na janela 'mais baixa' (com o menor numero)." + + Loc ["STRING_OPTIONS_RESET_SMALL"] = "Reset Sempre Pequeno" + Loc ["STRING_OPTIONS_RESET_SMALL_DESC"] = "O botao de reset sempre sera mostrado na sua versao pequena.\n\nO botao de reset eh apenas mostrado na janela 'mais baixa' (com o menor numero)." + + Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"] = "Cor do Texto (instancia)" + Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"] = "Altera a cor do texto no botao da instancia." + + Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"] = "Fonte do Texto (instancia)" + Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT_DESC"] = "Altera a fonte do texto no botao da instancia." + + Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"] = "Tamanho do Texto (instancia)" + Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"] = "Altera o tamanho do texto no botao da instancia." + + Loc ["STRING_OPTIONS_INSTANCE_OVERLAY"] = "Overlay (instancia)" + Loc ["STRING_OPTIONS_INSTANCE_OVERLAY_DESC"] = "Altera a cor do botao da instancia." + + Loc ["STRING_OPTIONS_CLOSE_OVERLAY"] = "Cor do Botao de Fechar" + Loc ["STRING_OPTIONS_CLOSE_OVERLAY_DESC"] = "Modifica a cor do botao de fechar." + + Loc ["STRING_OPTIONS_STRETCH"] = "Posicao do Botao de Esticar" + Loc ["STRING_OPTIONS_STRETCH_DESC"] = "Modifica a posicao do botao de esticar, ele pode ser mostrado em:\n\nTopo: o pegador eh mostrado logo acima do botao da instancia e do botao de fechar.\n\nBaixo: mostrado na parte central e inferior da janela." + + Loc ["STRING_OPTIONS_PICONS_DIRECTION"] = "Direcao dos Icones dos Plugins" + Loc ["STRING_OPTIONS_PICONS_DIRECTION_DESC"] = "Altera o lado que os icones dos plugins serao mostrados na barra de ferramentas." + + Loc ["STRING_OPTIONS_INSBUTTON_X"] = "Eixo X Botao da Instancia" + Loc ["STRING_OPTIONS_INSBUTTON_X_DESC"] = "Move o botao da instancia para a esquerda ou direita." + + Loc ["STRING_OPTIONS_INSBUTTON_Y"] = "Eixo Y Botao da Instancia" + Loc ["STRING_OPTIONS_INSBUTTON_Y_DESC"] = "Move o botao da instancia para cima ou para baixo." + + Loc ["STRING_OPTIONS_TOOLBARSIDE"] = "Posicao Barra de Ferramentas" + Loc ["STRING_OPTIONS_TOOLBARSIDE_DESC"] = "Altera aonde sera mostrada a barra de ferramentas, ela pode ser mostrada no topo da janela ou na parte inferior." + + Loc ["STRING_OPTIONS_BARGROW_DIRECTION"] = "Direcao de Crescimento" + Loc ["STRING_OPTIONS_BARGROW_DIRECTION_DESC"] = "Altera a posicao em que as barras comecam a serem mostradas, de cima da janela para baixo ou de baixo da janela para cima." + + Loc ["STRING_OPTIONS_BARSORT_DIRECTION"] = "Ordem das Barras" + Loc ["STRING_OPTIONS_BARSORT_DIRECTION_DESC"] = "Altera como as barras sao preenchidas, crescente ou decrescente, mas ainda mostrando sempre os primeiros colocados." + + Loc ["STRING_OPTIONS_WP"] = "Papel de Parede" + Loc ["STRING_OPTIONS_WP_DESC"] = "Estas opcoes controlam o papel de parede que eh mostrado no fundo da janela." - Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] = "Preset Name" - Loc ["STRING_OPTIONS_SAVELOAD_SAVE"] = "save" - Loc ["STRING_OPTIONS_SAVELOAD_LOAD"] = "load" + Loc ["STRING_OPTIONS_WP_ENABLE"] = "Ativar/Desativar" + Loc ["STRING_OPTIONS_WP_ENABLE_DESC"] = "Liga ou desliga o papel de parede.\n\nVoce pode escolher qual papel de parede voce deseja usar nas caixas abaixo." + + Loc ["STRING_OPTIONS_WP_GROUP"] = "Categoria" + Loc ["STRING_OPTIONS_WP_GROUP_DESC"] = "Nesta caixa, selecione o tipo do papel de parede, apos selecionar, a caixa a direita ira mostrar as opcoes da categoria escolhida." + + Loc ["STRING_OPTIONS_WP_GROUP2"] = "Papel de Parede" + Loc ["STRING_OPTIONS_WP_GROUP2_DESC"] = "Selecione qual voce deseja colocar no fundo da janela, para mais opcoes troque de categoria na caixa da esquerda." + + Loc ["STRING_OPTIONS_WP_ALIGN"] = "Alinhamento" + Loc ["STRING_OPTIONS_WP_ALIGN_DESC"] = "Selecione como o papel de parede sera alinhado com a janela.\n\n- |cFFFFFFFFPreencher|r: redimenciona e alinha com os quatro cantos da janela.\n\n- |cFFFFFFFFCentralizado|r: nao redimenciona e alinha com o centro da janeça.\n\n-|cFFFFFFFFEsticado|r: redimenciona na vertical ou horizontal e alinha com os cantos da esquerda-direita ou lado superior-inferior.\n\n-|cFFFFFFFFQuatro Laterais|r: alinha com um canto especifico, nao ha redimencionamento automatico." + + Loc ["STRING_OPTIONS_WP_EDIT"] = "Editar Imagem" + Loc ["STRING_OPTIONS_WP_EDIT_DESC"] = "Abre o editor de imagens para alterar os aspectos do papel de parede escolhido." + + Loc ["STRING_OPTIONS_SAVELOAD"] = "Salvar e Carregar" + Loc ["STRING_OPTIONS_SAVELOAD_DESC"] = "Estas opcoes permitem guardar as configuracoes da janela podendo carrega-las em outros personagens." + + Loc ["STRING_OPTIONS_SAVELOAD_PNAME"] = "Nome" + Loc ["STRING_OPTIONS_SAVELOAD_SAVE"] = "salvar" + Loc ["STRING_OPTIONS_SAVELOAD_LOAD"] = "carregar" 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_RESET"] = "resetar p/ padroes" + Loc ["STRING_OPTIONS_SAVELOAD_APPLYTOALL"] = "aplicar em todas as janelas" -- Mini Tutorials ----------------------------------------------------------------------------------------------------------------- diff --git a/startup.lua b/startup.lua index d284b1ac..1268c47d 100644 --- a/startup.lua +++ b/startup.lua @@ -29,126 +29,21 @@ function _G._detalhes:Start() self.encounter = {} self.in_combat = false self.combat_id = self.combat_id or 0 - self.instances_amount = self.instances_amount or 12 - self.segments_amount = self.segments_amount or 12 - self.segments_amount_to_save = self.segments_amount_to_save or 5 - self.memory_threshold = self.memory_threshold or 3 - self.memory_ram = self.memory_ram or 64 - self.deadlog_limit = self.deadlog_limit or 12 - self.minimum_combat_time = self.minimum_combat_time or 5 - - if (type (self.trash_concatenate) ~= "boolean") then - self.trash_concatenate = false - end - if (type (self.trash_auto_remove) ~= "boolean") then - self.trash_auto_remove = false - end - - if (type (self.only_pvp_frags) ~= "boolean") then - self.only_pvp_frags = false - end - - if (type (self.remove_realm_from_name) ~= "boolean") then - self.remove_realm_from_name = true - end - - if (type (self.cloud_capture) ~= "boolean") then - self.cloud_capture = true - end - - if (type (self.segments_panic_mode) ~= "boolean") then - self.segments_panic_mode = true - end - - if (type (self.clear_graphic) ~= "boolean") then - self.clear_graphic = self.clear_graphic or true - end - - if (type (self.clear_ungrouped) ~= "boolean") then - self.clear_ungrouped = self.clear_ungrouped or true - end - - if (type (self.use_row_animations) ~= "boolean") then - self.use_row_animations = self.use_row_animations or false - end --> instances (windows) self.solo = self.solo or nil self.raid = self.raid or nil self.opened_windows = 0 - self.update_speed = self.update_speed or 1 - self.time_type = self.time_type or 1 - - 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} - self.windows_fade_out = self.windows_fade_out or {"out", 0.2} - self.default_texture = [[Interface\AddOns\Details\images\bar4]] self.default_texture_name = "Details D'ictum" - self.default_bg_color = self.default_bg_color or 0.0941 - self.default_bg_alpha = self.default_bg_alpha or 0.7 - - self.new_window_size = self.new_window_size or {width = 300, height = 95} - self.max_window_size = self.max_window_size or {width = 480, height = 450} - self.window_clamp = self.window_clamp or {-8, 0, 30, -14} - - self.report_lines = self.report_lines or 5 - self.report_to_who = self.report_to_who or "" - - self.animate_scroll = self.animate_scroll or false - self.use_scroll = self.use_scroll or false - self.tooltip_max_targets = 3 self.tooltip_max_abilities = 3 self.tooltip_max_pets = 1 - self.font_sizes = self.font_sizes or { - menus = 10 - } - - self.tutorial = self.tutorial or {} - self.tutorial.logons = self.tutorial.logons or 0 - self.tutorial.unlock_button = self.tutorial.unlock_button or 0 - self.tutorial.version_announce = self.tutorial.version_announce or 0 - self.tutorial.main_help_button = self.tutorial.main_help_button or 0 - self.tutorial.alert_frames = self.tutorial.alert_frames or {false, false, false, false, false, false} - self.tutorial.logons = self.tutorial.logons + 1 - - self.character_data = self.character_data or { - logons = 0, - } - - self.character_data.logons = self.character_data.logons + 1 - - --> class colors and tcoords - if (not self.class_colors) then - self.class_colors = {} - for classe, tabela_cor in pairs ( RAID_CLASS_COLORS ) do - self.class_colors [classe] = {tabela_cor.r, tabela_cor.g, tabela_cor.b} - end - self.class_colors ["UNKNOW"] = {0.2, 0.2, 0.2} - self.class_colors ["UNGROUPPLAYER"] = {0.4, 0.4, 0.4} - self.class_colors ["PET"] = {0.3, 0.4, 0.5} - end - self.class_colors ["ENEMY"] = self.class_colors ["ENEMY"] or {0.94117, 0, 0.01960, 1} - - self.class_coords = {} - for class, tcoord in pairs (_G.CLASS_ICON_TCOORDS) do - self.class_coords [class] = tcoord - end - - self.class_icons_small = [[Interface\AddOns\Details\images\classes_small]] - self.class_coords ["Alliance"] = {0.49609375, 0.7421875, 0.75, 1} - self.class_coords ["Horde"] = {0.7421875, 0.98828125, 0.75, 1} - self.class_coords ["PET"] = {0.25, 0.49609375, 0.75, 1} - self.class_coords ["MONSTER"] = {0, 0.25, 0.75, 1} - self.class_coords ["ENEMY"] = {0, 0.25, 0.75, 1} - - self.class_coords ["UNKNOW"] = {0.5, 0.75, 0.75, 1} - self.class_coords ["UNGROUPPLAYER"] = {0.5, 0.75, 0.75, 1} + self.class_coords_version = 1 + self.class_colors_version = 1 self.school_colors = { [1] = {1.00, 1.00, 0.00}, @@ -160,6 +55,9 @@ function _G._detalhes:Start() [64] = {1.00, 0.50, 1.00}, ["unknown"] = {0.5, 0.75, 0.75, 1} } + + --> parse all config + _detalhes:ApplyConfigDataOnLoad() --> single click row function replace --damage, dps, damage taken, friendly fire @@ -226,7 +124,7 @@ function _G._detalhes:Start() end self:GetLowerInstanceNumber() self:CheckConsolidates() - + --> start time machine self.timeMachine:Ligar() @@ -243,19 +141,32 @@ function _G._detalhes:Start() end end - function self:AtualizaGumps() + function self:RefreshAfterStartup() + self:AtualizaGumpPrincipal (-1, true) - self.AtualizaGumps = nil + + local lower_instance = _detalhes:GetLowerInstanceNumber() + for index = 1, #self.tabela_instancias do local instance = self.tabela_instancias [index] if (instance:IsAtiva()) then + --> refresh wallpaper if (instance.wallpaper.enabled) then instance:InstanceWallpaper (true) end + + --> refresh desaturated icons if is lower instance + if (index == lower_instance) then + instance:DesaturateMenu() + end end end + + _detalhes.ToolBar:ReorganizeIcons() + + self.RefreshAfterStartup = nil end - self:ScheduleTimer ("AtualizaGumps", 4) + self:ScheduleTimer ("RefreshAfterStartup", 4) --> start garbage collector self.ultima_coleta = 0 @@ -311,9 +222,10 @@ function _G._detalhes:Start() for index, instancia in ipairs (self.tabela_instancias) do if (instancia.ativa) then self:SendEvent ("DETAILS_INSTANCE_OPEN", nil, instancia) + --instancia:SetBarGrowDirection() end end - + --> all done, send started signal and we are ready function self:AnnounceStartup() self:SendEvent ("DETAILS_STARTED", "SEND_TO_ALL") @@ -336,7 +248,7 @@ function _G._detalhes:Start() for index, instancia in ipairs (self.tabela_instancias) do if (instancia.ativa) then self.gump:Fade (instancia._version, 0) - instancia._version:SetText ("Details Alpha " .. _detalhes.userversion .. " (core: " .. self.realversion .. ")") + instancia._version:SetText ("Details! Alpha " .. _detalhes.userversion .. " (core: " .. self.realversion .. ")") instancia._version:SetPoint ("bottomleft", instancia.baseframe, "bottomleft", 0, 1) self.gump:Fade (instancia._version, "in", 10) end @@ -405,7 +317,15 @@ function _G._detalhes:Start() GameCooltip:AddIcon ([[Interface\ICONS\Spell_ChargePositive]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125) --> reopen window 64: 0.0078125 - GameCooltip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true) + local reopen = function() + for _, instance in ipairs (_detalhes.tabela_instancias) do + if (not instance:IsAtiva()) then + _detalhes:CriarInstancia (instance.meu_id) + return + end + end + end + GameCooltip:AddMenu (1, reopen, nil, nil, nil, Loc ["STRING_MINIMAPMENU_REOPEN"], nil, true) GameCooltip:AddIcon ([[Interface\ICONS\Ability_Priest_VoidShift]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125) GameCooltip:AddMenu (1, _detalhes.ReabrirTodasInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_REOPENALL"], nil, true) @@ -434,7 +354,7 @@ function _G._detalhes:Start() }) if (minimapIcon and not LDBIcon:IsRegistered ("Details!")) then - LDBIcon:Register ("Details!", minimapIcon, [[Interface\AddOns\Details\images\minimap]]) + LDBIcon:Register ("Details!", minimapIcon, self.minimap) end end @@ -471,5 +391,14 @@ function _G._detalhes:Start() --> MicroButtonAlertTemplate self.MicroButtonAlert = CreateFrame ("frame", "DetailsMicroButtonAlert", UIParent, "MicroButtonAlertTemplate") self.MicroButtonAlert:Hide() - + + --[[ + print ("primeiro:") + local instancia = _detalhes.tabela_instancias [1] + for i = 1, instancia.barras [1]:GetNumPoints() do + local point, relativeTo, relativePoint, xOfs, yOfs = instancia.barras [1]:GetPoint (i) + print (point, relativeTo, relativePoint, xOfs, yOfs) + end + print ("---------------") + --]] end