From 0c126196d2fe659f086164a09550a3a8a7f1c0e8 Mon Sep 17 00:00:00 2001 From: Tercio Date: Wed, 18 Mar 2015 18:34:44 -0300 Subject: [PATCH] - Fixed an issue with overall data where max/min amount for spell was being calculated wrong. - Fixed a problem while reporting enemy damage taken. - Fixed an issue with damage taken by spell where some spells wasn't shown. - Fixed window positioning when changing from Solo mode to Group mode. - Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done. - Few improvements on tooltips. - Boss segments now need to have at least 30 seconds to be added on the overall data. - When the segment limit is reach, segments with less combat time will be erased instead of the olders. - Added item level tracker. - Added an option for change the amount of lines on death log. - Added custom display for CC done. --- boot.lua | 12 +- classes/classe_damage.lua | 40 +++- classes/classe_heal.lua | 38 +++- classes/classe_instancia.lua | 16 +- classes/classe_others.lua | 4 + core/windows.lua | 3 + gumps/janela_options.lua | 202 +++++++----------- gumps/switch.lua | 9 + images/knob.tga | Bin 0 -> 1523 bytes .../Details_RaidCheck/Details_RaidCheck.lua | 6 +- startup.lua | 2 +- 11 files changed, 179 insertions(+), 153 deletions(-) create mode 100644 images/knob.tga diff --git a/boot.lua b/boot.lua index a93f991c..6f066b45 100644 --- a/boot.lua +++ b/boot.lua @@ -3,10 +3,11 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 656 --it's 656 for release - _detalhes.userversion = "v3.11.4" - _detalhes.realversion = 64 --core version + _detalhes.build_counter = 711 --it's 711 for release + _detalhes.userversion = "v3.11.5" + _detalhes.realversion = 65 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" + Details = _detalhes ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> initialization stuff @@ -20,7 +21,8 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.11.4 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spell was being calculated wrong.\n\n |cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n |cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n |cFFFFFF00-|r Few improvements on tooltips.\n\n @@ -35,7 +37,7 @@ do -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.11.4 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 640f5fc3..a3a5c980 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -3623,7 +3623,19 @@ end if (not habilidade_shadow [key]) then habilidade_shadow [key] = 0 end - habilidade_shadow [key] = habilidade_shadow [key] + value + + if (key == "n_min" or key == "c_min") then + if (habilidade_shadow [key] > value) then + habilidade_shadow [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_shadow [key] < value) then + habilidade_shadow [key] = value + end + else + habilidade_shadow [key] = habilidade_shadow [key] + value + end + end end end @@ -3688,7 +3700,19 @@ atributo_damage.__add = function (tabela1, tabela2) if (not habilidade_tabela1 [key]) then habilidade_tabela1 [key] = 0 end - habilidade_tabela1 [key] = habilidade_tabela1 [key] + value + + if (key == "n_min" or key == "c_min") then + if (habilidade_tabela1 [key] > value) then + habilidade_tabela1 [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_tabela1 [key] < value) then + habilidade_tabela1 [key] = value + end + else + habilidade_tabela1 [key] = habilidade_tabela1 [key] + value + end + end end end @@ -3751,7 +3775,17 @@ atributo_damage.__sub = function (tabela1, tabela2) if (not habilidade_tabela1 [key]) then habilidade_tabela1 [key] = 0 end - habilidade_tabela1 [key] = habilidade_tabela1 [key] - value + if (key == "n_min" or key == "c_min") then + if (habilidade_tabela1 [key] > value) then + habilidade_tabela1 [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_tabela1 [key] < value) then + habilidade_tabela1 [key] = value + end + else + habilidade_tabela1 [key] = habilidade_tabela1 [key] - value + end end end end diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 5d145c8e..809ba33e 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -2263,7 +2263,19 @@ end if (not habilidade_shadow [key]) then habilidade_shadow [key] = 0 end - habilidade_shadow [key] = habilidade_shadow [key] + value + + if (key == "n_min" or key == "c_min") then + if (habilidade_shadow [key] > value) then + habilidade_shadow [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_shadow [key] < value) then + habilidade_shadow [key] = value + end + else + habilidade_shadow [key] = habilidade_shadow [key] + value + end + end end end @@ -2343,7 +2355,17 @@ atributo_heal.__add = function (tabela1, tabela2) if (not habilidade_tabela1 [key]) then habilidade_tabela1 [key] = 0 end - habilidade_tabela1 [key] = habilidade_tabela1 [key] + value + if (key == "n_min" or key == "c_min") then + if (habilidade_tabela1 [key] > value) then + habilidade_tabela1 [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_tabela1 [key] < value) then + habilidade_tabela1 [key] = value + end + else + habilidade_tabela1 [key] = habilidade_tabela1 [key] + value + end end end end @@ -2426,7 +2448,17 @@ atributo_heal.__sub = function (tabela1, tabela2) if (not habilidade_tabela1 [key]) then habilidade_tabela1 [key] = 0 end - habilidade_tabela1 [key] = habilidade_tabela1 [key] - value + if (key == "n_min" or key == "c_min") then + if (habilidade_tabela1 [key] > value) then + habilidade_tabela1 [key] = value + end + elseif (key == "n_max" or key == "c_max") then + if (habilidade_tabela1 [key] < value) then + habilidade_tabela1 [key] = value + end + else + habilidade_tabela1 [key] = habilidade_tabela1 [key] - value + end end end end diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 69bcc7ec..e934774a 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -428,7 +428,7 @@ end break end end - + if (instance) then if (instance:IsEnabled()) then _detalhes:ShutDownAllInstances() @@ -940,14 +940,12 @@ function _detalhes:agrupar_janelas (lados) --> salva o snap 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 elseif (lado == 1) then --> esquerda --> mover frame + + --print (esta_instancia.baseframe:GetPoint (0)[2], esta_instancia.baseframe:GetPoint (0)[2] == instancia.baseframe) + instancia.baseframe:SetPoint ("TOPLEFT", esta_instancia.baseframe, "TOPRIGHT") instancia.baseframe:SetPoint ("LEFT", esta_instancia.baseframe, "RIGHT") instancia.baseframe:SetPoint ("BOTTOMLEFT", esta_instancia.baseframe, "BOTTOMRIGHT") @@ -977,11 +975,7 @@ function _detalhes:agrupar_janelas (lados) --> salva o snap 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 + end if (not esta_instancia.ativa) then diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 061f88ee..8d2790e9 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -165,6 +165,8 @@ function atributo_misc:CreateBuffTargetObject() } end +local backgroundColor = {0, 0, 0, 1} + function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) local eventos = morte [1] @@ -283,6 +285,8 @@ function _detalhes:ToolTipDead (instancia, morte, esta_barra, keydown) GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\BantoBar]]) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + local myPoint = _detalhes.tooltip.anchor_point local anchorPoint = _detalhes.tooltip.anchor_relative local x_Offset = _detalhes.tooltip.anchor_offset[1] diff --git a/core/windows.lua b/core/windows.lua index 6034dabf..21bc55d2 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -2281,6 +2281,9 @@ GameCooltip:AddMenu (1, _detalhes.DestravarInstancias, true, nil, nil, Loc ["STRING_MINIMAPMENU_UNLOCK"], nil, true) GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-LockIcon]], 1, 1, 14, 14, 0.0703125, 0.9453125, 0.0546875, 0.9453125, "gray") + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0.64453125, 0}, {.8, .8, .8, 0.2}, true) + GameCooltip:SetOwner (self, "topright", "bottomleft") GameCooltip:ShowCooltip() diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 603a750b..2dfa4c3b 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -41,7 +41,7 @@ local slider_backdrop = {edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", e bgFile = [[Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated]], tile = true, tileSize = 130, insets = {left = 1, right = 1, top = 5, bottom = 5}} local slider_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\AddOns\Details\images\border_3]], tile=true, - edgeSize = 16, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}} + edgeSize = 15, tileSize = 64, insets = {left = 3, right = 3, top = 4, bottom = 4}} local slider_backdrop_color = {1, 1, 1, 1} @@ -63,6 +63,11 @@ dropdown_backdrop_border_color = {.7, .7, .7} local dropdown_backdrop_onenter = {0, 0, 0, 1} local dropdown_backdrop_onleave = {.1, .1, .1, .9} +local SLIDER_WIDTH = 130 +local SLIDER_HEIGHT = 19 +local DROPDOWN_WIDTH = 160 +local COLOR_BUTTON_WIDTH = 160 + _detalhes.options_window_background = [[Interface\AddOns\Details\images\options_window]] function _detalhes:SetOptionsWindowTexture (texture) @@ -97,10 +102,14 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section) if (not window) then - local SLIDER_WIDTH = 130 - local DROPDOWN_WIDTH = 160 - local COLOR_BUTTON_WIDTH = 160 - + local config_slider = function (slider) + slider:SetBackdrop (slider_backdrop) + slider:SetBackdropColor (unpack (slider_backdrop_color)) + slider:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + slider:SetThumbSize (50, 19) + slider.thumb:SetTexture ([[Interface\AddOns\Details\images\knob]]) + end + -- Most of details widgets have the same 6 first parameters: parent, container, global name, parent key, width, height window = g:NewPanel (UIParent, _, "DetailsOptionsWindow", _, 897, 592) @@ -1249,11 +1258,8 @@ function window:CreateFrame20() -- text size g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (_detalhes.tooltip.fontsize)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 8, 32, 1, tonumber (_detalhes.tooltip.fontsize)) + config_slider (s) frame20.TooltipTextSizeSlider:SetPoint ("left", frame20.TooltipTextSizeLabel, "right", 2) frame20.TooltipTextSizeSlider:SetHook ("OnValueChange", function (self, _, amount) @@ -1437,11 +1443,8 @@ function window:CreateFrame20() --border size g:NewLabel (frame20, _, "$parentBackdropSizeLabel", "BackdropSizeLabel", Loc ["STRING_OPTIONS_SIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame20, _, "$parentBackdropSizeHeight", "BackdropSizeSlider", SLIDER_WIDTH, 20, 1, 32, 1, _detalhes.tooltip.border_size) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame20, _, "$parentBackdropSizeHeight", "BackdropSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 32, 1, _detalhes.tooltip.border_size) + config_slider (s) frame20.BackdropSizeSlider:SetPoint ("left", frame20.BackdropSizeLabel, "right", 2) frame20.BackdropSizeSlider:SetThumbSize (50) @@ -1583,11 +1586,8 @@ function window:CreateFrame20() --tooltip offset g:NewLabel (frame20, _, "$parentTooltipOffsetXLabel", "TooltipOffsetXLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETX"], "GameFontHighlightLeft") - local s = g:NewSlider (frame20, _, "$parentTooltipOffsetXSlider", "TooltipOffsetXSlider", SLIDER_WIDTH, 20, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[1])) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame20, _, "$parentTooltipOffsetXSlider", "TooltipOffsetXSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[1])) + config_slider (s) frame20.TooltipOffsetXSlider:SetPoint ("left", frame20.TooltipOffsetXLabel, "right", 2) frame20.TooltipOffsetXSlider:SetHook ("OnValueChange", function (self, _, amount) @@ -1597,11 +1597,8 @@ function window:CreateFrame20() window:CreateLineBackground2 (frame20, "TooltipOffsetXSlider", "TooltipOffsetXLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETX_DESC"]) g:NewLabel (frame20, _, "$parentTooltipOffsetYLabel", "TooltipOffsetYLabel", Loc ["STRING_OPTIONS_TOOLTIPS_OFFSETY"], "GameFontHighlightLeft") - local s = g:NewSlider (frame20, _, "$parentTooltipOffsetYSlider", "TooltipOffsetYSlider", SLIDER_WIDTH, 20, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[2])) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame20, _, "$parentTooltipOffsetYSlider", "TooltipOffsetYSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -100, 100, 1, tonumber (_detalhes.tooltip.anchor_offset[2])) + config_slider (s) frame20.TooltipOffsetYSlider:SetPoint ("left", frame20.TooltipOffsetYLabel, "right", 2) frame20.TooltipOffsetYSlider:SetHook ("OnValueChange", function (self, _, amount) @@ -2225,10 +2222,8 @@ function window:CreateFrame18() --> menu text size g:NewLabel (frame18, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame18, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, _detalhes.font_sizes.menus) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame18, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 8, 32, 1, _detalhes.font_sizes.menus) + config_slider (s) frame18.MenuTextSizeSlider:SetPoint ("left", frame18.MenuTextSizeLabel, "right", 2) @@ -2476,11 +2471,8 @@ function window:CreateFrame17() g:NewLabel (frame17, _, "$parentHideOnCombatAlphaLabel", "hideOnCombatAlphaLabel", Loc ["STRING_ALPHA"], "GameFontHighlightLeft") - local s = g:NewSlider (frame17, _, "$parentHideOnCombatAlphaSlider", "hideOnCombatAlphaSlider", SLIDER_WIDTH, 20, 0, 100, 1, _G.DetailsOptionsWindow.instance.hide_in_combat_alpha) -- min, max, step, defaultv - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame17, _, "$parentHideOnCombatAlphaSlider", "hideOnCombatAlphaSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 100, 1, _G.DetailsOptionsWindow.instance.hide_in_combat_alpha) -- min, max, step, defaultv + config_slider (s) frame17.hideOnCombatAlphaSlider:SetPoint ("left", frame17.hideOnCombatAlphaLabel, "right", 2, 0) frame17.hideOnCombatAlphaSlider:SetHook ("OnValueChange", function (self, instance, amount) --> slider, fixedValue, sliderValue @@ -2508,16 +2500,12 @@ function window:CreateFrame17() g:NewSwitch (frame17, _, "$parentMenuOnEnterLeaveAlphaSwitch", "alphaSwitch", 60, 20, _, _, instance.menu_alpha.enabled) - local s = g:NewSlider (frame17, _, "$parentMenuOnEnterAlphaSlider", "menuOnEnterSlider", SLIDER_WIDTH, 20, 0, 1, 0.02, instance.menu_alpha.onenter, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame17, _, "$parentMenuOnEnterAlphaSlider", "menuOnEnterSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 1, 0.02, instance.menu_alpha.onenter, true) + config_slider (s) s.useDecimals = true - local s = g:NewSlider (frame17, _, "$parentMenuOnLeaveAlphaSlider", "menuOnLeaveSlider", SLIDER_WIDTH, 20, 0, 1, 0.02, instance.menu_alpha.onleave, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame17, _, "$parentMenuOnLeaveAlphaSlider", "menuOnLeaveSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 1, 0.02, instance.menu_alpha.onleave, true) + config_slider (s) frame17.menuOnEnterSlider.useDecimals = true frame17.menuOnLeaveSlider.useDecimals = true @@ -3373,14 +3361,10 @@ function window:CreateFrame14() --anchors g:NewLabel (frame14, _, "$parentAttributeAnchorXLabel", "attributeAnchorXLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORX"], "GameFontHighlightLeft") g:NewLabel (frame14, _, "$parentAttributeAnchorYLabel", "attributeAnchorYLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_ANCHORY"], "GameFontHighlightLeft") - local s = g:NewSlider (frame14, _, "$parentAttributeAnchorXSlider", "attributeAnchorXSlider", SLIDER_WIDTH, 20, -20, 300, 1, instance.attribute_text.anchor [1]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) - local s = g:NewSlider (frame14, _, "$parentAttributeAnchorYSlider", "attributeAnchorYSlider", SLIDER_WIDTH, 20, -100, 50, 1, instance.attribute_text.anchor [2]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame14, _, "$parentAttributeAnchorXSlider", "attributeAnchorXSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -20, 300, 1, instance.attribute_text.anchor [1]) + config_slider (s) + local s = g:NewSlider (frame14, _, "$parentAttributeAnchorYSlider", "attributeAnchorYSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -100, 50, 1, instance.attribute_text.anchor [2]) + config_slider (s) frame14.attributeAnchorXSlider:SetPoint ("left", frame14.attributeAnchorXLabel, "right", 2) frame14.attributeAnchorYSlider:SetPoint ("left", frame14.attributeAnchorYLabel, "right", 2) @@ -3452,10 +3436,8 @@ function window:CreateFrame14() --size g:NewLabel (frame14, _, "$parentAttributeTextSizeLabel", "attributeTextSizeLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber ( instance.attribute_text.text_size)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 8, 32, 1, tonumber ( instance.attribute_text.text_size)) + config_slider (s) frame14.attributeTextSizeSlider:SetPoint ("left", frame14.attributeTextSizeLabel, "right", 2) @@ -3605,7 +3587,7 @@ function window:CreateFrame1() local avatar_x_anchor2 = window.right_start_at - 15 - local box = g:NewTextEntry (frame1, _, "$parentNicknameEntry", "nicknameEntry", SLIDER_WIDTH, 20, onPressEnter) + local box = g:NewTextEntry (frame1, _, "$parentNicknameEntry", "nicknameEntry", SLIDER_WIDTH, SLIDER_HEIGHT, onPressEnter) frame1.nicknameEntry:SetPoint ("left", frame1.nicknameLabel, "right", 2, 0) @@ -3727,10 +3709,8 @@ function window:CreateFrame1() titulo_display_desc.width = 320 g:NewLabel (frame1, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_OPTIONS_MAXSEGMENTS"], "GameFontHighlightLeft") - local s = g:NewSlider (frame1, _, "$parentSlider", "segmentsSlider", SLIDER_WIDTH, 20, 1, 25, 1, _detalhes.segments_amount) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame1, _, "$parentSlider", "segmentsSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 25, 1, _detalhes.segments_amount) + config_slider (s) frame1.segmentsSlider:SetPoint ("left", frame1.segmentsLabel, "right", 2, -1) frame1.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue @@ -3757,10 +3737,8 @@ function window:CreateFrame1() g:NewLabel (frame1, _, "$parentWheelSpeedLabel", "WheelSpeedLabel", Loc ["STRING_OPTIONS_WHEEL_SPEED"], "GameFontHighlightLeft") -- - local s = g:NewSlider (frame1, _, "$parentWheelSpeedSlider", "WheelSpeedSlider", SLIDER_WIDTH, 20, 1, 3, 1, _detalhes.scroll_speed) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame1, _, "$parentWheelSpeedSlider", "WheelSpeedSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 3, 1, _detalhes.scroll_speed) + config_slider (s) frame1.WheelSpeedSlider:SetPoint ("left", frame1.WheelSpeedLabel, "right", 2, -1) frame1.WheelSpeedSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue @@ -3773,10 +3751,8 @@ function window:CreateFrame1() --> Max Instances g:NewLabel (frame1, _, "$parentLabelMaxInstances", "maxInstancesLabel", Loc ["STRING_OPTIONS_MAXINSTANCES"], "GameFontHighlightLeft") -- - local s = g:NewSlider (frame1, _, "$parentSliderMaxInstances", "maxInstancesSlider", SLIDER_WIDTH, 20, 1, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame1, _, "$parentSliderMaxInstances", "maxInstancesSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 30, 1, _detalhes.instances_amount) -- min, max, step, defaultv + config_slider (s) frame1.maxInstancesSlider:SetPoint ("left", frame1.maxInstancesLabel, "right", 2, -1) frame1.maxInstancesSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue @@ -3851,9 +3827,8 @@ function window:CreateFrame1() --> update speed - local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.05, 3, 0.05, _detalhes.update_speed, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + local s = g:NewSlider (frame1, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0.05, 3, 0.05, _detalhes.update_speed, true) + config_slider (s) g:NewLabel (frame1, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"], "GameFontHighlightLeft") -- @@ -5253,10 +5228,8 @@ function window:CreateFrame4() --> bar height g:NewLabel (frame4, _, "$parentRowHeightLabel", "rowHeightLabel", Loc ["STRING_OPTIONS_BAR_HEIGHT"], "GameFontHighlightLeft") - local s = g:NewSlider (frame4, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, 20, 10, 30, 1, tonumber (instance.row_info.height)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame4, _, "$parentSliderRowHeight", "rowHeightSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 10, 30, 1, tonumber (instance.row_info.height)) + config_slider (s) frame4.rowHeightSlider:SetPoint ("left", frame4.rowHeightLabel, "right", 2) frame4.rowHeightSlider:SetThumbSize (50) @@ -5336,10 +5309,8 @@ function window:CreateFrame4() -- spacement g:NewLabel (frame4, _, "$parentBarSpacementLabel", "BarSpacementLabel", Loc ["STRING_OPTIONS_BAR_SPACING"], "GameFontHighlightLeft") - local s = g:NewSlider (frame4, _, "$parentBarSpacementSizeSlider", "BarSpacementSlider", SLIDER_WIDTH, 20, 0, 10, 1, instance.row_info.space.between) - s:SetThumbSize (50) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + local s = g:NewSlider (frame4, _, "$parentBarSpacementSizeSlider", "BarSpacementSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 10, 1, instance.row_info.space.between) + config_slider (s) frame4.BarSpacementSlider:SetPoint ("left", frame4.BarSpacementLabel, "right", 2) frame4.BarSpacementSlider:SetHook ("OnValueChange", function (self, instancia, amount) @@ -5773,10 +5744,8 @@ function window:CreateFrame4() --size g:NewLabel (frame4, _, "$parentBackdropSizeLabel", "BackdropSizeLabel", Loc ["STRING_OPTIONS_SIZE"], "GameFontHighlightLeft") - local s = g:NewSlider (frame4, _, "$parentBackdropSizeHeight", "BackdropSizeSlider", SLIDER_WIDTH, 20, 1, 20, 1, tonumber (instance.row_info.height)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame4, _, "$parentBackdropSizeHeight", "BackdropSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 20, 1, tonumber (instance.row_info.height)) + config_slider (s) frame4.BackdropSizeSlider:SetPoint ("left", frame4.BackdropSizeLabel, "right", 2) frame4.BackdropSizeSlider:SetThumbSize (50) @@ -5896,10 +5865,8 @@ function window:CreateFrame5() window:CreateLineBackground2 (frame5, "fixedTextColor", "fixedTextColorLabel", Loc ["STRING_OPTIONS_TEXT_FIXEDCOLOR_DESC"]) --> text size - local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.row_info.font_size)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 8, 32, 1, tonumber (instance.row_info.font_size)) + config_slider (s) g:NewLabel (frame5, _, "$parentFontSizeLabel", "fonsizeLabel", Loc ["STRING_OPTIONS_TEXT_SIZE"], "GameFontHighlightLeft") frame5.fonsizeSlider:SetPoint ("left", frame5.fonsizeLabel, "right", 2) @@ -7067,10 +7034,8 @@ function window:CreateFrame6() --> window scale - local s = g:NewSlider (frame6, _, "$parentWindowScaleSlider", "WindowScaleSlider", SLIDER_WIDTH, 20, 0.65, 1.5, 0.02, instance.window_scale, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame6, _, "$parentWindowScaleSlider", "WindowScaleSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0.65, 1.5, 0.02, instance.window_scale, true) + config_slider (s) s.fine_tuning = 0.011 frame6.WindowScaleSlider:SetHook ("OnValueChange", function (self, instance, amount) @@ -7168,14 +7133,10 @@ function window:CreateFrame7() titulo_toolbar_desc.width = 320 -- menu anchors - local s = g:NewSlider (frame7, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, 20, -200, 200, 1, instance.menu_anchor[1]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) - local s = g:NewSlider (frame7, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, 20, -30, 30, 1, instance.menu_anchor[2]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame7, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -200, 200, 1, instance.menu_anchor[1]) + config_slider (s) + local s = g:NewSlider (frame7, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -30, 30, 1, instance.menu_anchor[2]) + config_slider (s) g:NewLabel (frame7, _, "$parentMenuAnchorXLabel", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU_X"], "GameFontHighlightLeft") g:NewLabel (frame7, _, "$parentMenuAnchorYLabel", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU_Y"], "GameFontHighlightLeft") @@ -7466,9 +7427,8 @@ function window:CreateFrame7() window:CreateLineBackground2 (frame7, "showButtons1Button", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS_DESC"]) --icon sizes - local s = g:NewSlider (frame7, _, "$parentMenuIconSizeSlider", "menuIconSizeSlider", SLIDER_WIDTH, 20, 0.4, 1.6, 0.05, instance.menu_icons_size, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + local s = g:NewSlider (frame7, _, "$parentMenuIconSizeSlider", "menuIconSizeSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0.4, 1.6, 0.05, instance.menu_icons_size, true) + config_slider (s) s.useDecimals = true s.fine_tuning = 0.05 @@ -7494,9 +7454,8 @@ function window:CreateFrame7() --icon spacement - local s = g:NewSlider (frame7, _, "$parentMenuIconSpaceSlider", "MenuIconSpaceSlider", SLIDER_WIDTH, 20, -5, 10, 1, instance.menu_icons.space) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + local s = g:NewSlider (frame7, _, "$parentMenuIconSpaceSlider", "MenuIconSpaceSlider", SLIDER_WIDTH, SLIDER_HEIGHT, -5, 10, 1, instance.menu_icons.space) + config_slider (s) g:NewLabel (frame7, _, "$parentMenuIconSpaceLabel", "MenuIconSpaceLabel", Loc ["STRING_OPTIONS_MENUS_SPACEMENT"], "GameFontHighlightLeft") @@ -7691,10 +7650,8 @@ function window:CreateFrame8() --> upper model alpha g:NewLabel (frame8, _, "$parentModelUpperAlphaLabel", "ModelUpperAlphaLabel", Loc ["STRING_ALPHA"], "GameFontHighlightLeft") - local s = g:NewSlider (frame8, _, "$parentModelUpperAlphaSlider", "ModelUpperAlphaSlider", SLIDER_WIDTH, 20, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.upper_alpha, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame8, _, "$parentModelUpperAlphaSlider", "ModelUpperAlphaSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.upper_alpha, true) + config_slider (s) frame8.ModelUpperAlphaSlider:SetPoint ("left", frame8.ModelUpperAlphaLabel, "right", 2) @@ -7744,10 +7701,8 @@ function window:CreateFrame8() --> lower model alpha g:NewLabel (frame8, _, "$parentModelLowerAlphaLabel", "ModelLowerAlphaLabel", Loc ["STRING_ALPHA"], "GameFontHighlightLeft") - local s = g:NewSlider (frame8, _, "$parentModelLowerAlphaSlider", "ModelLowerAlphaSlider", SLIDER_WIDTH, 20, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.lower_alpha, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame8, _, "$parentModelLowerAlphaSlider", "ModelLowerAlphaSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0, 1, 0.05, _G.DetailsOptionsWindow.instance.row_info.models.lower_alpha, true) + config_slider (s) frame8.ModelLowerAlphaSlider:SetPoint ("left", frame8.ModelLowerAlphaLabel, "right", 2) @@ -8729,10 +8684,8 @@ function window:CreateFrame10() --------------- Max Segments Saved g:NewLabel (frame10, _, "$parentLabelSegmentsSave", "segmentsSaveLabel", Loc ["STRING_OPTIONS_SEGMENTSSAVE"], "GameFontHighlightLeft") -- - local s = g:NewSlider (frame10, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, 20, 1, 25, 1, _detalhes.segments_amount_to_save) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame10, _, "$parentSliderSegmentsSave", "segmentsSliderToSave", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 25, 1, _detalhes.segments_amount_to_save) + config_slider (s) -- frame10.segmentsSliderToSave:SetPoint ("left", frame10.segmentsSaveLabel, "right", 2, 0) frame10.segmentsSliderToSave:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue @@ -8921,9 +8874,8 @@ function window:CreateFrame10() --window:CreateLineBackground2 (frame10, "animateSlider", "animateLabel", Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"]) --update speed - local s = g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, 20, 0.05, 3, 0.05, _detalhes.update_speed, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) + local s = g:NewSlider (frame10, _, "$parentSliderUpdateSpeed", "updatespeedSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 0.05, 3, 0.05, _detalhes.update_speed, true) + config_slider (s) g:NewLabel (frame10, _, "$parentUpdateSpeedLabel", "updatespeedLabel", Loc ["STRING_OPTIONS_WINDOWSPEED"], "GameFontHighlightLeft") -- @@ -9412,10 +9364,8 @@ function window:CreateFrame11() --slider para quantidade de danos a mostrar g:NewLabel (frame11, _, "$parentDeathsDamageLabel", "DeathsDamageLabel", Loc ["STRING_OPTIONS_RT_DEATHS_HITS"], "GameFontHighlightLeft") - local s = g:NewSlider (frame11, _, "$parentDeathsDamageSlider", "DeathsDamageSlider", SLIDER_WIDTH, 20, 1, 5, 1, _detalhes.announce_deaths.last_hits) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame11, _, "$parentDeathsDamageSlider", "DeathsDamageSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 5, 1, _detalhes.announce_deaths.last_hits) + config_slider (s) frame11.DeathsDamageSlider:SetPoint ("left", frame11.DeathsDamageLabel, "right", 2) frame11.DeathsDamageSlider:SetHook ("OnValueChange", function (self, _, amount) @@ -9426,10 +9376,8 @@ function window:CreateFrame11() --slider para limite de mortes para reportar g:NewLabel (frame11, _, "$parentDeathsAmountLabel", "DeathsAmountLabel", Loc ["STRING_OPTIONS_RT_DEATHS_FIRST"], "GameFontHighlightLeft") - local s = g:NewSlider (frame11, _, "$parentDeathsAmountSlider", "DeathsAmountSlider", SLIDER_WIDTH, 20, 1, 30, 1, _detalhes.announce_deaths.only_first) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)); s:SetBackdropBorderColor (unpack (slider_backdrop_border_color)) - s:SetThumbSize (50) + local s = g:NewSlider (frame11, _, "$parentDeathsAmountSlider", "DeathsAmountSlider", SLIDER_WIDTH, SLIDER_HEIGHT, 1, 30, 1, _detalhes.announce_deaths.only_first) + config_slider (s) frame11.DeathsAmountSlider:SetPoint ("left", frame11.DeathsAmountLabel, "right", 2) frame11.DeathsAmountSlider:SetHook ("OnValueChange", function (self, _, amount) diff --git a/gumps/switch.lua b/gumps/switch.lua index 8f28fe54..3236512d 100644 --- a/gumps/switch.lua +++ b/gumps/switch.lua @@ -115,6 +115,7 @@ do window_color_texture:SetAlpha (1) GameCooltip:Reset() _detalhes:CooltipPreset (1) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) GameCooltip:AddLine (Loc ["STRING_OPTIONS_INSTANCE_COLOR"]) GameCooltip:SetOwner (window_color.widget) GameCooltip:SetType ("tooltip") @@ -142,6 +143,7 @@ do options_button_texture:SetAlpha (1) GameCooltip:Reset() _detalhes:CooltipPreset (1) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) GameCooltip:AddLine (Loc ["STRING_INTERFACE_OPENOPTIONS"]) GameCooltip:SetOwner (window_color.widget) GameCooltip:SetType ("tooltip") @@ -591,6 +593,8 @@ function _detalhes:FastSwitch (_this) GameCooltip:SetColor (1, {.1, .1, .1, .3}) GameCooltip:SetColor (2, {.1, .1, .1, .3}) GameCooltip:SetOption ("HeightAnchorMod", -7) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) GameCooltip:ShowCooltip() else --> botão esquerdo @@ -885,6 +889,9 @@ local onenter = function (self) GameCooltip:SetOption ("YSpacingMod", 0) GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + GameCooltip:Show() else GameCooltip:Hide() @@ -921,6 +928,8 @@ local oniconenter = function (self) GameCooltip:SetOption ("YSpacingMod", 0) GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) + GameCooltip:Show() end diff --git a/images/knob.tga b/images/knob.tga new file mode 100644 index 0000000000000000000000000000000000000000..ef96ca4aebbf5e5cda73ec7b718432d398f64b3c GIT binary patch literal 1523 zcmai!%~Bdc5XT1r6-jP+0AC=vB_)E0`#rO;-wVhq#7hL>yrRacSmnjC^yHf)c>v=j zdh`{1g-&-PVk|$P77i8Q8m24t7#Q+J6Roa6^i8FSPfaOQ{qzz8g z2D=q9bT}N%5oHD~&@D;8P|S>$X9RlROgqqQ_rOiNVE73r&jl3(pu!kb+~EK!ioo^* zXc#sS_`MG4HSbQ5G4fsA6HO*Cu;{lTF4KQsS0VbcpIyaHjS zO!|L>jZ?&i_)By`ukexEl!(}ANr)`3zb88|_qwW7&YMyW0+Op&&(V${|Txx6*Q zdR2lN77go5MPq%1!UAOq!Aq~^);;yVUoe@4KHXG}Ka8vmcv!NbjsY&L@SW;;OZk&Ldq%1#| z;XZST9Aflau0~tE&ZWmoGNk3u=ci W4%4QdM5)=9vGl! Reset for the new structure - if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 64 and enable_reset_warning) then + if (_detalhes_database.last_realversion and _detalhes_database.last_realversion < 65 and enable_reset_warning) then function _detalhes:ResetDataStorage() if (not IsAddOnLoaded ("Details_DataStorage")) then