From 714daf6a99eb2aed91973594538b5c1049573bb2 Mon Sep 17 00:00:00 2001 From: tercio Date: Wed, 10 Sep 2014 22:55:34 -0300 Subject: [PATCH] - Changed few icons on damage done tooltip. - Fixed the class color on texts for healing attribute. - Added options for change the tooltip border's size, color and texture. - Added buttons for test interrupt and cooldown announcers under raid tools section. - New API: _detalhes:SetTooltipBackdrop (border_texture, border_size, border_color) set tooltip border configs. --- boot.lua | 27 ++++++-- classes/classe_damage.lua | 10 +-- classes/classe_heal.lua | 12 ++-- core/control.lua | 5 +- core/plugins_raid.lua | 3 + framework/cooltip.lua | 52 +++++++++++++-- framework/framework.lua | 13 ++++ functions/profiles.lua | 7 +++ functions/skins.lua | 39 ++++++++++-- gumps/janela_options.lua | 126 ++++++++++++++++++++++++++++++++----- gumps/janela_principal.lua | 45 ++++++++++++- gumps/janela_welcome.lua | 2 +- 12 files changed, 296 insertions(+), 45 deletions(-) diff --git a/boot.lua b/boot.lua index 438c7884..fcd0df00 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 70 --it's 70 for release - _detalhes.userversion = "v1.25.1" + _detalhes.build_counter = 70 --it's 73 for release + _detalhes.userversion = "v1.26.0" _detalhes.realversion = 28 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -18,11 +18,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ - - +|cFFFFFF00v1.26.0 (|cFFFFCC00Set 10, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n +|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n +|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n +|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.26.0 (|cFFFFCC00Set 10, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00v1.18.4 - v1.18.5 - v1.18.6 (|cFFFFCC00Jul 13, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option to customize the bar left text.\n\n|cFFFFFF00-|r Added option for show or hide bar placement number.\n\n|cFFFFFF00-|r Spell icon is shown in the bar when the enemy character is a environment spell type.\n\n|cFFFFFF00-|r Changed the non-player enemy icon (monsters).\n\n|cFFFFFF00-|r Fixed bug on flex performance profile |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added new version tracker which should alert you when a newer Details! version is found.\n\n|cFFFFFF00-|r Added Enemy Damage Taken by clicking with middle mouse button over a enemy bar (enemies display).\n\n|cFFFFFF00-|r Added import/export for saved skins and custom displays created.\n\n|cFFFFFF00-|r Small changes on ElvUI Frame Style skin (need reaply).\n\n|cFFFFFF00-|r Fixed the death recognition for bosses, now it should show the correct color over segments menu.\n\n|cFFFFFF00-|r Fixed Dps inacuracy when plyaing solo (no party or raid group).\n\n|cFFFFFF00-|r Fixed the duration time of buffs applied before the pull, like pre-potions.\n\n|cFFFFFF00v1.17.5 (|cFFFFCC00Jun 30, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Shortcut panel is now known as Bookmarks and a revamp has done on its panel.\n\n|cFFFFFF00-|r NickTag now doesnt check anymore if a received nickname from other guild member is invalid.\n\n|cFFFFFF00-|r Healthstone now is considered a cooldown.\n\n|cFFFFFF00-|r Few improvements on Default Skin, Minimalistic Skin and ElvUI Frame Style Skin.\n\n|cFFFFFF00-|r Revamp on Image Editor, many bugs solves and now it is usable." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup @@ -94,6 +97,20 @@ do end end + --> tooltip + _detalhes.tooltip_backdrop = { + bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], + edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], + tile = true, + edgeSize = 16, + tileSize = 16, + insets = {left = 3, right = 3, top = 4, bottom = 4} + } + _detalhes.tooltip_border_color = {1, 1, 1, 1} + _detalhes.tooltip_spell_icon = {file = [[Interface\CHARACTERFRAME\UI-StateIcon]], coords = {36/64, 58/64, 7/64, 26/64}} + --_detalhes.tooltip_target_icon = {file = [[Interface\CHARACTERFRAME\UI-StateIcon]], coords = {36/64, 58/64, 7/64, 26/64}} + + --> Plugins --> raid ------------------------------------------------------------------- --> general function for raid mode plugins diff --git a/classes/classe_damage.lua b/classes/classe_damage.lua index 22b7028e..85b7fd52 100644 --- a/classes/classe_damage.lua +++ b/classes/classe_damage.lua @@ -1484,7 +1484,6 @@ end end --icon - if (self.spellicon) then esta_barra.icone_classe:SetTexture (self.spellicon) esta_barra.icone_classe:SetTexCoord (0.078125, 0.921875, 0.078125, 0.921875) @@ -1534,7 +1533,6 @@ end end --texture and text - local bar_number = "" if (instancia.row_info.textL_show_number) then bar_number = esta_barra.colocacao .. ". " @@ -1688,7 +1686,8 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) --> MOSTRA HABILIDADES _detalhes:AddTooltipSpellHeaderText (Loc ["STRING_SPELLS"], headerColor, r, g, b, #ActorSkillsSortTable) - GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875) + --GameCooltip:AddIcon ([[Interface\ICONS\Spell_Shaman_BlessingOfTheEternals]], 1, 1, 14, 14, 0.90625, 0.109375, 0.15625, 0.875) + GameCooltip:AddIcon (_detalhes.tooltip_spell_icon.file, 1, 1, 14, 14, unpack (_detalhes.tooltip_spell_icon.coords)) if (is_maximized) then --highlight shift key @@ -1742,7 +1741,10 @@ function atributo_damage:ToolTip_DamageDone (instancia, numero, barra, keydown) for i = 1, _math_min (max_targets, #ActorTargetsSortTable) do local este_inimigo = ActorTargetsSortTable [i] GameCooltip:AddLine (este_inimigo[1]..": ", FormatTooltipNumber (_, este_inimigo[2]) .." (".._cstr("%.1f", este_inimigo[2]/ActorDamageWithPet*100).."%)") - GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14) + --GameCooltip:AddIcon ("Interface\\AddOns\\Details\\images\\espadas", nil, nil, 14, 14) + --GameCooltip:AddIcon ([[Interface\CHARACTERFRAME\UI-StateIcon]], nil, nil, 14, 14, 33/64, 61/64, 31/64, 60/64) + --GameCooltip:AddIcon ([[Interface\FriendsFrame\StatusIcon-Offline]], nil, nil, 14, 14, 0, 1, 0, 15/16) + GameCooltip:AddIcon ([[Interface\PetBattles\PetBattle-StatIcons]], nil, nil, 12, 12, 0, 0.5, 0, 0.5, {.7, .7, .7, 1}, nil, true) _detalhes:AddTooltipBackgroundStatusbar() end end diff --git a/classes/classe_heal.lua b/classes/classe_heal.lua index 7878f8e4..34d1bf06 100644 --- a/classes/classe_heal.lua +++ b/classes/classe_heal.lua @@ -1,8 +1,3 @@ ---[[ Esta classe irá abrigar todo a cura de uma habilidade -Parents: - addon -> combate atual -> cura -> container de jogadores -> esta classe - -]] --lua locals local _cstr = string.format @@ -836,6 +831,13 @@ function atributo_heal:RefreshBarra (esta_barra, instancia, from_resize) end end + if (instancia.row_info.textL_class_colors) then + esta_barra.texto_esquerdo:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) + end + if (instancia.row_info.textR_class_colors) then + esta_barra.texto_direita:SetTextColor (actor_class_color_r, actor_class_color_g, actor_class_color_b) + end + esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15) end diff --git a/core/control.lua b/core/control.lua index 6aafc001..11007d15 100644 --- a/core/control.lua +++ b/core/control.lua @@ -15,6 +15,7 @@ --> local pointers local _math_floor = math.floor --lua local + local _math_max = math.max --lua local local _ipairs = ipairs --lua local local _pairs = pairs --lua local local _table_wipe = table.wipe --lua local @@ -974,8 +975,10 @@ GameCooltip:SetOption ("LeftBorderSize", -5) GameCooltip:SetOption ("RightBorderSize", 5) - GameCooltip:SetOption ("MinWidth", 180) + GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.8)) GameCooltip:SetOption ("StatusBarTexture", [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]]) --[[Interface\Addons\Details\images\bar_flat]] + + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) local myPoint = _detalhes.tooltip.anchor_point local anchorPoint = _detalhes.tooltip.anchor_relative diff --git a/core/plugins_raid.lua b/core/plugins_raid.lua index deb004cf..14529756 100644 --- a/core/plugins_raid.lua +++ b/core/plugins_raid.lua @@ -257,6 +257,9 @@ elseif (channel == "WHISPER") then SendChatMessage (msg, channel, nil, towho) + elseif (channel == "PRINT") then + print (msg) + else SendChatMessage (msg, channel) diff --git a/framework/cooltip.lua b/framework/cooltip.lua index 7e4a7bc6..1897e53f 100644 --- a/framework/cooltip.lua +++ b/framework/cooltip.lua @@ -717,6 +717,8 @@ function DetailsCreateCoolTip() else menuButton.leftIcon:SetBlendMode ("BLEND") end + + menuButton.leftIcon:SetDesaturated (leftIconTable [9]) else menuButton.leftIcon:SetTexture (nil) menuButton.leftIcon:SetWidth (3) @@ -738,6 +740,8 @@ function DetailsCreateCoolTip() else menuButton.rightIcon:SetBlendMode ("BLEND") end + + menuButton.rightIcon:SetDesaturated (rightIconTable [9]) else menuButton.rightIcon:SetTexture (nil) menuButton.rightIcon:SetWidth (1) @@ -1703,6 +1707,13 @@ function DetailsCreateCoolTip() ---------------------------------------------------------------------- --> Reset cooltip + local default_backdrop = {bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile=[[Interface\Tooltips\UI-Tooltip-Border]], tile=true, + edgeSize=16, tileSize=16, insets = {left=3, right=3, top=4, bottom=4}} + local default_backdrop_color = {0.09019, 0.09019, 0.18823, 1} + local default_backdropborder_color = {1, 1, 1, 1} + + --borda preta sem usar unpack + --> wipe all data ~reset function CoolTip:Reset() @@ -1724,9 +1735,15 @@ function DetailsCreateCoolTip() CoolTip.overlap_checked = false CoolTip.frame2_leftside = nil + + frame1:SetBackdrop (default_backdrop) + frame1:SetBackdropColor (unpack (default_backdrop_color)) + frame1:SetBackdropBorderColor (unpack (default_backdropborder_color)) - --> - + frame2:SetBackdrop (default_backdrop) + frame2:SetBackdropColor (unpack (default_backdrop_color)) + frame2:SetBackdropBorderColor (unpack (default_backdropborder_color)) + --[ _table_wipe (CoolTip.LeftTextTable) _table_wipe (CoolTip.LeftTextTableSub) @@ -2124,6 +2141,29 @@ function DetailsCreateCoolTip() fontstring:Show() end + function CoolTip:SetBackdrop (index, backdrop, backdropcolor, bordercolor) + + local f + if (index == 1) then + f = frame1 + elseif (index == 2) then + f = frame2 + end + + if (backdrop) then + f:SetBackdrop (backdrop) + end + if (backdropcolor) then + local r, g, b, a = gump:ParseColors (backdropcolor) + f:SetBackdropColor (r, g, b, a) + end + if (bordercolor) then + local r, g, b, a = gump:ParseColors (bordercolor) + f:SetBackdropBorderColor (r, g, b, a) + end + + end + function CoolTip:SetBannerImage (index, texturepath, width, height, anchor, texcoord, overlay) local texture @@ -2177,10 +2217,10 @@ function DetailsCreateCoolTip() --> parameters: icon [, width [, height [, TexCoords L R T B ]]] --> texture support string path or texture object - function CoolTip:AddTexture (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point) - return CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point) + function CoolTip:AddTexture (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated) + return CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated) end - function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point) + function CoolTip:AddIcon (iconTexture, frame, side, iconWidth, iconHeight, L, R, T, B, overlayColor, point, desaturated) --> need a previous line if (CoolTip.Indexes == 0) then @@ -2235,6 +2275,7 @@ function DetailsCreateCoolTip() CoolTip.TopIconTableSub [CoolTip.Indexes] [6] = T or 0 CoolTip.TopIconTableSub [CoolTip.Indexes] [7] = B or 1 CoolTip.TopIconTableSub [CoolTip.Indexes] [8] = overlayColor or _default_color + CoolTip.TopIconTableSub [CoolTip.Indexes] [9] = desaturated return end @@ -2267,6 +2308,7 @@ function DetailsCreateCoolTip() iconTable [6] = T or 0 --> default 0 iconTable [7] = B or 1 --> default 1 iconTable [8] = overlayColor or _default_color --> default 1, 1, 1 + iconTable [9] = desaturated return true end diff --git a/framework/framework.lua b/framework/framework.lua index 5e93bb1d..908e1276 100644 --- a/framework/framework.lua +++ b/framework/framework.lua @@ -208,6 +208,19 @@ function gump:BuildMenu (parent, menu, x_offset, y_offset, height) if (size > max_x) then max_x = size end + + elseif (widget_table.type == "execute" or widget_table.type == "button") then + + local button = self:NewButton (parent, nil, "$parentWidget", nil, 120, 18, widget_table.func, widget_table.param1, widget_table.param2, nil, widget_table.name) + button:InstallCustomTexture() + button:SetPoint (cur_x, cur_y) + button.tooltip = widget_table.desc + + local size = button:GetWidth() + 4 + if (size > max_x) then + max_x = size + end + end cur_y = cur_y - 20 diff --git a/functions/profiles.lua b/functions/profiles.lua index 5949ac50..ae7ce1a9 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -423,6 +423,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) _detalhes.opened_windows = _detalhes.opened_windows + 1 end end + + --> update tooltip settings + _detalhes:SetTooltipBackdrop() --> end @@ -794,6 +797,10 @@ local default_profile = { anchor_point = "bottom", anchor_relative = "top", anchor_offset = {0, 0}, + + border_texture = "Blizzard Tooltip", + border_color = {1, 1, 1, 1}, + border_size = 16, }, } diff --git a/functions/skins.lua b/functions/skins.lua index b701e87c..6bfdbcbd 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -32,7 +32,12 @@ local _ function _detalhes:GetSkin (skin_name) return _detalhes.skins [skin_name] end - + + local reset_tooltip = function() + _detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {1, 1, 1, 1}) + _detalhes:DelayOptionsRefresh() + end + --> install default skins: _detalhes:InstallSkin ("Default Skin", { file = [[Interface\AddOns\Details\images\skins\default_skin]], @@ -98,8 +103,11 @@ local _ }, --close button closebutton_config = {size = {32, 32}}, - } + }, + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, + } }) _detalhes:InstallSkin ("Minimalistic", { @@ -160,6 +168,10 @@ local _ --none end, + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, + } + }) _detalhes:InstallSkin ("Minimalistic v2", { @@ -222,6 +234,10 @@ local _ --none end, + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, + } + }) _detalhes:InstallSkin ("Flat Color", { @@ -281,6 +297,10 @@ local _ show_statusbar = false, color = {1, 1, 1, 0.92}, bg_alpha = 0.40, + }, + + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, } }) @@ -359,6 +379,10 @@ local _ alpha = 0.4980392451398075, texture = "Interface\\Glues\\CREDITS\\Fellwood5", }, + }, + + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, } }) @@ -544,7 +568,10 @@ local _ end - + local set_tooltip_elvui = function() + _detalhes:SetTooltipBackdrop ("Blizzard Tooltip", 16, {0, 0, 0, 1}) + _detalhes:DelayOptionsRefresh() + end _detalhes:InstallSkin ("ElvUI Frame Style", { file = [[Interface\AddOns\Details\images\skins\elvui]], @@ -639,7 +666,8 @@ local _ }, skin_options = { - {type = "button", label = "", text = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]} + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]}, + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2"], func = set_tooltip_elvui, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2_DESC"]}, } }) @@ -784,7 +812,8 @@ local _ }, skin_options = { - {type = "button", label = "", text = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]} + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]}, + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2"], func = set_tooltip_elvui, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON2_DESC"]}, } }) diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 2f63dbbd..1bfa6638 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -1118,6 +1118,60 @@ function window:CreateFrame20() window:CreateLineBackground2 (frame20, "TooltipShowAmountSlider", "TooltipShowAmountLabel", Loc ["STRING_OPTIONS_TOOLTIPS_SHOWAMT_DESC"]) + --> border + --border anchor + g:NewLabel (frame20, _, "$parentTooltipsBorderAnchor", "TooltipsBorderAnchorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_ANCHOR_BORDER"], "GameFontNormal") + + --border texture + local onSelectTextureBackdrop = function (_, _, textureName) + _detalhes:SetTooltipBackdrop (textureName) + end + + local iconsize = {16, 16} + local buildTextureBackdropMenu = function() + local textures2 = SharedMedia:HashTable ("border") + local texTable2 = {} + for name, texturePath in pairs (textures2) do + texTable2 [#texTable2+1] = {value = name, label = name, onclick = onSelectTextureBackdrop, icon = [[Interface\DialogFrame\UI-DialogBox-Corner]], texcoord = {0.09375, 1, 0, 0.78}, iconsize = iconsize} + end + table.sort (texTable2, function (t1, t2) return t1.label < t2.label end) + return texTable2 + end + + g:NewLabel (frame20, _, "$parentBackdropBorderTextureLabel", "BackdropBorderTextureLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_TEXTURE"], "GameFontHighlightLeft") + local d = g:NewDropDown (frame20, _, "$parentBackdropBorderTextureDropdown", "BackdropBorderTextureDropdown", DROPDOWN_WIDTH, 20, buildTextureBackdropMenu, _detalhes.tooltip.border_texture) + d.onenter_backdrop = dropdown_backdrop_onenter + d.onleave_backdrop = dropdown_backdrop_onleave + d:SetBackdrop (dropdown_backdrop) + d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) + + frame20.BackdropBorderTextureDropdown:SetPoint ("left", frame20.BackdropBorderTextureLabel, "right", 2) + window:CreateLineBackground2 (frame20, "BackdropBorderTextureDropdown", "BackdropBorderTextureLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_TEXTURE_DESC"]) + + --border size + g:NewLabel (frame20, _, "$parentBackdropSizeLabel", "BackdropSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_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:SetThumbSize (50) + + frame20.BackdropSizeSlider:SetPoint ("left", frame20.BackdropSizeLabel, "right", 2) + frame20.BackdropSizeSlider:SetThumbSize (50) + frame20.BackdropSizeSlider:SetHook ("OnValueChange", function (_, _, amount) + _detalhes:SetTooltipBackdrop (nil, amount) + end) + window:CreateLineBackground2 (frame20, "BackdropSizeSlider", "BackdropSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_SIZE_DESC"]) + + --border color + local backdropcolor_callback = function (button, r, g, b, a) + _detalhes:SetTooltipBackdrop (nil, nil, {r, g, b, a}) + end + g:NewColorPickButton (frame20, "$parentBackdropColorPick", "BackdropColorPick", backdropcolor_callback) + g:NewLabel (frame20, _, "$parentBackdropColorLabel", "BackdropColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_COLOR"], "GameFontHighlightLeft") + frame20.BackdropColorPick:SetPoint ("left", frame20.BackdropColorLabel, "right", 2, 0) + + local background = window:CreateLineBackground2 (frame20, "BackdropColorPick", "BackdropColorLabel", Loc ["STRING_OPTIONS_TOOLTIPS_BORDER_COLOR_DESC"]) + --> tooltip anchors --unlock screen anchor @@ -1283,7 +1337,10 @@ function window:CreateFrame20() {"TooltipdpsAbbreviateLabel", 8}, {"TooltipMaximizeLabel", 9}, {"TooltipShowAmountLabel", 10}, - + {"TooltipsBorderAnchorLabel", 11, true}, + {"BackdropBorderTextureLabel", 12}, + {"BackdropSizeLabel", 13}, + {"BackdropColorLabel", 14}, } window:arrange_menu (frame20, left_side, x, -90) @@ -4289,7 +4346,7 @@ function window:CreateFrame3() --> extra Options g:NewLabel (frame3, _, "$parentSkinExtraOptionsAnchor", "SkinExtraOptionsAnchor", Loc ["STRING_OPTIONS_SKIN_EXTRA_OPTIONS_ANCHOR"], "GameFontNormal") - frame3.SkinExtraOptionsAnchor:Hide() + --frame3.SkinExtraOptionsAnchor:Hide() frame3.SkinExtraOptionsAnchor:SetPoint (window.right_start_at, -90) frame3.ExtraOptions = {} @@ -7066,6 +7123,22 @@ function window:CreateFrame11() reset_custom:GetNormalTexture():SetDesaturated (true) reset_custom.tooltip = "Reset to Default" + local test_custom_text = g:NewButton (frame11.InterruptsCustomEntry, _, "$parentTestCustomPhraseButton", "TestCustomPhraseButton", 16, 16, function() + local text = frame11.InterruptsCustomEntry.text + + local channel = _detalhes.announce_interrupts.channel + _detalhes.announce_interrupts.channel = "PRINT" + _detalhes:interrupt_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "A Monster", nil, 1766, "Kick", nil, 106523, "Cataclysm", nil) + _detalhes.announce_interrupts.channel = channel + + end) + test_custom_text:SetPoint ("left", reset_custom, "right", 0, 0) + test_custom_text:SetNormalTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:SetHighlightTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:SetPushedTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:GetNormalTexture():SetDesaturated (true) + test_custom_text.tooltip = "Click to test!" + --cooldowns g:NewLabel (frame11, _, "$parentEnableCooldownsLabel", "EnableCooldownsLabel", Loc ["STRING_OPTIONS_RT_COOLDOWNS_ONOFF"], "GameFontHighlightLeft") @@ -7128,6 +7201,22 @@ function window:CreateFrame11() reset_custom:SetPushedTexture ([[Interface\Glues\LOGIN\Glues-CheckBox-Check]] or [[Interface\Buttons\UI-GroupLoot-Pass-Up]]) reset_custom:GetNormalTexture():SetDesaturated (true) reset_custom.tooltip = "Reset to Default" + + local test_custom_text = g:NewButton (frame11.CooldownCustomEntry, _, "$parentTestCustomPhraseButton", "TestCustomPhraseButton", 16, 16, function() + local text = frame11.CooldownCustomEntry.text + + local channel = _detalhes.announce_cooldowns.channel + _detalhes.announce_cooldowns.channel = "PRINT" + _detalhes:cooldown_announcer (nil, nil, nil, _detalhes.playername, nil, nil, "Tyrande Whisperwind", nil, 47788, "Guardian Spirit") + _detalhes.announce_cooldowns.channel = channel + + end) + test_custom_text:SetPoint ("left", reset_custom, "right", 0, 0) + test_custom_text:SetNormalTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:SetHighlightTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:SetPushedTexture ([[Interface\CHATFRAME\ChatFrameExpandArrow]]) + test_custom_text:GetNormalTexture():SetDesaturated (true) + test_custom_text.tooltip = "Click to test!" --esquema para ativar ou desativar certos cooldowns --botão que abre um gump estilo welcome, com as spells pegas na lista de cooldowns @@ -7225,7 +7314,7 @@ function window:CreateFrame11() end DetailsAnnounceSelectCooldownIgnored:Open() - + end, nil, nil, nil, Loc ["STRING_OPTIONS_RT_COOLDOWNS_SELECT"], 1) frame11.CooldownIgnoreButton:InstallCustomTexture() @@ -7252,7 +7341,7 @@ 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, 3, 1, _detalhes.announce_deaths.last_hits) + 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:SetThumbSize (50) @@ -7779,14 +7868,23 @@ function window:update_all (editing_instance) t[2]:Hide() end end - frame3.SkinExtraOptionsAnchor:Hide() + + for _, frame in pairs (frame3.ExtraOptions) do + frame:Hide() + end --> create or show options if necessary if (skin_object.skin_options and not skin_object.options_created) then skin_object.options_created = true - frame3.ExtraOptions [skin_name_formated] = {} + local f = CreateFrame ("frame", "DetailsSkinOptions" .. skin_name_formated, frame3) + frame3.ExtraOptions [skin_name_formated] = f + f:SetPoint ("topleft", frame3, "topleft", window.right_start_at, window.top_start_at + (25 * -1)) + f:SetSize (250, 400) + + g:BuildMenu (f, skin_object.skin_options, 0, 0, 400) + --[[ for index, widget in ipairs (skin_object.skin_options) do local type = widget.type @@ -7807,13 +7905,10 @@ function window:update_all (editing_instance) end frame3.SkinExtraOptionsAnchor:Show() + --]] elseif (skin_object.skin_options) then - for index, t in ipairs (frame3.ExtraOptions [skin_name_formated]) do - t[1]:Show() - t[2]:Show() - end - frame3.SkinExtraOptionsAnchor:Show() + frame3.ExtraOptions [skin_name_formated]:Show() end --> window 4 @@ -8161,16 +8256,15 @@ function window:update_all (editing_instance) _G.DetailsOptionsWindow20TooltipOffsetXSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[1]) _G.DetailsOptionsWindow20TooltipOffsetYSlider.MyObject:SetValue (_detalhes.tooltip.anchor_offset[2]) + _G.DetailsOptionsWindow20BackdropBorderTextureDropdown.MyObject:Select (_detalhes.tooltip.border_texture) + _G.DetailsOptionsWindow20BackdropSizeHeight.MyObject:SetValue (_detalhes.tooltip.border_size) + _G.DetailsOptionsWindow20BackdropColorPick.MyObject:SetColor (unpack (_detalhes.tooltip.border_color)) + ---------- - - - _G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetFixedParameter (editing_instance) _G.DetailsOptionsWindow6SideBarsSlider.MyObject:SetValue (editing_instance.show_sidebars) - - _G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetFixedParameter (editing_instance) _G.DetailsOptionsWindow6StatusbarSlider.MyObject:SetValue (editing_instance.show_statusbar) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index e8e010c4..8f056acb 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -1217,6 +1217,7 @@ local resize_scripts_onenter = function (self) GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) GameCooltip:SetOption ("NoLastSelectedBar", true) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) GameCooltip:SetOwner (self) GameCooltip:ShowCooltip() end @@ -1266,6 +1267,7 @@ local lockFunctionOnEnter = function (self) GameCooltip:SetOption ("NoLastSelectedBar", true) GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) GameCooltip:SetOwner (self) GameCooltip:ShowCooltip() end @@ -1349,6 +1351,7 @@ local unSnapButtonOnEnter = function (self) GameCooltip:AddFromTable (unSnapButtonTooltip) GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) GameCooltip:ShowCooltip (self, "tooltip") end @@ -4239,6 +4242,7 @@ local build_mode_list = function (self, elapsed) --CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3}) CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) show_anti_overlap (instancia, self, "top") @@ -4539,6 +4543,8 @@ local build_segment_list = function (self, elapsed) --CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3}) CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) + CoolTip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) show_anti_overlap (instancia, self, "top") @@ -5711,6 +5717,31 @@ function _detalhes:ShowStatusBar (instancia) end end +function _detalhes:SetTooltipBackdrop (border_texture, border_size, border_color) + + if (not border_texture) then + border_texture = _detalhes.tooltip.border_texture + end + if (not border_size) then + border_size = _detalhes.tooltip.border_size + end + if (not border_color) then + border_color = _detalhes.tooltip.border_color + end + + _detalhes.tooltip.border_texture = border_texture + _detalhes.tooltip.border_size = border_size + + local c = _detalhes.tooltip.border_color + local cc = _detalhes.tooltip_border_color + c[1], c[2], c[3], c[4] = border_color[1], border_color[2], border_color[3], border_color[4] or 1 + cc[1], cc[2], cc[3], cc[4] = border_color[1], border_color[2], border_color[3], border_color[4] or 1 + + _detalhes.tooltip_backdrop.edgeFile = SharedMedia:Fetch ("border", border_texture) + _detalhes.tooltip_backdrop.edgeSize = border_size + +end + --> reset button functions local reset_button_onenter = function (self) @@ -5735,6 +5766,7 @@ end GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) show_anti_overlap (self.instance, self, "top") @@ -5806,7 +5838,8 @@ end GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) GameCooltip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) + GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) show_anti_overlap (self.instance, self, "top") @@ -6189,7 +6222,7 @@ function gump:CriaCabecalho (baseframe, instancia) --> First we declare the function which will build the menu local BuildAttributeMenu = function() if (_detalhes.solo and _detalhes.solo == instancia.meu_id) then - return _detalhes:MontaSoloOption (instancia) + _detalhes:MontaSoloOption (instancia) elseif (instancia:IsRaidMode()) then local have_plugins = _detalhes:MontaRaidOption (instancia) if (not have_plugins) then @@ -6203,8 +6236,11 @@ function gump:CriaCabecalho (baseframe, instancia) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) end else - return _detalhes:MontaAtributosOption (instancia) + _detalhes:MontaAtributosOption (instancia) end + + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) + GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) end --> Now we create a table with some parameters @@ -6270,6 +6306,7 @@ function gump:CriaCabecalho (baseframe, instancia) GameCooltip:AddMenu (1, _detalhes.Reportar, instancia) GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) show_anti_overlap (instancia, self, "top") @@ -6400,6 +6437,8 @@ function gump:CriaCabecalho (baseframe, instancia) end GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) + GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) return ClosedInstances end diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index cd0242a4..08a46794 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -26,7 +26,7 @@ function _detalhes:OpenWelcomeWindow () window:SetScript ("OnHide", function() --> start tutorial if this is first run if (_detalhes.tutorial.logons < 2 and _detalhes.is_first_run) then - _detalhes:StartTutorial() + --_detalhes:StartTutorial() end _detalhes.tabela_historico:resetar() end)