From 29e772ab925ecab8ee6f9ecd211b926870682a78 Mon Sep 17 00:00:00 2001 From: Tercio Date: Mon, 8 Jun 2015 17:58:33 -0300 Subject: [PATCH] - more interface tweaks. --- boot.lua | 7 +++-- classes/classe_damage.lua | 66 ++++++++++++++++++++++++++++----------- classes/classe_energy.lua | 7 +++-- classes/classe_heal.lua | 7 ++++- classes/classe_others.lua | 45 ++++++++++++++++++-------- functions/profiles.lua | 3 ++ functions/skins.lua | 7 ++--- gumps/janela_info.lua | 17 ++++++++++ gumps/switch.lua | 32 +++++++++++++------ 9 files changed, 138 insertions(+), 53 deletions(-) diff --git a/boot.lua b/boot.lua index f35cca57..0fc83382 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 996 --it's 996 for release - _detalhes.userversion = "v3.15.3" + _detalhes.userversion = "v3.15.4" _detalhes.realversion = 70 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -21,7 +21,8 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.15.3 (|cFFFFCC00Jun 05, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.15.4 (|cFFFFCC00Jun 08, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n |cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n |cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n |cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n @@ -37,7 +38,7 @@ do -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.3 (|cFFFFCC00Jun 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\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 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." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.15.4 (|cFFFFCC00Jun 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\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 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." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 53e74078..a6f8e862 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -67,6 +67,8 @@ _detalhes.tooltip_key_size_width = 24 _detalhes.tooltip_key_size_height = 10 + local enemies_background = {value = 100, color = {0.1960, 0.1960, 0.1960, 0.8697}, texture = "Interface\\AddOns\\Details\\images\\bar_background2"} + local headerColor = {1, 0.9, 0.0, 1} local info = _detalhes.janela_info @@ -671,8 +673,12 @@ GameCooltip:AddLine (Loc ["STRING_VOIDZONE_TOOLTIP"], nil, nil, headerColor, nil, 12) GameCooltip:AddIcon ([[Interface\Addons\Details\images\icons]], 1, 1, 14, 14, 0.126953125, 0.1796875, 0, 0.0546875) + _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.6) + --for target_name, debuff_table in _pairs (container) do + local first = tooltip_void_zone_temp [1] and tooltip_void_zone_temp [1][3].damage + for index, t in _ipairs (tooltip_void_zone_temp) do if (t[3] == 0) then @@ -683,9 +689,9 @@ local minutos, segundos = _math_floor (debuff_table.uptime / 60), _math_floor (debuff_table.uptime % 60) if (minutos > 0) then - GameCooltip:AddLine (t[1], FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")") + GameCooltip:AddLine (_detalhes:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. minutos .. "m " .. segundos .. "s" .. ")") else - GameCooltip:AddLine (t[1], FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")") + GameCooltip:AddLine (_detalhes:GetOnlyName (t[1]), FormatTooltipNumber (_, debuff_table.damage) .. " (" .. segundos .. "s" .. ")") end local classe = _detalhes:GetClass (t[1]) @@ -695,13 +701,18 @@ GameCooltip:AddIcon ("Interface\\LFGFRAME\\LFGROLE_BW", nil, nil, 14, 14, .25, .5, 0, 1) end - _detalhes:AddTooltipBackgroundStatusbar() + local _, _, _, _, _, r, g, b = _detalhes:GetClass (t[1]) + GameCooltip:AddStatusBar (debuff_table.damage / first * 100, 1, r, g, b, 1, false, enemies_background) + --_detalhes:AddTooltipBackgroundStatusbar() end GameCooltip:AddLine ("") GameCooltip:AddLine (Loc ["STRING_REPORT_LEFTCLICK"], nil, 1, _unpack (self.click_to_report_color)) GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, 16, 0.015625, 0.13671875, 0.4375, 0.59765625) + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.4) + + GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity") GameCooltip:ShowCooltip() @@ -1714,11 +1725,11 @@ end return self:RefreshBarra (esta_barra, instancia) end end - + end end - + --[[ exported]] function _detalhes:RefreshBarra (esta_barra, instancia, from_resize) if (from_resize) then @@ -1950,7 +1961,10 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) _detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha) end - --habilidades + --> habilidades + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + if (#ActorSkillsSortTable > 0) then for i = 1, _math_min (tooltip_max_abilities, #ActorSkillsSortTable) do local SkillTable = ActorSkillsSortTable [i] @@ -1960,7 +1974,7 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) else GameCooltip:AddLine (nome_magia..": ", FormatTooltipNumber (_, _math_floor (SkillTable [3])) .." (".._cstr("%.1f", SkillTable [2]/ActorDamage*100).."%)") end - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end else @@ -2110,7 +2124,6 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) return true end -local enemies_background = {value = 100, color = {0.1, 0.1, 0.15, 1}, texture = "Interface\\AddOns\\Details\\images\\bar_background2"} function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) local owner = self.owner @@ -2119,10 +2132,10 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) else r, g, b = unpack (_detalhes.class_colors [self.classe]) end - + local combat = instancia:GetShowingCombat() local enemy_name = self:name() - + --> enemy damage taken local i = 1 local damage_taken = 0 @@ -2152,7 +2165,9 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) _detalhes:AddTooltipSpellHeaderText (Loc ["STRING_DAMAGE_TAKEN_FROM"], headerColor, r, g, b, i-1) GameCooltip:AddIcon ([[Interface\Buttons\UI-MicroStream-Red]], 1, 1, 14, 14, 0.1875, 0.8125, 0.15625, 0.78125) GameCooltip:AddIcon ([[Interface\AddOns\Details\images\key_shift]], 1, 2, _detalhes.tooltip_key_size_width, _detalhes.tooltip_key_size_height, 0, 1, 0, 0.640625, _detalhes.tooltip_key_overlay2) - GameCooltip:AddStatusBar (100, 1, 0.7, g, b, 1) + + --GameCooltip:AddStatusBar (100, 1, 0.7, g, b, 1) + _detalhes:AddTooltipHeaderStatusbar (1, 1, 1, 0.5) --> build the tooltip @@ -2181,18 +2196,19 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) local r, g, b = unpack (_detalhes.class_colors [classe]) GameCooltip:AddStatusBar (total/top*100, 1, r, g, b, 1, false, enemies_background) - GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity") - --_detalhes:AddTooltipBackgroundStatusbar() end + GameCooltip:SetOption ("StatusBarTexture", "Interface\\AddOns\\Details\\images\\bar_serenity") + --> damage done and heal GameCooltip:AddLine (" ") GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_DAMAGE_DONE"], FormatTooltipNumber (_, _math_floor (self.total))) local half = 0.00048828125 GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.005859375 + half, 0.025390625 - half, 0.3623046875, 0.3818359375) - _detalhes:AddTooltipBackgroundStatusbar() + --_detalhes:AddTooltipBackgroundStatusbar() + GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background) local heal_actor = instancia.showing (2, self.nome) if (heal_actor) then @@ -2201,15 +2217,16 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) GameCooltip:AddLine (Loc ["STRING_ATTRIBUTE_HEAL_DONE"], 0) end GameCooltip:AddIcon (instancia:GetSkinTexture(), 1, 1, 14, 14, 0.037109375 + half, 0.056640625 - half, 0.3623046875, 0.3818359375) - _detalhes:AddTooltipBackgroundStatusbar() + --_detalhes:AddTooltipBackgroundStatusbar() + GameCooltip:AddStatusBar (0, 1, r, g, b, 1, false, enemies_background) --> enemy description if (instancia.sub_atributo == 6) then GameCooltip:AddLine (" ") GameCooltip:AddLine (Loc ["STRING_LEFTCLICK_DAMAGETAKEN"]) - GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.7) + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.4) GameCooltip:AddLine (Loc ["STRING_MIDDLECLICK_DAMAGETAKEN"]) - GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.7) + GameCooltip:AddStatusBar (100, 1, 0, 0, 0, 0.4) end --> clean up @@ -2219,6 +2236,8 @@ function atributo_damage:ToolTip_Enemies (instancia, numero, barra, keydown) t[1] = 0 end + GameCooltip:SetOption ("YSpacingMod", -1) + return true end @@ -2301,6 +2320,9 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) end end + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + for i = 1, max do local aggressor = meus_agressores[i][4] @@ -2318,7 +2340,7 @@ function atributo_damage:ToolTip_DamageTaken (instancia, numero, barra, keydown) for _, spell in _ipairs (all_spells) do local spellname, _, spellicon = _GetSpellInfo (spell [1]) GameCooltip:AddLine (spellname .. " (|cFFFFFF00" .. spell [3] .. "|r): ", FormatTooltipNumber (_, spell [2]).." (" .. _cstr ("%.1f", (spell [2] / damage_taken) * 100).."%)") - GameCooltip:AddIcon (spellicon, 1, 1, 14, 14) + GameCooltip:AddIcon (spellicon, 1, 1, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end @@ -2463,10 +2485,13 @@ function atributo_damage:ToolTip_FriendlyFire (instancia, numero, barra, keydown max_abilities2 = 99 end + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + for i = 1, _math_min (max_abilities2, #Skills) do local nome, _, icone = _GetSpellInfo (Skills[i][1]) GameCooltip:AddLine (nome .. ": ", FormatTooltipNumber (_, Skills[i][2]).." (".._cstr("%.1f", Skills[i][2]/FriendlyFireTotal*100).."%)") - GameCooltip:AddIcon (icone, nil, nil, 14, 14) + GameCooltip:AddIcon (icone, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end @@ -2730,6 +2755,9 @@ end if (texCoords) then row.icone:SetTexCoord (unpack (texCoords)) + else + local icon_border = _detalhes.tooltip.icon_border_texcoord + row.icone:SetTexCoord (icon_border.L, icon_border.R, icon_border.T, icon_border.B) end row.minha_tabela = self diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 7df616df..1f508543 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -989,8 +989,10 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown max = 99 end - for o = 1, math.min (i, max) do + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + for o = 1, math.min (i, max) do local spell = energy_tooltips_table [o] if (spell [2] < 1) then @@ -999,9 +1001,8 @@ function atributo_energy:ToolTipRegenRecebido (instancia, numero, barra, keydown local nome_magia, _, icone_magia = _GetSpellInfo (spell [1]) GameCooltip:AddLine (nome_magia..": ", FormatTooltipNumber (_, spell [2]).." (".._cstr("%.1f", (spell [2]/total_regenerado) * 100).."%)") - GameCooltip:AddIcon (icone_magia) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() - end --> players diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 7d58bbc5..9d024712 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -1183,6 +1183,9 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) tooltip_max_abilities = 99 end + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + for i = 1, _math_min (tooltip_max_abilities, #ActorHealingTable) do if (ActorHealingTable[i][2] < 1) then break @@ -1196,7 +1199,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) else GameCooltip:AddLine (ActorHealingTable[i][4][1]..": ", FormatTooltipNumber (_, ActorHealingTable[i][2]).." (".._cstr ("%.1f", ActorHealingTable[i][3]).."%)") end - GameCooltip:AddIcon (ActorHealingTable[i][4][3], nil, nil, 14, 14) + GameCooltip:AddIcon (ActorHealingTable[i][4][3], nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end @@ -1353,6 +1356,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) end --> absorbs vs heal + --[=[ if (instancia.sub_atributo == 1 or instancia.sub_atributo == 2) then local total_healed = self.total - self.totalabsorb local total_previned = self.totalabsorb @@ -1391,6 +1395,7 @@ function atributo_heal:ToolTip_HealingDone (instancia, numero, barra, keydown) GameCooltip:AddIcon ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 1, 2, 14, 14, 1, 0, 0, 1) end end + --]=] return true end diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 62abe81e..10d379b3 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -1057,7 +1057,7 @@ end --------------------------------------------- // TOOLTIPS // --------------------------------------------- ----------> TOOLTIPS BIFURCAÇÃO +---------> TOOLTIPS BIFURCAÇÃO ~tooltip function atributo_misc:ToolTip (instancia, numero, barra, keydown) --> seria possivel aqui colocar o icone da classe dele? GameTooltip:ClearLines() @@ -1105,7 +1105,9 @@ function atributo_misc:ToolTipCC (instancia, numero, barra) local habilidades = self.cc_break_spells._ActorTable --> habilidade usada para tirar o CC - + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + for _spellid, _tabela in _pairs (habilidades) do --> quantidade @@ -1120,7 +1122,7 @@ function atributo_misc:ToolTipCC (instancia, numero, barra) local nome_magia, _, icone_magia = _GetSpellInfo (spellid_quebrada) GameCooltip:AddLine (nome_magia..": ", amt_quebrada) GameCooltip:AddIcon ([[Interface\Buttons\UI-GroupLoot-Pass-Down]], nil, 1, 14, 14) - GameCooltip:AddIcon (icone_magia, nil, 2, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, 2, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) GameCooltip:AddStatusBar (100, 1, 1, 0, 0, .2) end @@ -1171,12 +1173,15 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) GameCooltip:AddIcon ([[Interface\ICONS\Spell_Arcane_ArcaneTorrent]], 1, 1, 14, 14, 0.078125, 0.9375, 0.078125, 0.953125) _detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha) + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + if (#meus_dispells > 0) then for i = 1, _math_min (25, #meus_dispells) do local esta_habilidade = meus_dispells[i] local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)") - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end else @@ -1200,7 +1205,7 @@ function atributo_misc:ToolTipDispell (instancia, numero, barra) local esta_habilidade = buffs_dispelados[i] local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)") - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end end @@ -1684,6 +1689,9 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra) GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125) _detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha) + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + if (#debuffs_usados > 0) then for i = 1, _math_min (30, #debuffs_usados) do local esta_habilidade = debuffs_usados[i] @@ -1703,7 +1711,7 @@ function atributo_misc:ToolTipDebuffUptime (instancia, numero, barra) _detalhes:AddTooltipBackgroundStatusbar() end - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875 + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) end end else @@ -1741,11 +1749,16 @@ function atributo_misc:ToolTipBuffUptime (instancia, numero, barra) GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125) _detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha) + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + if (#buffs_usados > 0) then for i = 1, _math_min (30, #buffs_usados) do local esta_habilidade = buffs_usados[i] - if (esta_habilidade[2] > 0) then + local percent = esta_habilidade[2] / _combat_time * 100 + + if (esta_habilidade[2] > 0 and percent < 99.5) then local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) local minutos, segundos = _math_floor (esta_habilidade[2]/60), _math_floor (esta_habilidade[2]%60) @@ -1753,14 +1766,14 @@ function atributo_misc:ToolTipBuffUptime (instancia, numero, barra) --GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)", nil, "gray", "gray") --GameCooltip:AddStatusBar (100, nil, 1, 0, 1, .3, false) elseif (minutos > 0) then - GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)") + GameCooltip:AddLine (nome_magia..": ", minutos .. "m " .. segundos .. "s" .. " (" .. _cstr ("%.1f", percent) .. "%)") _detalhes:AddTooltipBackgroundStatusbar() else - GameCooltip:AddLine (nome_magia..": ", segundos .. "s" .. " (" .. _cstr ("%.1f", esta_habilidade[2] / _combat_time * 100) .. "%)") + GameCooltip:AddLine (nome_magia..": ", segundos .. "s" .. " (" .. _cstr ("%.1f", percent) .. "%)") _detalhes:AddTooltipBackgroundStatusbar() end - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875 + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) end end else @@ -1795,12 +1808,15 @@ function atributo_misc:ToolTipDefensiveCooldowns (instancia, numero, barra) GameCooltip:AddIcon ([[Interface\ICONS\Ability_Warrior_Safeguard]], 1, 1, 14, 14, 0.9375, 0.078125, 0.078125, 0.953125) _detalhes:AddTooltipHeaderStatusbar (r, g, b, barAlha) + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + if (#cooldowns_usados > 0) then for i = 1, _math_min (25, #cooldowns_usados) do local esta_habilidade = cooldowns_usados[i] local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)") - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) --0.03125, 0.96875, 0.03125, 0.96875 + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end else @@ -1935,6 +1951,9 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra) local meu_total = self ["interrupt"] local minha_tabela = self.interrupt_spells._ActorTable + local icon_size = _detalhes.tooltip.icon_size + local icon_border = _detalhes.tooltip.icon_border_texcoord + --> habilidade usada para interromper local meus_interrupts = {} @@ -1952,7 +1971,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra) local esta_habilidade = meus_interrupts[i] local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)") - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end else @@ -1976,7 +1995,7 @@ function atributo_misc:ToolTipInterrupt (instancia, numero, barra) local esta_habilidade = habilidades_interrompidas[i] local nome_magia, _, icone_magia = _GetSpellInfo (esta_habilidade[1]) GameCooltip:AddLine (nome_magia..": ", esta_habilidade[2].." (".._cstr("%.1f", esta_habilidade[2]/meu_total*100).."%)") - GameCooltip:AddIcon (icone_magia, nil, nil, 14, 14) + GameCooltip:AddIcon (icone_magia, nil, nil, icon_size.W, icon_size.H, icon_border.L, icon_border.R, icon_border.T, icon_border.B) _detalhes:AddTooltipBackgroundStatusbar() end end diff --git a/functions/profiles.lua b/functions/profiles.lua index 20601254..a3929164 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -977,6 +977,9 @@ local default_profile = { menus_bg_coords = {331/512, 63/512, 109/512, 143/512}, menus_bg_color = {.8, .8, .8, 0.2}, menus_bg_texture = [[Interface\SPELLBOOK\Spellbook-Page-1]], + + icon_border_texcoord = {L = 5/64, R = 59/64, T = 5/64, B = 59/64}, + icon_size = {W = 13, H = 13} }, } diff --git a/functions/skins.lua b/functions/skins.lua index 4ce5a537..7e8a6b98 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -1171,7 +1171,7 @@ local _ 0, 0, }, - ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha", + ["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha", ["textL_show_number"] = true, ["texture"] = "Skyline", ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4", @@ -1455,7 +1455,6 @@ local _ ["side"] = 2, }, ["bg_r"] = 0.3294, - ["skin"] = "ElvUI Frame Style", ["following"] = { ["bar_color"] = { 1, -- [1] @@ -1497,7 +1496,7 @@ local _ }, ["row_info"] = { ["textR_outline"] = false, - ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha", + ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal", ["textL_outline"] = false, ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", ["textR_show_data"] = { @@ -1700,7 +1699,7 @@ local _ ["textR_outline"] = false, ["textL_outline"] = false, ["textL_enable_custom_text"] = false, - ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha", + ["icon_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal", ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\BantoBar", ["start_after_icon"] = false, ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 53a9243c..5ba426c4 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -868,6 +868,9 @@ local default_skin = function() window.close_button:SetHeight (32) window.close_button:SetPoint ("TOPRIGHT", window, "TOPRIGHT", 5, -8) + window.options_button:SetPoint ("topright", window, "topright", -26, -16) + window.options_button:SetSize (16, 16) + window.avatar:SetParent (window) _detalhes:SetPDWBarConfig ("Skyline") @@ -926,6 +929,9 @@ local elvui_skin = function() window.close_button:SetHeight (20) window.close_button:SetPoint ("TOPRIGHT", window, "TOPRIGHT", 0, -3) + window.options_button:SetPoint ("topright", window, "topright", -17, -7) + window.options_button:SetSize (12, 12) + window.avatar:SetParent (titlebar) end _detalhes:InstallPDWSkin ("ElvUI", {func = elvui_skin, author = "Details! Team", version = "v1.0", desc = "Skin compatible with ElvUI addon."}) @@ -1070,6 +1076,17 @@ function gump:CriaJanelaInfo() este_gump.no_targets.text:SetTextColor (1, 1, 1, .4) este_gump.no_targets:Hide() + --> botão de opções + local open_options = function() + _detalhes:OpenOptionsWindow (info.instancia, false, 6) + _detalhes:OpenOptionsWindow (info.instancia, false, 6) + end + este_gump.options_button = gump:CreateButton (este_gump, open_options, 16, 16, nil, nil, nil, [[Interface\Buttons\UI-OptionsButton]]) + este_gump.options_button:SetPoint ("topright", este_gump, "topright", -26, -16) + este_gump.options_button:SetAlpha (0.5) + este_gump.options_button.button:GetNormalTexture():SetDesaturated (true) + este_gump.options_button.tooltip = "Select Skin" + --> titulo gump:NewLabel (este_gump, este_gump, nil, "title_string", Loc ["STRING_PLAYER_DETAILS"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) este_gump.title_string:SetPoint ("center", este_gump, "center") diff --git a/gumps/switch.lua b/gumps/switch.lua index e0b0c7d4..d41e22af 100644 --- a/gumps/switch.lua +++ b/gumps/switch.lua @@ -704,10 +704,11 @@ function _detalhes.switch:OnRemoveCustom (CustomIndex) end end -local default_coords = {0, 1, 0, 1} +local default_coords = {5/64, 59/64, 5/64, 59/64} local unknown_coords = {157/512, 206/512, 39/512, 89/512} local vertex_color_default = {1, 1, 1} local vertex_color_unknown = {1, 1, 1} +local add_coords = {464/512, 473/512, 1/512, 11/512} function _detalhes.switch:Update() @@ -746,16 +747,17 @@ function _detalhes.switch:Update() local coords local name local vcolor + local add if (options and options.sub_atributo) then if (options.atributo == 5) then --> custom local CustomObject = _detalhes.custom [options.sub_atributo] if (not CustomObject) then --> ele já foi deletado - --icone = "Interface\\ICONS\\Ability_DualWield" icone = [[Interface\AddOns\Details\images\icons]] - coords = unknown_coords + coords = add_coords name = Loc ["STRING_SWITCH_CLICKME"] vcolor = vertex_color_unknown + add = true else icone = CustomObject.icon coords = default_coords @@ -769,12 +771,12 @@ function _detalhes.switch:Update() vcolor = vertex_color_default end else + icone = [[Interface\AddOns\Details\images\icons]] - icone = [[Interface\Buttons\UI-AttributeButton-Encourage-Up]] - coords = unknown_coords - coords = {0, 1, 0, 1} + coords = add_coords name = Loc ["STRING_SWITCH_CLICKME"] vcolor = vertex_color_unknown + add = true end button:Show() @@ -794,6 +796,12 @@ function _detalhes.switch:Update() button.textureH:SetTexCoord (_unpack (coords)) button:ChangeIcon (button.textureNormal, button.texturePushed, nil, button.textureH) + if (add) then + button:SetSize (12, 12) + else + button:SetSize (15, 15) + end + if (name == Loc ["STRING_SWITCH_CLICKME"]) then --button.button2.texto:SetTextColor (.3, .3, .3, 1) button:SetAlpha (0.3) @@ -825,7 +833,7 @@ scroll.ScrollBar.ScrollDownButton:Hide() function _detalhes.switch:Resize (precisa_mostrar) - local x = 7 + local x, x_original = 5, 5 local y = 5 local y_increment = 20 @@ -854,7 +862,7 @@ function _detalhes.switch:Resize (precisa_mostrar) local i = 1 for vertical = 1, vertical_amt do - x = 7 + x = x_original for horizontal = 1, horizontal_amt do local button = _detalhes.switch.buttons [i] @@ -959,6 +967,9 @@ local onenter = function (self) self.texto:SetTextColor (1, 1, 1, 1) self.border:SetBlendMode ("ADD") + + self.button1_icon:SetBlendMode ("ADD") + end local onleave = function (self) @@ -967,6 +978,7 @@ local onleave = function (self) end self.texto:SetTextColor (.8, .8, .8, 1) self.border:SetBlendMode ("BLEND") + self.button1_icon:SetBlendMode ("BLEND") end local oniconenter = function (self) @@ -1059,7 +1071,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton) --borda button.fundo = button:CreateTexture (nil, "overlay") - button.fundo:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts") + --button.fundo:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts") button.fundo:SetTexCoord (0.00390625, 0.27734375, 0.44140625,0.69531250) button.fundo:SetWidth (26) button.fundo:SetHeight (24) @@ -1072,7 +1084,7 @@ function _detalhes.switch:NewSwitchButton (frame, index, x, y, rightButton) button.line:SetTexture ("Interface\\SPELLBOOK\\Spellbook-Parts") button.line:SetTexCoord (0.31250000, 0.96484375, 0.37109375, 0.52343750) button.line:SetWidth (85) - button.line:SetPoint ("topleft", button, "topright", fundo_x, 0) + button.line:SetPoint ("topleft", button, "topright", fundo_x-14, 0) button.line:SetPoint ("bottomleft", button, "bottomright", fundo_x, fundo_y) --fundo marrom 2