diff --git a/boot.lua b/boot.lua index 0c9ba6e0..9b55800f 100644 --- a/boot.lua +++ b/boot.lua @@ -3,7 +3,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 4919 + _detalhes.build_counter = 5101 _detalhes.userversion = "v7.3.0." .. _detalhes.build_counter _detalhes.realversion = 128 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -21,17 +21,14 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v7.3.2.4919.128 (|cFFFFCC00Dez 08th, 2017|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Fixed an issue with the statistics sharing among guild members.\n\n -|cFFFFFF00-|r Fixed an issue with Argus encounter where two segments were created.\n\n -|cFFFFFF00-|r Fixed aura type images on the Create Aura Panel.\n\n -|cFFFFFF00-|r Create Aura Panel can now be closed with Right Click.\n\n -|cFFFFFF00-|r Framework updated to r60, plugins should be more stable now.\n\n +|cFFFFFF00v7.3.2.5101.128 (|cFFFFCC00Dec 15th, 2017|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Moving the custom display window to the new plugins window.\n\n +|cFFFFFF00-|r Major layout changes on the Encounter Details plugin window.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.3.2.4919.128 (|cFFFFCC00Dez 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the statistics sharing among guild members.\n\n|cFFFFFF00-|r Fixed an issue with Argus encounter where two segments were created.\n\n|cFFFFFF00-|r Fixed aura type images on the Create Aura Panel.\n\n|cFFFFFF00-|r Create Aura Panel can now be closed with Right Click.\n\n|cFFFFFF00-|r Framework updated to r60, plugins should be more stable now.\n\n|cFFFFFF00v7.3.0.4830.126 (|cFFFFFF00v7.3.2.4836.126 (|cFFFFCC00Nov 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed some tutorial windows popups.\n\n|cFFFFCC00Oct 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed opening windows when streamer settings > no alerts is enabled.\n\n|cFFFFFF00v7.3.0.4823.126 (|cFFFFCC00Oct 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new options section: Streamer Settings, focused on adjustments for streamers and youtubers.\n\n|cFFFFFF00-|r Animations now always run at the same speed regardless the framerate.\n\n|cFFFFFF00-|r Click-To-Open menus now close the menu if the menu is already open.\n\n|cFFFFFF00v7.3.0.4723.126 (|cFFFFCC00Set 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed overall dungeon segments being added to overall data.\n\n|cFFFFFF00v7.3.0.4705.126 (|cFFFFCC00Set 19th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage taken tooltip for Brewmaster Monk where sometimes the tooltip didn't open.\n\n|cFFFFFF00-|r Fixed overall data on mythic dungeon not adding trash segments even with the option enabled on the options panel.\n\n|cFFFFFF00-|r Fixed the guild selection dropdown reseting everytime the Guild Rank window is opened.\n\n|cFFFFFF00v7.3.0.4677.126 (|cFFFFCC00Set 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r During mythic dungeons, the trash segments will be merged into a new segment at the end of the boss encounter (instead of merging on the fly while cleaning up).\n\n|cFFFFFF00v7.3.0.4615.125 (|cFFFFCC00Set 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Setting up the dungeon stuff as opt-in for early adopters while we continue to make improvements on the system.\n\n|cFFFFFF00v7.3.0.4586.125 (|cFFFFCC00Set 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Formating mythic+ dungeon segments, each segment should count the boss trash + boss fight.\n\n|cFFFFFF00-|r At the end of the mythic+ dungeon, it should create a new segment adding up all segments described above.\n\n|cFFFFFF00v7.3.0.4499.124 (|cFFFFCC00Set 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to always show all players when using the standard mode. Option under PvP/PvE bracket on the options panel.\n\n|cFFFFFF00-|r Added a setting to exclude healing done lines from the death log below a certain healing amount. This options is also under PvP/PvE bracket.\n\n|cFFFFFF00-|r Fixed the guild selection on the ranking panel.\n\n|cFFFFFF00v7.3.0.4467.124 (|cFFFFCC00August 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Damage or Healing record for the encounter should be printed on chat on the boss pull.\nUse /run Details.announce_damagerecord.enabled = false; to disable.\n\n|cFFFFFF00v7.2.5.4437.124 (|cFFFFCC00August 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added healing done cap for death log. Use /run Details.deathlog_healingdone_min = 10000\n\n|cFFFFFF00-|r Fixed an issue where the alpha from the fixed bar color was used even when this option was disabled.\n\n|cFFFFFF00v7.2.5.4436.124 (|cFFFFCC00August 17th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix the issue where the window doesn't update after entering a raid or reseting data.\n\n|cFFFFFF00v7.2.5.4434.124 (|cFFFFCC00August 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to create an aura at Aura tab on the Player Details window.\n\n|cFFFFFF00-|r Fixes and improvements on the damage rank panel.\n\n|cFFFFFF00-|r Best damage or healing for the player on the current boss encounter is now shown on the spec icon tooltip.\n\n|cFFFFFF00-|r Major revamp on the aura creation panel.\n\n|cFFFFFF00v7.2.5.4369.124 (|cFFFFCC00August 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! can now track debuff applications (stack) and refreshes.\n\n|cFFFFFF00-|r Added new tab on Player Detail Window called 'Auras', you can see your buffs and debuffs from there.\n\n|cFFFFFF00-|r Death log now show debuff applications.\n\n|cFFFFFF00v7.2.5.4275.123 (|cFFFFCC00July 18th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some issues with tooltiops popup when the user press SHIFT.\n\n|cFFFFFF00-|r Now is possible to change the bar durating when selecting Cast Start trigger on Details! Forge.\n\n|cFFFFFF00-|r Kil'Jaeden adds should be consolidated into only one actor instead of having one for each player targeted.\n\n|cFFFFFF00v7.2.5.4236.122 (|cFFFFCC00July 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The alert to open the raid ranking after a boss kill, is now shown for 10 seconds (down from 40).\n\n|cFFFFFF00-|r Added a report button on the raid ranking panel and boss are sort alphabetically.\n\n|cFFFFFF00-|r Fixed some issues on the combatlog introduced on the wow patch 7.2.5 where sometimes the source of an event has no name.\n\n|cFFFFFF00-|r Ticket #209, fixed more issues with the comparison panel where are pets involved.\n\n|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v7.3.2.5101.128 (|cFFFFCC00Dec 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Moving the custom display window to the new plugins window.\n\n|cFFFFFF00-|r Major layout changes on the Encounter Details plugin window.\n\n|cFFFFFF00v7.3.2.4919.128 (|cFFFFCC00Dec 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with the statistics sharing among guild members.\n\n|cFFFFFF00-|r Fixed an issue with Argus encounter where two segments were created.\n\n|cFFFFFF00-|r Fixed aura type images on the Create Aura Panel.\n\n|cFFFFFF00-|r Create Aura Panel can now be closed with Right Click.\n\n|cFFFFFF00-|r Framework updated to r60, plugins should be more stable now.\n\n|cFFFFFF00v7.3.0.4830.126 (|cFFFFFF00v7.3.2.4836.126 (|cFFFFCC00Nov 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed some tutorial windows popups.\n\n|cFFFFCC00Oct 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed opening windows when streamer settings > no alerts is enabled.\n\n|cFFFFFF00v7.3.0.4823.126 (|cFFFFCC00Oct 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new options section: Streamer Settings, focused on adjustments for streamers and youtubers.\n\n|cFFFFFF00-|r Animations now always run at the same speed regardless the framerate.\n\n|cFFFFFF00-|r Click-To-Open menus now close the menu if the menu is already open.\n\n|cFFFFFF00v7.3.0.4723.126 (|cFFFFCC00Set 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed overall dungeon segments being added to overall data.\n\n|cFFFFFF00v7.3.0.4705.126 (|cFFFFCC00Set 19th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed damage taken tooltip for Brewmaster Monk where sometimes the tooltip didn't open.\n\n|cFFFFFF00-|r Fixed overall data on mythic dungeon not adding trash segments even with the option enabled on the options panel.\n\n|cFFFFFF00-|r Fixed the guild selection dropdown reseting everytime the Guild Rank window is opened.\n\n|cFFFFFF00v7.3.0.4677.126 (|cFFFFCC00Set 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r During mythic dungeons, the trash segments will be merged into a new segment at the end of the boss encounter (instead of merging on the fly while cleaning up).\n\n|cFFFFFF00v7.3.0.4615.125 (|cFFFFCC00Set 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Setting up the dungeon stuff as opt-in for early adopters while we continue to make improvements on the system.\n\n|cFFFFFF00v7.3.0.4586.125 (|cFFFFCC00Set 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Formating mythic+ dungeon segments, each segment should count the boss trash + boss fight.\n\n|cFFFFFF00-|r At the end of the mythic+ dungeon, it should create a new segment adding up all segments described above.\n\n|cFFFFFF00v7.3.0.4499.124 (|cFFFFCC00Set 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to always show all players when using the standard mode. Option under PvP/PvE bracket on the options panel.\n\n|cFFFFFF00-|r Added a setting to exclude healing done lines from the death log below a certain healing amount. This options is also under PvP/PvE bracket.\n\n|cFFFFFF00-|r Fixed the guild selection on the ranking panel.\n\n|cFFFFFF00v7.3.0.4467.124 (|cFFFFCC00August 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Damage or Healing record for the encounter should be printed on chat on the boss pull.\nUse /run Details.announce_damagerecord.enabled = false; to disable.\n\n|cFFFFFF00v7.2.5.4437.124 (|cFFFFCC00August 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added healing done cap for death log. Use /run Details.deathlog_healingdone_min = 10000\n\n|cFFFFFF00-|r Fixed an issue where the alpha from the fixed bar color was used even when this option was disabled.\n\n|cFFFFFF00v7.2.5.4436.124 (|cFFFFCC00August 17th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Attempt to fix the issue where the window doesn't update after entering a raid or reseting data.\n\n|cFFFFFF00v7.2.5.4434.124 (|cFFFFCC00August 10th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to create an aura at Aura tab on the Player Details window.\n\n|cFFFFFF00-|r Fixes and improvements on the damage rank panel.\n\n|cFFFFFF00-|r Best damage or healing for the player on the current boss encounter is now shown on the spec icon tooltip.\n\n|cFFFFFF00-|r Major revamp on the aura creation panel.\n\n|cFFFFFF00v7.2.5.4369.124 (|cFFFFCC00August 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! can now track debuff applications (stack) and refreshes.\n\n|cFFFFFF00-|r Added new tab on Player Detail Window called 'Auras', you can see your buffs and debuffs from there.\n\n|cFFFFFF00-|r Death log now show debuff applications.\n\n|cFFFFFF00v7.2.5.4275.123 (|cFFFFCC00July 18th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed some issues with tooltiops popup when the user press SHIFT.\n\n|cFFFFFF00-|r Now is possible to change the bar durating when selecting Cast Start trigger on Details! Forge.\n\n|cFFFFFF00-|r Kil'Jaeden adds should be consolidated into only one actor instead of having one for each player targeted.\n\n|cFFFFFF00v7.2.5.4236.122 (|cFFFFCC00July 05th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r The alert to open the raid ranking after a boss kill, is now shown for 10 seconds (down from 40).\n\n|cFFFFFF00-|r Added a report button on the raid ranking panel and boss are sort alphabetically.\n\n|cFFFFFF00-|r Fixed some issues on the combatlog introduced on the wow patch 7.2.5 where sometimes the source of an event has no name.\n\n|cFFFFFF00-|r Ticket #209, fixed more issues with the comparison panel where are pets involved.\n\n|cFFFFFF00v7.2.5.4201.121 (|cFFFFCC00June 26th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed Monk Stagger where it was only shown on the friendly fire and not under the Damage Taken display.\n\n|cFFFFFF00-|r Added Forge and Ranking options on the main menu (orange cogwheel).\n\n|cFFFFFF00v7.2.5.4102.121 (|cFFFFCC00June 22th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! Forge has updated and now is more usder friendly.\n\n|cFFFFFF00-|r Fixed an issue with player buff uptime where sometimes some buffs wans't showing in the tooltip.\n\n|cFFFFFF00v7.2.5.3968.120 (|cFFFFCC00June 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r New Death Recap implemented! replaces the default from Blizzard and can be configured at Options > Raid Tools.\n\n|cFFFFFF00-|r New Guild Damage and Heal rank on '/details ranking' panel.\n\n|cFFFFFF00-|r Added a Guild Sync button on the Details! Ranking Panel.\n\n|cFFFFFF00-|r Added Custom display 'Damage on Shields', useful for encounter like Maiden of Vigilance where there's big shields to be removed and you want to know who is doing more damage to it.\n\n|cFFFFFF00-|r Added Heal Absorbed display under Heal bracket.\n\nHeal Absorb are the heal denied by abilities such like DK's Necrotic Strike or raid boss Sisters of the Moon 'Embrace of the Eclipse' ability.\nThe tooltip of this display shows which players got heal denied, which abilities absorbed the heal, which abilities tried to heal but got the heal denied.\n\n|cFFFFFF00-|r Added Alternate Power display under Energy bracket, it shows the total of alternate power gain from each player, useful for encounters such as Demonic Inquisition.\n\n|cFFFFFF00-|r 'First Hit' message after pulling a boss, now also shows who the boss is targeting (almost always is who pulled).\n\n|cFFFFFF00-|r Raid Dps {rdps} and Hps {rhps} can now be used on the Broker Data Feed..\n\n|cFFFFFF00-|r Fixed an issue with Chromie from the scenario 'The Deaths of Chromie' where she wasn't being shown on the meter.\n\n|cFFFFFF00-|r Fixed Paladin 'Light of the Martyr' damage to self.\n\n|cFFFFFF00-|r Ticket #198 'Script Error' Fixed.\n\n|cFFFFFF00v7.2.0.3703.119 (|cFFFFCC00May 29th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an error while killing low level mobs with warrior class.\n\n|cFFFFFF00v7.2.0.3693.118 (|cFFFFCC00May 25th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fury Warrior shouldn't be assigned as Protection any more.\n\n|cFFFFFF00-|r Some parser fixes.\n\n|cFFFFFF00v7.2.0.3673.118 (|cFFFFCC00May 09th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #187: Fixed an issue when comparing hunter pets on the player detail window.\n\n|cFFFFFF00-|r Ticket #189 #186: Fixed a taint issue for some classes when using friendly nameplates on.\n\n|cFFFFFF00v7.2.0.3512.116 (|cFFFFCC00April 27th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Havoc Demon Hunter: your fury energy is being shown under Mana Restored (don't ask me why, the combat log is telling us it's mana).\n\n|cFFFFFF00-|r Pets now are shown on damage tooltips.\n\n|cFFFFFF00-|r Pets are now also shown on the comparison panel.\n\n|cFFFFFF00v7.2.0.3474.116 (|cFFFFCC00April 20th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin: Raid Check > added some food buffs which wasn't being tracked.\n\n|cFFFFFF00v7.2.0.3467.116 (|cFFFFCC00April 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for the custom display window where apply and cancel buttons where over the edit window.\n\n|cFFFFFF00-|r Fix for an issue on editing a bookmark.\n\n|cFFFFFF00v7.1.5.3459.116 (|cFFFFCC00Mar 21th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue on dynamic overall data where it wasn't showing DPS.\n\n|cFFFFFF00-|r Fixed an issue with Apply, Save and Cancel buttons when editing a custom display.\n\n|cFFFFFF00-|r Removed the Damage and Healing presets for custom displays, now is only possible create custom displays by scripting them.\n\n|cFFFFFF00v7.1.5.3431.116 (|cFFFFCC00Mar 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bar orientation right to left where fixed bar color isn't working.\n\n|cFFFFFF00-|r The nickname field now use FrizQuadrataTT font and shall be compatible with Cyrillic.\n\n|cFFFFFF00v7.1.5.3418.116 (|cFFFFCC00Mar 1st, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #167 fix: Light of the Martyr self-damage now does reduce the healing done (following WCL method).\n\n|cFFFFFF00-|r Ticket #169 fix: Damage Prevented is now working for new segments.\n\n|cFFFFFF00-|r Fixed an issue where sometimes BeastMaster's Hati pet wasn't detected correctly.\n\n|cFFFFFF00v7.1.5.3369.116 (|cFFFFCC00Feb 07th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'Dynamic Overall Damage' for mythic dungeons.\n\n|cFFFFFF00-|r Fix for Ticket #168: 'Auto Hide While [Not] Inside Instance is broken'.\n\n|cFFFFFF00-|r The bar truncate frame 'DetailsLeftTextAntiTruncate' is now created on Details! load instead on demand.\n\n|cFFFFFF00v7.1.5.3315.116 (|cFFFFCC00Jan 23th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Ticket #162: 'no Monochrome font' available, added an experimental slash command: /run _detalhes:UseOutline ('MONOCHROME').\n\n|cFFFFFF00-|r Ticket #158: 'no elapsed time shown on report to chat', added the elapsed time when reporting a segment.\n\n|cFFFFFF00-|r Ticket #164: 'error when browsing segments', an attempt to fix the problem has been made.\n\n|cFFFFFF00v7.1.5.3305.116 (|cFFFFCC00Jan 15th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Another fix for mythic dungeons overall data reset (thanks Tharai @ Curseforge).\n\n|cFFFFFF00-|r Fix for spec detection on PvP Arenas (thanks Pas06 @ Curseforge).\n\n|cFFFFFF00v7.1.0.3276.115 (|cFFFFCC00Jan 08th, 2017|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed the overall data not reseting when starting a new mythic+ dungeon.\n\n|cFFFFFF00v7.1.0.3266.115 (|cFFFFCC00Dec 29th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data not updating correctly at the end of the combat.\n\n|cFFFFFF00-|r Added a tutorial line on the window when the user access overall data.\n\n|cFFFFFF00v7.1.0.3236.115 (|cFFFFCC00Dec 19th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Integration with BigWigs should be working okay now.\n\n|cFFFFFF00v7.1.0.3231.115 (|cFFFFCC00Dec 15th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Disabled the link with BigWigs to avoid the 'RegisterMessage' error on every login.\n\n|cFFFFFF00v7.1.0.3229.115 (|cFFFFCC00Dec 09th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r When a window is locked, resize grips shouldn't be enabled messing with bar mouse over.\n\n|cFFFFFF00v7.0.3.3222.115 (|cFFFFCC00November 28th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Unstable Affliction to common spells with the same name.\n\n|cFFFFFF00-|r Fixed few issues with built-in plugins.\n\n|cFFFFFF00v7.0.3.3202.115 (|cFFFFCC00November 08th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Weakauras creator from the Encounter Details plugin and '/details forge' shall work correctly now with Trials of Valor.\n\n|cFFFFFF00-|r Raid history should now be recording your Trials of Valor kills.\n\n|cFFFFFF00-|r Added Trials of Valor raid info, good luck and have fun!.\n\n|cFFFFFF00v7.0.3.3201.115 (|cFFFFCC00November 04th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fix for Paladin holy icon.\n\n|cFFFFFF00-|r Fix for Rogue outlaw icon.\n\n|cFFFFFF00-|r Fixed misc displays with bar sorted by ascending order.\n\n|cFFFFFF00-|r Fix for '/details show' command while the window is on auto hide.\n\n|cFFFFFF00v7.0.3.3114.115 (|cFFFFCC00October 26th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): tooltip tutorial is now clamped to screen and its close button should be visible.\n\n|cFFFFFF00-|r Raid Check (plugin): now also works on dungeons.\n\n|cFFFFFF00-|r Added Potion of the Prolongued Power to the tracker.\n\n|cFFFFFF00v7.1.0.3097.115 (|cFFFFCC00October 25th, 2016|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r renamed 'report history' to 'latest reports'.\n\n|cFFFFFF00-|r attempt to make all Details! users on the party or raid to track rogue's akaari's soul." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/core/plugins.lua b/core/plugins.lua index c7c8d7ee..06b35d70 100644 --- a/core/plugins.lua +++ b/core/plugins.lua @@ -5,6 +5,34 @@ local _detalhes = _G._detalhes DETAILSPLUGIN_ALWAYSENABLED = 0x1 + + --> templates + _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE", + { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {0, 0, 0, .5}, + backdropbordercolor = {0, 0, 0, .5}, + onentercolor = {0.3, 0.3, 0.3, .5}, + } + ) + _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE", + { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {0, 0, 0, .5}, + backdropbordercolor = {1, 1, 0, 1}, + onentercolor = {0.3, 0.3, 0.3, .5}, + } + ) + + --> consts + local CONST_PLUGINWINDOW_MENU_WIDTH = 150 + local CONST_PLUGINWINDOW_MENU_HEIGHT = 22 + local CONST_PLUGINWINDOW_MENU_X = -5 + local CONST_PLUGINWINDOW_MENU_Y = -26 + local CONST_PLUGINWINDOW_WIDTH = 925 + local CONST_PLUGINWINDOW_HEIGHT = 600 + + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> details api functions function _detalhes:GetPlugin (PAN) --plugin absolute name @@ -431,14 +459,16 @@ f:Hide() + + --> members - f.MenuX = -5 - f.MenuY = -26 - f.MenuButtonWidth = 150 - f.MenuButtonHeight = 20 + f.MenuX = CONST_PLUGINWINDOW_MENU_X + f.MenuY = CONST_PLUGINWINDOW_MENU_Y + f.MenuButtonWidth = CONST_PLUGINWINDOW_MENU_WIDTH + f.MenuButtonHeight = CONST_PLUGINWINDOW_MENU_HEIGHT + f.FrameWidth = CONST_PLUGINWINDOW_WIDTH + f.FrameHeight = CONST_PLUGINWINDOW_HEIGHT f.TitleHeight = 20 - f.FrameWidth = 925 - f.FrameHeight = 600 --> store button references for the left menu f.MenuButtons = {} @@ -519,23 +549,7 @@ end end - --> templates - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTON_TEMPLATE", - { - backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, - backdropcolor = {0, 0, 0, .5}, - backdropbordercolor = {0, 0, 0, 1}, - onentercolor = {0.3, 0.3, 0.3, .5}, - } - ) - _detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE", - { - backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, - backdropcolor = {0, 0, 0, .5}, - backdropbordercolor = {1, 1, 0, 1}, - onentercolor = {0.3, 0.3, 0.3, .5}, - } - ) + function f.OnMenuClick (_, _, pluginAbsName, callRefresh) @@ -653,7 +667,9 @@ --> sort buttons alphabetically, put utilities at the end table.sort (f.MenuButtons, function (t1, t2) - if (t1.IsUtility) then + if (t1.IsUtility and t2.IsUtility) then + return t1.PluginName < t2.PluginName + elseif (t1.IsUtility) then return false elseif (t2.IsUtility) then return true diff --git a/gumps/janela_custom.lua b/gumps/janela_custom.lua index 6b587e06..44b4e0f7 100644 --- a/gumps/janela_custom.lua +++ b/gumps/janela_custom.lua @@ -34,10 +34,58 @@ local _IsAltKeyDown = IsAltKeyDown --api local local _IsShiftKeyDown = IsShiftKeyDown --api local local _IsControlKeyDown = IsControlKeyDown --api local - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> constants + local CONST_MENU_X_POSITION = 10 + local CONST_MENU_Y_POSITION = -40 + local CONST_MENU_WIDTH = 160 + local CONST_MENU_HEIGHT = 20 + + local CONST_INFOBOX_X_POSITION = 220 + local CONST_EDITBUTTONS_X_POSITION = 560 + + local CONST_EDITBOX_Y_POSITION = -200 + local CONST_EDITBOX_WIDTH = 900 + local CONST_EDITBOX_HEIGHT = 370 + + local CONST_EDITBOX_BUTTON_WIDTH = 80 + local CONST_EDITBOX_BUTTON_HEIGHT = 20 + + local CONST_BUTTON_TEMPLATE = gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE") + local CONST_TEXTENTRY_TEMPLATE = gump:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE") + + gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS", { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {1, 1, 1, .5}, + backdropbordercolor = {0, 0, 0, 1}, + textcolor = "white", + textsize = 10, + icon = {texture = [[Interface\BUTTONS\UI-GuildButton-PublicNote-Up]]}, + }) + + gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX", { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {.2, .2, .2, 0.6}, + backdropbordercolor = {0, 0, 0, 1}, + }) + gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED", { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {.2, .2, .2, 1}, + backdropbordercolor = {0, 0, 0, 1}, + }) + gump:InstallTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON", { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {.2, .2, .2, 1}, + backdropbordercolor = {0, 0, 0, 1}, + }) + + local CONST_CODETEXTENTRY_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX") + local CONST_CODETEXTENTRYEXPANDED_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_EXPANDED") + local CONST_CODETEXTENTRYBUTTON_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BOX_BUTTON") + local CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE = gump:GetTemplate ("button", "DETAILS_CUSTOMDISPLAY_CODE_BUTTONS") + local atributos = _detalhes.atributos local sub_atributos = _detalhes.sub_atributos @@ -58,10 +106,10 @@ ["script"] = true, ["tooltip"] = true, } - + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> create the window - + function _detalhes:CloseCustomDisplayWindow() --> cancel editing or creation @@ -78,12 +126,11 @@ --> hide the frame _G.DetailsCustomPanel:Hide() end - function _detalhes:InitializeCustomDisplayWindow() local DetailsCustomPanel = CreateFrame ("frame", "DetailsCustomPanel", UIParent) DetailsCustomPanel.Frame = DetailsCustomPanel - DetailsCustomPanel.__name = "Custom Display" + DetailsCustomPanel.__name = "Custom Displays" DetailsCustomPanel.real_name = "DETAILS_CUSTOMDISPLAY" DetailsCustomPanel.__icon = [[Interface\FriendsFrame\UI-FriendsList-Small-Up]] DetailsPluginContainerWindow.EmbedPlugin (DetailsCustomPanel, DetailsCustomPanel, true) @@ -94,7 +141,7 @@ end function _detalhes:OpenCustomDisplayWindow() - + if (not _G.DetailsCustomPanel or not DetailsCustomPanel.Initialized) then DetailsPluginContainerWindow.OpenPlugin (DetailsCustomPanel) @@ -160,7 +207,10 @@ f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1) f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1) f.Close:SetAlpha (0.7) - f.Close:SetScript ("OnClick", function() f:Hide() end) + f.Close:SetScript ("OnClick", function() _detalhes:CloseCustomDisplayWindow() end) + f.Close:SetScript ("OnHide", function() + _detalhes:CloseCustomDisplayWindow() + end) --> background f.bg1 = f:CreateTexture (nil, "background") @@ -174,23 +224,7 @@ f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) f:SetBackdropColor (.5, .5, .5, .5) f:SetBackdropBorderColor (0, 0, 0, 1) - - - --> close button - custom_window.close = _CreateFrame ("button", nil, custom_window, "UIPanelCloseButton") - custom_window.close:SetSize (32, 32) - custom_window.close:SetPoint ("topright", custom_window, "topright", 5, -8) - custom_window.close:SetFrameLevel (custom_window:GetFrameLevel()+2) - custom_window.close:SetScript ("OnClick", function() - _detalhes:CloseCustomDisplayWindow() - end) - custom_window.close:SetScript ("OnHide", function() - _detalhes:CloseCustomDisplayWindow() - end) - - - DetailsCustomPanel.BoxType = 1 DetailsCustomPanel.IsEditing = false DetailsCustomPanel.IsImporting = false @@ -680,11 +714,10 @@ custom_window.codeeditor:Show() DetailsCustomPanel.CodeEditing = code - DetailsCustomPanel:SetAcceptButtonText (Loc ["STRING_CUSTOM_DONE"]) + + DetailsCustomPanel:SetAcceptButtonText ("Save Code") --Loc ["STRING_CUSTOM_DONE"] end - - --> left menu custom_window.menu = {} local menu_start = -50 @@ -692,45 +725,21 @@ menu_up_frame:SetFrameLevel (custom_window:GetFrameLevel()+2) local onenter = function (self) - self.icontexture:SetVertexColor (1, 1, 1, 1) + --self.icontexture:SetVertexColor (1, 1, 1, 1) end local onleave = function (self) - self.icontexture:SetVertexColor (.9, .9, .9, 1) + --self.icontexture:SetVertexColor (.9, .9, .9, 1) end function custom_window:CreateMenuButton (label, icon, clickfunc, param1, param2, tooltip, name, coords) - local index = #custom_window.menu+1 + + local button = gump:NewButton (self, nil, "$parent" .. name, nil, CONST_MENU_WIDTH, CONST_MENU_HEIGHT, clickfunc, param1, param2, nil, label) + button:SetPoint ("topleft", self, "topleft", CONST_MENU_X_POSITION, CONST_MENU_Y_POSITION + ((index-1)*-23)) - local circle = menu_up_frame:CreateTexture (nil, "overlay") - circle:SetSize (128*0.5, 82*0.5) - circle:SetPoint ("topleft", self, "topleft", 13, ((82*0.5)*index*-1) + menu_start) - circle:SetTexture ("Interface\\Glues\\CHARACTERCREATE\\AlternateForm") - circle:SetTexCoord (0, 1, 0, 0.3203125) - circle:SetDrawLayer ("overlay", 4) + button:SetTemplate (CONST_BUTTON_TEMPLATE) + button:SetIcon (icon, CONST_MENU_HEIGHT-4, CONST_MENU_HEIGHT-4, "overlay", {.1, .9, .1, .9}) - local texture = menu_up_frame:CreateTexture (nil, "overlay") - texture:SetSize (128*0.23, 82*0.32) - texture:SetTexture (icon) - --texture:SetDesaturated (true) - texture:SetVertexColor (.9, .9, .9, 1) - if (coords) then - texture:SetTexCoord (unpack (coords)) - else - texture:SetTexCoord (5/64, 60/64, 4/64, 62/64) - end - texture:SetPoint ("topleft", circle, "topleft", 5, -9) - texture:SetDrawLayer ("overlay", 3) - - local fillgap = menu_up_frame:CreateTexture (nil, "overlay") - fillgap:SetDrawLayer ("overlay", 2) - fillgap:SetTexture (0, 0, 0, 1) - fillgap:SetSize (2, 10) - fillgap:SetPoint ("left", texture, "right") - - local button = gump:NewButton (self, nil, "$parent" .. name, nil, 110, 20, clickfunc, param1, param2, nil, label) - button:SetPoint ("topleft", circle, "topright", -32, -14) - button:InstallCustomTexture() button:SetHook ("OnEnter", onenter) button:SetHook ("OnLeave", onleave) button.widget.icontexture = texture @@ -767,14 +776,14 @@ GameCooltip:Hide() DetailsCustomPanel:StartEdit (custom_object) end - custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EDIT"], "Interface\\ICONS\\INV_Inscription_RunescrollOfFortitude_Red", build_menu, start_edit, nil, nil, "Edit", {0.07, 0.93, 0.07, 0.93}) --> localize + custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_EDIT"], "Interface\\ICONS\\INV_Inscription_RunescrollOfFortitude_Red", build_menu, start_edit, nil, nil, "Edit", {0.07, 0.93, 0.07, 0.93}) --> remove button local remove_display = function (_, _, custom_object, index) GameCooltip:Hide() DetailsCustomPanel:RemoveDisplay (custom_object, index) end - custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_REMOVE"], "Interface\\ICONS\\Spell_BrokenHeart", build_menu, remove_display, nil, nil, "Remove", {1, 0, 0, 1}) --> localize + custom_window:CreateMenuButton (Loc ["STRING_CUSTOM_REMOVE"], "Interface\\ICONS\\Spell_BrokenHeart", build_menu, remove_display, nil, nil, "Remove", {1, 0, 0, 1}) --> export button local export_display = function (_, _, custom_object, index) @@ -798,10 +807,11 @@ local encoded = _detalhes._encode:Encode (serialized_table) if (not custom_window.ExportBox) then - local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentExportBox", "ExportBox", 842, 20) - editbox:SetPoint ("topleft", DetailsCustomPanel, "bottomleft", 10, 0) - editbox:SetPoint ("topright", DetailsCustomPanel, "bottomright") + local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentExportBox", "ExportBox", CONST_EDITBOX_WIDTH, 20) + editbox:SetPoint ("bottomleft", custom_window, "bottomleft", 10, 6) + --editbox:SetPoint ("bottomright", custom_window, "bottomright", -10, 6) editbox:SetAutoFocus (false) + editbox:SetTemplate (CONST_TEXTENTRY_TEMPLATE) editbox:SetHook ("OnEditFocusLost", function() editbox:Hide() end) @@ -830,12 +840,13 @@ if (not custom_window.ImportBox) then - local export_string = gump:NewLabel (custom_window, custom_window, "$parenImportLabel", "exportLabel", Loc ["STRING_CUSTOM_PASTE"], "GameFontNormal") - export_string:SetPoint ("topleft", DetailsCustomPanel, "bottomleft", 10, -5) - - local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentImportBox", "ImportBox", 772 - export_string.width - 2, 20) + local export_string = gump:NewLabel (custom_window, custom_window, "$parenImportLabel", "exportLabel", "Import String:", "GameFontNormal") --Loc ["STRING_CUSTOM_PASTE"] + export_string:SetPoint ("bottomleft", DetailsCustomPanel, "bottomleft", 10, 8) + + local editbox = _detalhes.gump:NewTextEntry (custom_window, nil, "$parentImportBox", "ImportBox", CONST_EDITBOX_WIDTH - export_string.width - CONST_EDITBOX_BUTTON_WIDTH - 4, 20) editbox:SetPoint ("left", export_string, "right", 2, 0) editbox:SetAutoFocus (false) + editbox:SetTemplate (CONST_TEXTENTRY_TEMPLATE) local import = function() local text = editbox:GetText() @@ -876,8 +887,8 @@ custom_window.ImportConfirm:Hide() end - local okey_button = gump:NewButton (custom_window, nil, "$parentImportConfirm", "ImportConfirm", 65, 18, import, nil, nil, nil, Loc ["STRING_CUSTOM_IMPORT_BUTTON"]) - okey_button:InstallCustomTexture() + local okey_button = gump:NewButton (custom_window, nil, "$parentImportConfirm", "ImportConfirm", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, import, nil, nil, nil, Loc ["STRING_CUSTOM_IMPORT_BUTTON"]) + okey_button:SetTemplate (CONST_BUTTON_TEMPLATE) okey_button:SetPoint ("left", editbox, "right", 2, 0) end @@ -914,15 +925,12 @@ --{icon = [[Interface\ICONS\INV_Inscription_Scroll]], label = "Custom Script", box = 2, attribute = false, boxtype = 2}, --{icon = [[Interface\ICONS\INV_Inscription_Scroll]], label = "Custom Script", box = 2, attribute = false, boxtype = 2}, } - + --> create box local attribute_box = _CreateFrame ("frame", nil, custom_window) attribute_box:SetPoint ("topleft", custom_window, "topleft", 200, -60) attribute_box:SetSize (180, 260) - --attribute_box:SetBackdrop ({ - -- bgFile = "Interface\\AddOns\\Details\\images\\background", - -- tile = true, tileSize = 16}) - --attribute_box:SetBackdropColor (1, 1, 1, 1) + attribute_box:Hide() local button_onenter = function (self) self:SetBackdropColor (.3, .3, .3, .3) @@ -932,8 +940,6 @@ self:SetBackdropColor (0, 0, 0, .2) self.icon:SetBlendMode ("BLEND") end - - --960 1020 68 101 local selected_left = attribute_box:CreateTexture (nil, "overlay") selected_left:SetTexture ([[Interface\Store\Store-Main]]) @@ -958,44 +964,41 @@ selected_center:SetPoint ("left", selected_left, "right") selected_center:SetPoint ("right", selected_right, "left") - --selected_center:SetHorizTile (true) - --selected_center:SetVertTile (true) - local p = 0.0625 --> 32/512 for i = 1, 10 do if (attributes [i]) then - local button = _CreateFrame ("button", "DetailsCustomPanelAttributeMenu" .. i, attribute_box) - button:SetPoint ("topleft", attribute_box, "topleft", 2, ((i-1)*23*-1) + (-26)) - button:SetPoint ("topright", attribute_box, "topright", 2, ((i-1)*23*-1) + (-26)) - button:SetHeight (20) - - button:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16}) - button:SetBackdropColor (0, 0, 0, .2) - - button:SetScript ("OnEnter", button_onenter) - button:SetScript ("OnLeave", button_onleave) - - button.attribute_table = attributes [i] - - if (attributes [i] and not attributes [i].attribute) then - custom_window.script_button_attribute = button - end - - button:SetScript ("OnClick", select_attribute) - - button.icon = button:CreateTexture (nil, "overlay") - button.icon:SetPoint ("left", button, "left", 6, 0) - button.icon:SetSize (22, 22) - button.icon:SetTexture ([[Interface\AddOns\Details\images\custom_icones]]) - button.icon:SetTexCoord (p*(i-1), p*(i), 0, 1) - - button.text = button:CreateFontString (nil, "overlay", "GameFontHighlightSmall") - button.text:SetPoint ("left", button.icon, "right", 4, 0) - button.text:SetText (attributes [i] and attributes [i].label or "") - button.text:SetTextColor (.9, .9, .9, 1) + local button = _CreateFrame ("button", "DetailsCustomPanelAttributeMenu" .. i, attribute_box) + button:SetPoint ("topleft", attribute_box, "topleft", 2, ((i-1)*23*-1) + (-26)) + button:SetPoint ("topright", attribute_box, "topright", 2, ((i-1)*23*-1) + (-26)) + button:SetHeight (20) + + button:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tile = true, tileSize = 16}) + button:SetBackdropColor (0, 0, 0, .2) + + button:SetScript ("OnEnter", button_onenter) + button:SetScript ("OnLeave", button_onleave) + + button.attribute_table = attributes [i] + + if (attributes [i] and not attributes [i].attribute) then + custom_window.script_button_attribute = button + end + + button:SetScript ("OnClick", select_attribute) + + button.icon = button:CreateTexture (nil, "overlay") + button.icon:SetPoint ("left", button, "left", 6, 0) + button.icon:SetSize (22, 22) + button.icon:SetTexture ([[Interface\AddOns\Details\images\custom_icones]]) + button.icon:SetTexCoord (p*(i-1), p*(i), 0, 1) + + button.text = button:CreateFontString (nil, "overlay", "GameFontHighlightSmall") + button.text:SetPoint ("left", button.icon, "right", 4, 0) + button.text:SetText (attributes [i] and attributes [i].label or "") + button.text:SetTextColor (.9, .9, .9, 1) end end @@ -1004,19 +1007,16 @@ local box0 = _CreateFrame ("frame", "DetailsCustomPanelBox0", custom_window) custom_window.box0 = box0 box0:SetSize (450, 360) - --box0:SetBackdrop ({ - -- bgFile = "Interface\\AddOns\\Details\\images\\background", - -- edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", - -- tile = true, tileSize = 16, edgeSize = 12}) - --box0:SetBackdropColor (0, 0, 0, .5) - box0:SetPoint ("topleft", attribute_box, "topright", 26, 10) + + box0:SetPoint ("topleft", custom_window, "topleft", CONST_INFOBOX_X_POSITION, CONST_MENU_Y_POSITION-4) --name local name_label = gump:NewLabel (box0, box0, "$parenNameLabel", "name", Loc ["STRING_CUSTOM_NAME"], "GameFontHighlightLeft") --> localize-me - name_label:SetPoint ("topleft", box0, "topleft", 10, -20) + name_label:SetPoint ("topleft", box0, "topleft", 10, 0) local name_field = gump:NewTextEntry (box0, nil, "$parentNameEntry", "nameentry", 200, 20) name_field:SetPoint ("left", name_label, "left", 62, 0) + name_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE) name_field.tooltip = Loc ["STRING_CUSTOM_NAME_DESC"] custom_window.name_field = name_field @@ -1026,6 +1026,7 @@ local author_field = gump:NewTextEntry (box0, nil, "$parentAuthorEntry", "authorentry", 200, 20) author_field:SetPoint ("left", author_label, "left", 62, 0) + author_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE) author_field.tooltip = Loc ["STRING_CUSTOM_AUTHOR_DESC"] author_field:SetText (UnitName ("player") .. "-" .. GetRealmName()) custom_window.author_field = author_field @@ -1036,6 +1037,7 @@ local desc_field = gump:NewTextEntry (box0, nil, "$parentDescEntry", "descentry", 200, 20) desc_field:SetPoint ("left", desc_label, "left", 62, 0) + desc_field:SetTemplate (CONST_TEXTENTRY_TEMPLATE) desc_field.tooltip = Loc ["STRING_CUSTOM_DESCRIPTION_DESC"] custom_window.desc_field = desc_field @@ -1059,13 +1061,14 @@ --cancel local cancel_button = gump:NewButton (box0, nil, "$parentCancelButton", "cancelbutton", 130, 20, DetailsCustomPanel.CancelFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CANCEL"]) - cancel_button:SetPoint ("bottomleft", attribute_box, "bottomright", 37, -10) - cancel_button:InstallCustomTexture() + --cancel_button:SetPoint ("bottomleft", attribute_box, "bottomleft", 2, 0) + cancel_button:SetPoint ("topleft", icon_label, "bottomleft", 0, -10) + cancel_button:SetTemplate (CONST_BUTTON_TEMPLATE) --accept local accept_button = gump:NewButton (box0, nil, "$parentAcceptButton", "acceptbutton", 130, 20, DetailsCustomPanel.AcceptFunc, nil, nil, nil, Loc ["STRING_CUSTOM_CREATE"]) accept_button:SetPoint ("left", cancel_button, "right", 2, 0) - accept_button:InstallCustomTexture() + accept_button:SetTemplate (CONST_BUTTON_TEMPLATE) cancel_button:SetFrameLevel (500) accept_button:SetFrameLevel (500) @@ -1074,13 +1077,7 @@ local box1 = _CreateFrame ("frame", "DetailsCustomPanelBox1", custom_window) custom_window.box1 = box1 box1:SetSize (450, 180) - --box1:SetBackdrop ({ - -- bgFile = "Interface\\AddOns\\Details\\images\\background", - -- edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", - -- tile = true, tileSize = 16, edgeSize = 12}) - --box1:SetBackdropColor (1, 0, 0, .9) box1:SetPoint ("topleft", icon_label.widget, "bottomleft", -10, -20) - box1:SetFrameLevel (box0:GetFrameLevel()+1) --source @@ -1147,7 +1144,8 @@ modelFrameBackgroundIcon:SetPoint ("center", modelFrameBackground, "center") modelFrameBackgroundIcon:SetTexture ([[Interface\CHARACTERFRAME\Disconnect-Icon]]) modelFrameBackgroundIcon:SetVertexColor (.5, .5, .5, 0.7) - + modelFrameBackground:Hide() + modelFrameBackgroundIcon:Hide() local selectedEncounterActor = function (actorName, model) source_field:SetText (actorName) @@ -1688,37 +1686,41 @@ --edit main code local maincode_button = gump:NewButton (box2, nil, "$parentMainCodeButton", "maiccodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 1, nil, nil, Loc ["STRING_CUSTOM_EDIT_SEARCH_CODE"]) - maincode_button:SetPoint ("topleft", box2, "topleft", 10, -15) + maincode_button:SetPoint ("topleft", custom_window, "topleft", CONST_EDITBUTTONS_X_POSITION, CONST_MENU_Y_POSITION) maincode_button.tooltip = Loc ["STRING_CUSTOM_EDITCODE_DESC"] - maincode_button:InstallCustomTexture (nil, nil, nil, nil, true) + maincode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit tooltip code local tooltipcode_button = gump:NewButton (box2, nil, "$parentTooltipCodeButton", "tooltipcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 2, nil, nil, Loc ["STRING_CUSTOM_EDIT_TOOLTIP_CODE"]) tooltipcode_button:SetPoint ("topleft", maincode_button, "bottomleft", 0, -8) tooltipcode_button.tooltip = Loc ["STRING_CUSTOM_EDITTOOLTIP_DESC"] - tooltipcode_button:InstallCustomTexture (nil, nil, nil, nil, true) + tooltipcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit total code local totalcode_button = gump:NewButton (box2, nil, "$parentTotalCodeButton", "totalcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 3, nil, nil, "Edit Total Code") totalcode_button:SetPoint ("topleft", tooltipcode_button, "bottomleft", 0, -8) totalcode_button.tooltip = "This code is responsible for edit the total number shown in the player bar.\n\nThis is not necessary if you want show exactly the value gotten in the search code." - totalcode_button:InstallCustomTexture (nil, nil, nil, nil, true) + totalcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) --edit percent code local percentcode_button = gump:NewButton (box2, nil, "$parentPercentCodeButton", "percentcodebutton", 160, 20, DetailsCustomPanel.StartEditCode, 4, nil, nil, "Edit Percent Code") percentcode_button:SetPoint ("topleft", totalcode_button, "bottomleft", 0, -8) percentcode_button.tooltip = "Edit the code responsible for the percent number in the player bar.\n\nThis is not required if you want to use simple percentage (comparing with total)." - percentcode_button:InstallCustomTexture (nil, nil, nil, nil, true) + percentcode_button:SetTemplate (CONST_CODETEXTENTRY_OPENCODEBUTTONS_TEMPLATE) box2:Hide() --> create the code editbox - local code_editor = gump:NewSpecialLuaEditorEntry (custom_window, 420, 238, "codeeditor", "$parentCodeEditor") - code_editor:SetPoint ("topleft", attribute_box, "topright", 30, 0) + local code_editor = gump:NewSpecialLuaEditorEntry (custom_window, CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT, "codeeditor", "$parentCodeEditor") + code_editor:SetPoint ("topleft", custom_window, "topleft", CONST_MENU_X_POSITION, CONST_EDITBOX_Y_POSITION) code_editor:SetFrameLevel (custom_window:GetFrameLevel()+4) - code_editor:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], - tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}}) - code_editor:SetBackdropColor (0, 0, 0, 1) + code_editor:SetBackdrop (nil) + + --> create a background area where the code editor is + local codeEditorBackground = gump:NewButton (custom_window, nil, nil, nil, 1, 1, function()end) + codeEditorBackground:SetAllPoints (code_editor) + codeEditorBackground:SetTemplate (CONST_CODETEXTENTRY_TEMPLATE) + code_editor:Hide() code_editor.font_size = 11 @@ -1727,22 +1729,24 @@ local expand_func = function() if (code_editor.expanded) then - code_editor:SetSize (420, 238) + code_editor:SetSize (CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT) code_editor.expanded = nil + codeEditorBackground:SetTemplate (CONST_CODETEXTENTRY_TEMPLATE) - custom_window.box0.cancelbutton:SetPoint ("bottomleft", attribute_box, "bottomright", 37, -10) + --custom_window.box0.cancelbutton:SetPoint ("bottomleft", attribute_box, "bottomright", 37, -10) --custom_window.box0.acceptbutton:SetPoint ("left", cancel_button, "right", 2, 0) else - code_editor:SetSize (950, 800) + code_editor:SetSize (CONST_EDITBOX_WIDTH, CONST_EDITBOX_HEIGHT*1.9) code_editor.expanded = true + codeEditorBackground:SetTemplate (CONST_CODETEXTENTRYEXPANDED_TEMPLATE) - custom_window.box0.cancelbutton:SetPoint ("bottomleft", attribute_box, "bottomright", -237, -10) + --custom_window.box0.cancelbutton:SetPoint ("bottomleft", attribute_box, "bottomright", -237, -10) --custom_window.box0.acceptbutton:SetPoint end end - local font_change = function (size) - if (size) then + local font_change = function (_, _, increase) + if (increase) then local file, size, flags = code_editor.editbox:GetFont() code_editor.font_size = code_editor.font_size + 1 code_editor.editbox:SetFont (file, code_editor.font_size, flags) @@ -1799,16 +1803,25 @@ local supportFrame = CreateFrame ("frame", "$parentSupportFrame", custom_window) supportFrame:SetFrameLevel (500) - local expand = gump:NewButton (supportFrame, nil, "$parentExpand", "expandbutton", 8, 10, expand_func, 4, nil, nil, "^") - expand:SetPoint ("bottomleft", code_editor, "topleft", 3, 0) - local font_size1 = gump:NewButton (supportFrame, nil, "$parentFont1", "font1button", 8, 10, font_change, true, nil, nil, "+") - font_size1:SetPoint ("left", expand, "right", -4, 2) - local font_size2 = gump:NewButton (supportFrame, nil, "$parentFont2", "font2button", 8, 10, font_change, nil, nil, nil, "-") - font_size2:SetPoint ("left", font_size1, "right", -4, 2) - local apply1 = gump:NewButton (supportFrame, nil, "$parentApply", "applybutton", 8, 10, apply_code, nil, nil, nil, "apply") - apply1:SetPoint ("left", font_size2, "right", -4, 1) - local open_API = gump:NewButton (supportFrame, nil, "$parentOpenAPI", "openAPIbutton", 8, 10, _detalhes.OpenAPI, nil, nil, nil, "Open Details! API") - open_API:SetPoint ("left", apply1, "right", -4, -1) + local expand = gump:NewButton (supportFrame, nil, "$parentExpand", "expandbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, expand_func, 4, nil, nil, "Expand") + expand:SetPoint ("bottomleft", code_editor, "topleft", 0, 1) + expand:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) + + local font_size1 = gump:NewButton (supportFrame, nil, "$parentFont1", "font1button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, nil, nil, nil, "Aa") + font_size1:SetPoint ("left", expand, "right", 2, 0) + font_size1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) + + local font_size2 = gump:NewButton (supportFrame, nil, "$parentFont2", "font2button", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, font_change, true, nil, nil, "aA") + font_size2:SetPoint ("left", font_size1, "right", 2, 0) + font_size2:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) + + local apply1 = gump:NewButton (supportFrame, nil, "$parentApply", "applybutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, apply_code, nil, nil, nil, "Apply") + apply1:SetPoint ("left", font_size2, "right", 2, 0) + apply1:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) + + local open_API = gump:NewButton (supportFrame, nil, "$parentOpenAPI", "openAPIbutton", CONST_EDITBOX_BUTTON_WIDTH, CONST_EDITBOX_BUTTON_HEIGHT, _detalhes.OpenAPI, nil, nil, nil, "API") + open_API:SetPoint ("left", apply1, "right", 2, 0) + open_API:SetTemplate (CONST_CODETEXTENTRYBUTTON_TEMPLATE) code_editor:SetScript ("OnShow", function() expand:Show() @@ -1834,7 +1847,8 @@ --> select damage DetailsCustomPanelAttributeMenu1:Click() else - _G.DetailsCustomPanel:Show() + DetailsPluginContainerWindow.OpenPlugin (DetailsCustomPanel) + --_G.DetailsCustomPanel:Show() end end \ No newline at end of file diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 2e5e8558..b56bbdc8 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -5661,12 +5661,10 @@ local build_mode_list = function (self, elapsed) CoolTip:SetOption ("YSpacingMod", 1) CoolTip:SetOption ("HeighMod", 3) + CoolTip:SetOption ("SubFollowButton", true) _detalhes:SetTooltipMinWidth() - --CoolTip:SetOption ("FixedHeight", 106) - --CoolTip:SetOption ("FixedWidthSub", 146) - CoolTip:AddLine (Loc ["STRING_MODE_GROUP"]) CoolTip:AddMenu (1, instancia.AlteraModo, 2, true) CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256, 32/256*2, 0, 1) @@ -5693,12 +5691,8 @@ local build_mode_list = function (self, elapsed) end CoolTip:SetWallpaper (2, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true) - - if (amt <= 3) then - CoolTip:SetOption ("SubFollowButton", true) - end end - + CoolTip:AddLine (Loc ["STRING_MODE_SELF"]) CoolTip:AddMenu (1, instancia.AlteraModo, 1, true) CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 0, 32/256, 0, 1) @@ -6008,6 +6002,8 @@ local build_segment_list = function (self, elapsed) CoolTip:SetOption ("FixedWidthSub", 195) CoolTip:SetOption ("RightTextWidth", 105) CoolTip:SetOption ("RightTextHeight", 12) + + CoolTip:SetOption ("SubFollowButton", true) ----------- segments local menuIndex = 0 diff --git a/plugins/Details_EncounterDetails/frames.lua b/plugins/Details_EncounterDetails/frames.lua index dfb712c7..fa07eaf7 100644 --- a/plugins/Details_EncounterDetails/frames.lua +++ b/plugins/Details_EncounterDetails/frames.lua @@ -10,19 +10,31 @@ do local _GetSpellInfo = _detalhes.getspellinfo local _ - - local PhaseButtonTemplate = { + local AurasButtonTemplate = { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, backdropcolor = {.3, .3, .3, .5}, onentercolor = {1, 1, 1, .5}, backdropbordercolor = {0, 0, 0, 1}, } + + local PhaseButtonTemplate = { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {.7, .7, .7, .5}, + onentercolor = {1, 1, 1, .5}, + backdropbordercolor = {0, 0, 0, 1}, + } local PhaseButtonTemplateHighlight = { backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, - backdropcolor = {.9, .9, .9, .5}, + backdropcolor = {.7, .7, .7, .5}, onentercolor = {1, 1, 1, .5}, backdropbordercolor = {.70, .70, .70, 1}, } + local PhaseButtonTemplateSelected = { + backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}, + backdropcolor = {.7, .7, .7, .5}, + onentercolor = {1, 1, 1, .5}, + backdropbordercolor = {.9, .7, 0, 1}, + } local set_backdrop = function (frame) frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tileSize = 64, tile = true}) @@ -254,10 +266,21 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) local lastBoss = nil EncounterDetails.CombatsAlreadyDrew = {} + local CONST_CHART_WIDTH = 870 + local CONST_CHART_HEIGHT = 485 + local CONST_PHASE_PANEL_WIDTH = 451 + local CONST_PHASE_BAR_HEIGHT = 16 + local CONST_CHART_LENGTH = 810 + local CONST_CHART_TIMELINE_X_POSITION = 75 + local CONST_CHART_TIMELINE_Y_POSITION = -550 + local CONST_CHART_DAMAGELINE_X_POSITION = 27 + local CONST_DAMAGE_LINES_COLOR = {1, 1, 1, .05} + local CONST_CHART_MAX_DEATHS_ICONS = 6 + function EncounterDetails:BuildDpsGraphic() local segment = EncounterDetails._segment - + local g if (not _G.DetailsRaidDpsGraph) then @@ -265,10 +288,6 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) g = _G.DetailsRaidDpsGraph else g = _G.DetailsRaidDpsGraph - - --if (not combat.is_boss or not lastBoss or combat.is_boss.index ~= lastBoss) then - -- g.max_damage = 0 - --end end g:ResetData() @@ -290,20 +309,20 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) if (combat.end_time - combat.start_time < 12) then return end - + --EncounterDetails.Frame.linhas = EncounterDetails.Frame.linhas or 0 EncounterDetails.Frame.linhas = 1 if (EncounterDetails.Frame.linhas > 5) then EncounterDetails.Frame.linhas = 1 end - + g.max_damage = 0 - + for _, line in ipairs (g.VerticalLines) do line:Hide() end - + lastBoss = combat.is_boss and combat.is_boss.index -- @@ -340,14 +359,14 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) g:ClearPhaseTexture() local phase_data = combat.PhaseData - local scale = 810 / combat:GetCombatTime() + local scale = CONST_CHART_LENGTH / combat:GetCombatTime() for i = 1, #phase_data do local phase = phase_data[i][1] local start_at = phase_data[i][2] local texture = g:GetPhaseTexture (i, phase) - texture:SetPoint ("bottomleft", g, "bottomleft", (start_at * scale)+58, 0) + texture:SetPoint ("bottomleft", g, "bottomleft", (start_at * scale) + 58, 0) texture.phase = phase texture.start_at = start_at @@ -375,13 +394,13 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end function EncounterDetails:DrawSegmentGraphic (g, graphicData, combat, drawDeathsCombat) - + local _data = {} local dps_max = graphicData.max_value local amount = #graphicData local scaleW = 1/670 - + local content = graphicData tinsert (content, 1, 0) tinsert (content, 1, 0) @@ -401,7 +420,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) tremove (content, 1) tremove (content, #graphicData) tremove (content, #graphicData) - + + --> update timeline local tempo = combat.end_time - combat.start_time if (g.max_time < tempo) then g.max_time = tempo @@ -421,9 +441,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end end + --> normalize previous data if (dps_max > g.max_damage) then - - --> normalize previous data if (g.max_damage > 0) then local normalizePercent = g.max_damage / dps_max for dataIndex, Data in ipairs (g.Data) do @@ -433,11 +452,12 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end end end - + g.max_damage = dps_max local dano_divisao = g.max_damage/8 + --> update damage line local o = 1 for i = 8, 1, -1 do local d = _detalhes:ToK (dano_divisao*i) @@ -457,16 +477,16 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) g:ChangeColorOnDataSeries (i, grafico_cores [i]) end + --> add death icons for the first deaths in the segment if (drawDeathsCombat) then local mortes = drawDeathsCombat.last_events_tables - --local scaleG = 650/_detalhes.tabela_vigente:GetCombatTime() - local scaleG = 810/drawDeathsCombat:GetCombatTime() + local scaleG = CONST_CHART_LENGTH / drawDeathsCombat:GetCombatTime() for _, row in _ipairs (g.VerticalLines) do row:Hide() end - for i = 1, math.min (3, #mortes) do + for i = 1, math.min (CONST_CHART_MAX_DEATHS_ICONS, #mortes) do local vRowFrame = g.VerticalLines [i] @@ -540,8 +560,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end local deadTime = mortes [i].dead_at - --print (deadTime, mortes [i][3]) - vRowFrame:SetPoint ("topleft", EncounterDetails.Frame, "topleft", (deadTime*scaleG)+70, -418) + vRowFrame:SetPoint ("topleft", EncounterDetails.Frame, "topleft", (deadTime*scaleG)+70, -CONST_CHART_HEIGHT-22) vRowFrame.dead = mortes [i] vRowFrame:Show() @@ -551,438 +570,445 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) --~chart ~graphic ~grafico function EncounterDetails:CreateGraphPanel() - local g = Graphics:CreateGraphLine ("DetailsRaidDpsGraph", EncounterDetails.Frame, "topleft","topleft", 20, -76, 870, 388) - --670, 238 - --1.3 1.62 - g:SetXAxis (-1,1) - g:SetYAxis (-1,1) - g:SetGridSpacing (false, false) - g:SetGridColor ({0.5,0.5,0.5,0.3}) - g:SetAxisDrawing (false,false) - g:SetAxisColor({1.0,1.0,1.0,1.0}) - g:SetAutoScale (true) - g:SetLineTexture ("smallline") - g:SetBorderSize ("right", 0.001) - g.VerticalLines = {} - g.TryIndicator = {} - g.PhaseTextures = {} + + --> main chart frame + local g = Graphics:CreateGraphLine ("DetailsRaidDpsGraph", EncounterDetails.Frame, "topleft", "topleft", 20, -76, CONST_CHART_WIDTH, CONST_CHART_HEIGHT) + g:SetXAxis (-1,1) + g:SetYAxis (-1,1) + g:SetGridSpacing (false, false) + g:SetGridColor ({0.5,0.5,0.5,0.3}) + g:SetAxisDrawing (false,false) + g:SetAxisColor({1.0,1.0,1.0,1.0}) + g:SetAutoScale (true) + g:SetLineTexture ("smallline") + g:SetBorderSize ("right", 0.001) + g.VerticalLines = {} + g.TryIndicator = {} + g.PhaseTextures = {} + + local phase_alpha = 0.5 + local phase_colors = {{0.2, 1, 0.2, phase_alpha}, {1, 1, 0.2, phase_alpha}, {1, 0.2, 0.2, phase_alpha}, {0.2, 1, 1, phase_alpha}, {0.2, 0.2, 1, phase_alpha}, + [1.5] = {0.25, 0.95, 0.25, phase_alpha}, [2.5] = {0.95, 0.95, 0.25, phase_alpha}, [3.5] = {0.95, 0.25, 0.25, phase_alpha} + } - local phase_alpha = 0.5 - local phase_colors = {{0.2, 1, 0.2, phase_alpha}, {1, 1, 0.2, phase_alpha}, {1, 0.2, 0.2, phase_alpha}, {0.2, 1, 1, phase_alpha}, {0.2, 0.2, 1, phase_alpha}, - [1.5] = {0.25, 0.95, 0.25, phase_alpha}, [2.5] = {0.95, 0.95, 0.25, phase_alpha}, [3.5] = {0.95, 0.25, 0.25, phase_alpha} - } - - local phase_panel = CreateFrame ("frame", "EncounterDetailsPhasePanel", g) - phase_panel:SetFrameStrata ("TOOLTIP") - phase_panel:SetWidth (451) - phase_panel:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, - edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 32, - insets = {left = 1, right = 1, top = 1, bottom = 1}}) - phase_panel:SetBackdropColor (0, 0, 0, .4) - - local damage_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {11/1024, 24/1024, 376/1024, 390/1024}) - local damage_label = DetailsFrameWork:CreateLabel (phase_panel, "Damage Done:") - damage_icon:SetPoint ("topleft", phase_panel, "topleft", 10, -10) - damage_label:SetPoint ("left", damage_icon, "right", 4, 0) - - local heal_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {43/1024, 57/1024, 376/1024, 390/1024}) - local heal_label = DetailsFrameWork:CreateLabel (phase_panel, "Healing Done:") - heal_icon:SetPoint ("topleft", phase_panel, "topleft", 250, -10) - heal_label:SetPoint ("left", heal_icon, "right", 4, 0) - - phase_panel.damage_labels = {} - phase_panel.heal_labels = {} - - function phase_panel:ClearLabels() - for i, label in ipairs (phase_panel.damage_labels) do - label.lefttext:Hide() - label.righttext:Hide() - label.icon:Hide() - label.bg:Hide() + --> build the phase panel + local phase_panel = CreateFrame ("frame", "EncounterDetailsPhasePanel", g) + phase_panel:SetFrameStrata ("TOOLTIP") + phase_panel:SetWidth (CONST_PHASE_PANEL_WIDTH) + phase_panel:SetBackdrop ({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16, + edgeFile = [[Interface\AddOns\Details\images\border_2]], edgeSize = 32, + insets = {left = 1, right = 1, top = 1, bottom = 1}}) + phase_panel:SetBackdropColor (0, 0, 0, .4) + + local damage_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {11/1024, 24/1024, 376/1024, 390/1024}) + local damage_label = DetailsFrameWork:CreateLabel (phase_panel, "Damage Done:") + damage_icon:SetPoint ("topleft", phase_panel, "topleft", 10, -10) + damage_label:SetPoint ("left", damage_icon, "right", 4, 0) + + local heal_icon = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\skins\classic_skin_v1]], 16, 16, "overlay", {43/1024, 57/1024, 376/1024, 390/1024}) + local heal_label = DetailsFrameWork:CreateLabel (phase_panel, "Healing Done:") + heal_icon:SetPoint ("topleft", phase_panel, "topleft", 250, -10) + heal_label:SetPoint ("left", heal_icon, "right", 4, 0) + + phase_panel.damage_labels = {} + phase_panel.heal_labels = {} + + function phase_panel:ClearLabels() + for i, label in ipairs (phase_panel.damage_labels) do + label.lefttext:Hide() + label.righttext:Hide() + label.icon:Hide() + label.bg:Hide() + end + for i, label in ipairs (phase_panel.heal_labels) do + label.lefttext:Hide() + label.righttext:Hide() + label.icon:Hide() + label.bg:Hide() + end end - for i, label in ipairs (phase_panel.heal_labels) do - label.lefttext:Hide() - label.righttext:Hide() - label.icon:Hide() - label.bg:Hide() + + function phase_panel:GetDamageLabel (index) + local label = phase_panel.damage_labels [index] + if (not label) then + local player_name = DetailsFrameWork:CreateLabel (phase_panel, "") + local amount = DetailsFrameWork:CreateLabel (phase_panel, "") + amount:SetJustifyH ("right") + local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16) + local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork") + bg:SetPoint ("left", icon, "left"); bg.height = 16; bg:SetPoint ("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8) + + icon:SetPoint ("topleft", phase_panel, "topleft", 10, ((index * 16) * -1) - 16) + player_name:SetPoint ("left", icon, "right", 2, 0) + amount:SetPoint ("topright", phase_panel, "topleft", 200, ((index * 16) * -1) - 16) + + label = {lefttext = player_name, righttext = amount, icon = icon, bg = bg} + phase_panel.damage_labels [index] = label + end + return label end - end - - function phase_panel:GetDamageLabel (index) - local label = phase_panel.damage_labels [index] - if (not label) then - local player_name = DetailsFrameWork:CreateLabel (phase_panel, "") - local amount = DetailsFrameWork:CreateLabel (phase_panel, "") - amount:SetJustifyH ("right") - local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16) - local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork") - bg:SetPoint ("left", icon, "left"); bg.height = 16; bg:SetPoint ("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8) - - icon:SetPoint ("topleft", phase_panel, "topleft", 10, ((index * 16) * -1) - 16) - player_name:SetPoint ("left", icon, "right", 2, 0) - amount:SetPoint ("topright", phase_panel, "topleft", 200, ((index * 16) * -1) - 16) - - label = {lefttext = player_name, righttext = amount, icon = icon, bg = bg} - phase_panel.damage_labels [index] = label + + function phase_panel:GetHealLabel (index) + local label = phase_panel.heal_labels [index] + if (not label) then + local player_name = DetailsFrameWork:CreateLabel (phase_panel, "") + local amount = DetailsFrameWork:CreateLabel (phase_panel, "") + amount:SetJustifyH ("right") + local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16) + local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork") + bg:SetPoint ("left", icon, "left"); bg.height = 16; bg:SetPoint ("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8) + + icon:SetPoint ("topleft", phase_panel, "topleft", 250, ((index * 16) * -1) - 16) + player_name:SetPoint ("left", icon, "right", 2, 0) + amount:SetPoint ("topright", phase_panel, "topleft", 440, ((index * 16) * -1) - 16) + + label = {lefttext = player_name, righttext = amount, icon = icon, bg = bg} + phase_panel.heal_labels [index] = label + end + return label end - return label - end - - function phase_panel:GetHealLabel (index) - local label = phase_panel.heal_labels [index] - if (not label) then - local player_name = DetailsFrameWork:CreateLabel (phase_panel, "") - local amount = DetailsFrameWork:CreateLabel (phase_panel, "") - amount:SetJustifyH ("right") - local icon = DetailsFrameWork:CreateImage (phase_panel, "", 16, 16) - local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\AddOns\Details\images\BantoBar]], nil, nil, "artwork") - bg:SetPoint ("left", icon, "left"); bg.height = 16; bg:SetPoint ("right", amount, "right"); bg:SetVertexColor (.2, .2, .2, 0.8) - - icon:SetPoint ("topleft", phase_panel, "topleft", 250, ((index * 16) * -1) - 16) - player_name:SetPoint ("left", icon, "right", 2, 0) - amount:SetPoint ("topright", phase_panel, "topleft", 440, ((index * 16) * -1) - 16) - - label = {lefttext = player_name, righttext = amount, icon = icon, bg = bg} - phase_panel.heal_labels [index] = label + + phase_panel.phase_label = DetailsFrameWork:CreateLabel (phase_panel, "") + phase_panel.time_label = DetailsFrameWork:CreateLabel (phase_panel, "") + phase_panel.report_label = DetailsFrameWork:CreateLabel (phase_panel, "|cFFffb400Left Click|r: Report Damage |cFFffb400Right Click|r: Report Heal") + + phase_panel.phase_label:SetPoint ("bottomleft", phase_panel, "bottomleft", 10, 5) + phase_panel.time_label:SetPoint ("left", phase_panel.phase_label, "right", 5, 0) + phase_panel.report_label:SetPoint ("bottomright", phase_panel, "bottomright", -10, 5) + + local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\Tooltips\UI-Tooltip-Background]], nil, nil, "artwork") + bg:SetPoint ("left", phase_panel.phase_label, "left"); + bg.height = 16; + bg:SetPoint ("right", phase_panel.report_label, "right"); + bg:SetVertexColor (0, 0, 0, 1) + + local spark_container = {} + local create_spark = function() + local t = phase_panel:CreateTexture (nil, "overlay") + t:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]]) + t:SetBlendMode ("ADD") + t:Hide() + tinsert (spark_container, t) end - return label - end - - phase_panel.phase_label = DetailsFrameWork:CreateLabel (phase_panel, "") - phase_panel.time_label = DetailsFrameWork:CreateLabel (phase_panel, "") - phase_panel.report_label = DetailsFrameWork:CreateLabel (phase_panel, "|cFFffb400Left Click|r: Report Damage |cFFffb400Right Click|r: Report Heal") - - phase_panel.phase_label:SetPoint ("bottomleft", phase_panel, "bottomleft", 10, 5) - phase_panel.time_label:SetPoint ("left", phase_panel.phase_label, "right", 5, 0) - phase_panel.report_label:SetPoint ("bottomright", phase_panel, "bottomright", -10, 5) - - local bg = DetailsFrameWork:CreateImage (phase_panel, [[Interface\Tooltips\UI-Tooltip-Background]], nil, nil, "artwork") - bg:SetPoint ("left", phase_panel.phase_label, "left"); bg.height = 16; bg:SetPoint ("right", phase_panel.report_label, "right"); bg:SetVertexColor (0, 0, 0, 1) - - local spark_container = {} - local create_spark = function() - local t = phase_panel:CreateTexture (nil, "overlay") - t:SetTexture ([[Interface\CastingBar\UI-CastingBar-Spark]]) - t:SetBlendMode ("ADD") - t:Hide() - tinsert (spark_container, t) - end - local get_spark = function (index) - local spark = spark_container [index] - if (not spark) then - create_spark() - spark = spark_container [index] + local get_spark = function (index) + local spark = spark_container [index] + if (not spark) then + create_spark() + spark = spark_container [index] + end + spark:ClearAllPoints() + return spark end - spark:ClearAllPoints() - return spark - end - local hide_sparks = function() - for _, spark in ipairs (spark_container) do - spark:Hide() + local hide_sparks = function() + for _, spark in ipairs (spark_container) do + spark:Hide() + end end - end - local phase_on_enter = function (self) + local phase_on_enter = function (self) - local spark1 = get_spark (1) - local spark2 = get_spark (2) - self.texture:SetBlendMode ("ADD") - spark1:SetPoint ("left", self.texture, "left", -16, 0) - spark2:SetPoint ("right", self.texture, "right", 16, 0) - spark1:Show() - spark2:Show() - - local phase = self.phase - local spark_index = 3 - - self.texture:SetVertexColor (1, 1, 1) - - for _, f in ipairs (g.PhaseTextures) do - if (f ~= self and f.phase == phase) then - local spark1 = get_spark (spark_index) - local spark2 = get_spark (spark_index+1) - f.texture:SetBlendMode ("ADD") - f.texture:SetVertexColor (1, 1, 1) - spark1:SetPoint ("left", f.texture, "left", -16, 0) - spark2:SetPoint ("right", f.texture, "right", 16, 0) - spark1:Show() - spark2:Show() - spark_index = spark_index + 2 - end - end - - local combat = DetailsRaidDpsGraph.combat - if (combat) then - - phase_panel:ClearLabels() - - --damage - local players = {} - for player_name, damage in pairs (combat.PhaseData.damage [self.phase]) do - tinsert (players, {player_name, damage}) - end - table.sort (players, _detalhes.Sort2) + local spark1 = get_spark (1) + local spark2 = get_spark (2) + self.texture:SetBlendMode ("ADD") + spark1:SetPoint ("left", self.texture, "left", -16, 0) + spark2:SetPoint ("right", self.texture, "right", 16, 0) + spark1:Show() + spark2:Show() - for i, player in ipairs (players) do - local dlabel = phase_panel:GetDamageLabel (i) - dlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1]) - dlabel.righttext.text = _detalhes:ToK (_math_floor (player [2])) + local phase = self.phase + local spark_index = 3 + + self.texture:SetVertexColor (1, 1, 1) + + for _, f in ipairs (g.PhaseTextures) do + if (f ~= self and f.phase == phase) then + local spark1 = get_spark (spark_index) + local spark2 = get_spark (spark_index+1) + f.texture:SetBlendMode ("ADD") + f.texture:SetVertexColor (1, 1, 1) + spark1:SetPoint ("left", f.texture, "left", -16, 0) + spark2:SetPoint ("right", f.texture, "right", 16, 0) + spark1:Show() + spark2:Show() + spark_index = spark_index + 2 + end + end + + local combat = DetailsRaidDpsGraph.combat + if (combat) then + + phase_panel:ClearLabels() + + --damage + local players = {} + for player_name, damage in pairs (combat.PhaseData.damage [self.phase]) do + tinsert (players, {player_name, damage}) + end + table.sort (players, _detalhes.Sort2) - local class = EncounterDetails:GetClass (player [1]) - local spec = EncounterDetails:GetSpec (player [1]) - - if (spec) then - dlabel.icon.texture = [[Interface\AddOns\Details\images\spec_icons_normal]] - dlabel.icon.texcoord = EncounterDetails.class_specs_coords [spec] - - elseif (class) then - dlabel.icon.texture = [[Interface\AddOns\Details\images\classes_small_alpha]] - dlabel.icon.texcoord = _detalhes.class_coords [class] + for i, player in ipairs (players) do + local dlabel = phase_panel:GetDamageLabel (i) + dlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1]) + dlabel.righttext.text = _detalhes:ToK (_math_floor (player [2])) - else - dlabel.icon.texture = [[Interface\LFGFRAME\LFGROLE_BW]] - dlabel.icon:SetTexCoord (.25, .5, 0, 1) - end - - dlabel.lefttext:Show() - dlabel.righttext:Show() - dlabel.icon:Show() - dlabel.bg:Show() - end - - local damage_players = #players - self.damage_actors = players - - --heal - local players = {} - for player_name, heal in pairs (combat.PhaseData.heal [self.phase]) do - tinsert (players, {player_name, heal}) - end - table.sort (players, _detalhes.Sort2) - - for i, player in ipairs (players) do - local hlabel = phase_panel:GetHealLabel (i) - hlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1]) - hlabel.righttext.text = _detalhes:ToK (_math_floor (player [2])) - - local classe = _detalhes:GetClass (player [1]) - if (classe) then - hlabel.icon:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) - hlabel.icon:SetTexCoord (unpack (_detalhes.class_coords [classe])) - else - hlabel.icon:SetTexture ([[Interface\LFGFRAME\LFGROLE_BW]]) - hlabel.icon:SetTexCoord (.25, .5, 0, 1) - end - - hlabel.lefttext:Show() - hlabel.righttext:Show() - hlabel.icon:Show() - hlabel.bg:Show() - end - - local heal_players = #players - self.heal_actors = players - - --show the panel - phase_panel:SetHeight ((math.max (damage_players, heal_players) * 16) + 60) - phase_panel:SetPoint ("bottom", self, "top", 0, 10) - phase_panel:Show() - - phase_panel.phase_label.text = "|cFFffb400Phase|r: " .. self.phase - - local m, s = _math_floor (self.elapsed / 60), _math_floor (self.elapsed % 60) - phase_panel.time_label.text = "|cFFffb400Elapsed|r: " .. m .. "m " .. s .. "s" - - end - - end - local phase_on_leave = function (self) - table.wipe (self.damage_actors) - table.wipe (self.heal_actors) - - for _, f in ipairs (g.PhaseTextures) do - f.texture:SetBlendMode ("BLEND") - f.texture:SetVertexColor (unpack (f.texture.original_color)) - end - - hide_sparks() - phase_panel:Hide() - end - - local phase_on_click = function (self, button) - if (button == "LeftButton") then - - local result = {} - local reportFunc = function (IsCurrent, IsReverse, AmtLines) - AmtLines = AmtLines + 1 - if (#result > AmtLines) then - for i = #result, AmtLines+1, -1 do - tremove (result, i) + local class = EncounterDetails:GetClass (player [1]) + local spec = EncounterDetails:GetSpec (player [1]) + + if (spec) then + dlabel.icon.texture = [[Interface\AddOns\Details\images\spec_icons_normal]] + dlabel.icon.texcoord = EncounterDetails.class_specs_coords [spec] + + elseif (class) then + dlabel.icon.texture = [[Interface\AddOns\Details\images\classes_small_alpha]] + dlabel.icon.texcoord = _detalhes.class_coords [class] + + else + dlabel.icon.texture = [[Interface\LFGFRAME\LFGROLE_BW]] + dlabel.icon:SetTexCoord (.25, .5, 0, 1) end + + dlabel.lefttext:Show() + dlabel.righttext:Show() + dlabel.icon:Show() + dlabel.bg:Show() end - EncounterDetails:SendReportLines (result) - end - - --need to build here because the mouse will leave the block to click in the send button - tinsert (result, "Details!: Damage for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") - for i = 1, #self.damage_actors do - tinsert (result, EncounterDetails:GetOnlyName (self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor (self.damage_actors [i][2]))) - end - EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) - - elseif (button == "RightButton") then - - local result = {} - local reportFunc = function (IsCurrent, IsReverse, AmtLines) - AmtLines = AmtLines + 1 - if (#result > AmtLines) then - for i = #result, AmtLines+1, -1 do - tremove (result, i) + + local damage_players = #players + self.damage_actors = players + + --heal + local players = {} + for player_name, heal in pairs (combat.PhaseData.heal [self.phase]) do + tinsert (players, {player_name, heal}) + end + table.sort (players, _detalhes.Sort2) + + for i, player in ipairs (players) do + local hlabel = phase_panel:GetHealLabel (i) + hlabel.lefttext.text = EncounterDetails:GetOnlyName (player [1]) + hlabel.righttext.text = _detalhes:ToK (_math_floor (player [2])) + + local classe = _detalhes:GetClass (player [1]) + if (classe) then + hlabel.icon:SetTexture ([[Interface\AddOns\Details\images\classes_small_alpha]]) + hlabel.icon:SetTexCoord (unpack (_detalhes.class_coords [classe])) + else + hlabel.icon:SetTexture ([[Interface\LFGFRAME\LFGROLE_BW]]) + hlabel.icon:SetTexCoord (.25, .5, 0, 1) end + + hlabel.lefttext:Show() + hlabel.righttext:Show() + hlabel.icon:Show() + hlabel.bg:Show() end - EncounterDetails:SendReportLines (result) + + local heal_players = #players + self.heal_actors = players + + --show the panel + phase_panel:SetHeight ((math.max (damage_players, heal_players) * 16) + 60) + phase_panel:SetPoint ("bottom", self, "top", 0, 10) + phase_panel:Show() + + phase_panel.phase_label.text = "|cFFffb400Phase|r: " .. self.phase + + local m, s = _math_floor (self.elapsed / 60), _math_floor (self.elapsed % 60) + phase_panel.time_label.text = "|cFFffb400Elapsed|r: " .. m .. "m " .. s .. "s" + end - tinsert (result, "Details!: Healing for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") - for i = 1, #self.heal_actors do - tinsert (result, EncounterDetails:GetOnlyName (self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor (self.heal_actors [i][2]))) + end + local phase_on_leave = function (self) + table.wipe (self.damage_actors) + table.wipe (self.heal_actors) + + for _, f in ipairs (g.PhaseTextures) do + f.texture:SetBlendMode ("BLEND") + f.texture:SetVertexColor (unpack (f.texture.original_color)) end - EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) + hide_sparks() + phase_panel:Hide() end - end - - function g:GetPhaseTexture (index, phase) - - local texture = g.PhaseTextures [index] - if (not texture) then - local f = CreateFrame ("frame", "EncounterDetailsPhaseTexture" .. index, g) - f:SetHeight (16) + local phase_on_click = function (self, button) + if (button == "LeftButton") then - local t = f:CreateTexture (nil, "artwork") - t:SetAllPoints() - t:SetColorTexture (1, 1, 1, phase_alpha) - t.original_color = {1, 1, 1} - f.texture = t - - f:SetScript ("OnEnter", phase_on_enter) - f:SetScript ("OnLeave", phase_on_leave) - f:SetScript ("OnMouseUp", phase_on_click) - - texture = f - tinsert (g.PhaseTextures, f) - end - - texture:ClearAllPoints() - - phase = math.min (phase, 5) - if (not phase_colors [phase]) then - _detalhes:Msg ("Phase out of range:", phase) - phase = math.max (phase, 1) - end - - texture.texture:SetVertexColor (unpack (phase_colors [phase])) - local oc = texture.texture.original_color - oc[1], oc[2], oc[3] = unpack (phase_colors [phase]) - - texture:Show() - - return texture - end - - function g:ClearPhaseTexture() - for i, texture in pairs (g.PhaseTextures) do - texture:Hide() - end - end - - function g:ChangeColorOnDataSeries (index, color) - self.Data [index].Color = color - self.NeedsUpdate=true - end - - function g:AddDataSeriesOnFirstIndex (points, color, n2) - local data - --Make sure there is data points - if not points then - return - end - - data=points - if n2==nil then - n2=false - end - if n2 or (table.getn(points)==2 and table.getn(points[1])~=2) then - data={} - for k,v in ipairs(points[1]) do - tinsert(data,{v,points[2][k]}) + local result = {} + local reportFunc = function (IsCurrent, IsReverse, AmtLines) + AmtLines = AmtLines + 1 + if (#result > AmtLines) then + for i = #result, AmtLines+1, -1 do + tremove (result, i) + end + end + EncounterDetails:SendReportLines (result) + end + + --need to build here because the mouse will leave the block to click in the send button + tinsert (result, "Details!: Damage for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") + for i = 1, #self.damage_actors do + tinsert (result, EncounterDetails:GetOnlyName (self.damage_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor (self.damage_actors [i][2]))) + end + EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) + + elseif (button == "RightButton") then + + local result = {} + local reportFunc = function (IsCurrent, IsReverse, AmtLines) + AmtLines = AmtLines + 1 + if (#result > AmtLines) then + for i = #result, AmtLines+1, -1 do + tremove (result, i) + end + end + EncounterDetails:SendReportLines (result) + end + + tinsert (result, "Details!: Healing for Phase " .. self.phase .. " of " .. (g.combat and g.combat.is_boss and g.combat.is_boss.name or "Unknown") .. ":") + for i = 1, #self.heal_actors do + tinsert (result, EncounterDetails:GetOnlyName (self.heal_actors[i][1]) .. ": " .. _detalhes:ToK (_math_floor (self.heal_actors [i][2]))) + end + EncounterDetails:SendReportWindow (reportFunc, nil, nil, true) + end end + + function g:GetPhaseTexture (index, phase) - table.insert (self.Data, 1, {Points=data;Color=color}) - - self.NeedsUpdate=true - end + local texture = g.PhaseTextures [index] + + if (not texture) then + local f = CreateFrame ("frame", "EncounterDetailsPhaseTexture" .. index, g) + f:SetHeight (CONST_PHASE_BAR_HEIGHT) + + local t = f:CreateTexture (nil, "artwork") + t:SetAllPoints() + t:SetColorTexture (1, 1, 1, phase_alpha) + t.original_color = {1, 1, 1} + f.texture = t - DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "phases_string", "phases:", "GameFontHighlightSmall") - EncounterDetails.Frame["phases_string"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 20, -450) - - DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt0", "00:00", "GameFontHighlightSmall") - EncounterDetails.Frame["timeamt0"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 85, -450) - - for i = 1, 8, 1 do - local line = g:CreateTexture (nil, "overlay") - line:SetColorTexture (.5, .5, .5, .7) - line:SetWidth (870) - line:SetHeight (1) - line:SetVertexColor (.4, .4, .4, .8) - - DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "dpsamt"..i, "", "GameFontHighlightSmall") - EncounterDetails.Frame["dpsamt"..i]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 27, -61 + (-(39.85*i))) --24.6 - line:SetPoint ("topleft", EncounterDetails.Frame["dpsamt"..i].widget, "bottom", -27, 0) + f:SetScript ("OnEnter", phase_on_enter) + f:SetScript ("OnLeave", phase_on_leave) + f:SetScript ("OnMouseUp", phase_on_click) + + texture = f + tinsert (g.PhaseTextures, f) + end + + texture:ClearAllPoints() + + phase = math.min (phase, 5) + if (not phase_colors [phase]) then + _detalhes:Msg ("Phase out of range:", phase) + phase = math.max (phase, 1) + end - DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt"..i, "", "GameFontHighlightSmall") - EncounterDetails.Frame["timeamt"..i].widget:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 75+(94.9*i), -450) --73 - end - --670, 238 // --1.3 1.62 - - g.max_time = 0 - g.max_damage = 0 - - EncounterDetails.MaxGraphics = EncounterDetails.MaxGraphics or 5 - - for i = 1, EncounterDetails.MaxGraphics do - local texture = g:CreateTexture (nil, "overlay") - texture:SetWidth (9) - texture:SetHeight (9) - texture:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 499, -81) - texture:SetColorTexture (unpack (grafico_cores[i])) - local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") - text:SetPoint ("LEFT", texture, "right", 2, 0) - text:SetJustifyH ("LEFT") - if (i == 1) then - text:SetText (Loc ["STRING_CURRENT"]) - else - text:SetText (Loc ["STRING_TRY"] .. " #" .. i) + texture.texture:SetVertexColor (unpack (phase_colors [phase])) + local oc = texture.texture.original_color + oc[1], oc[2], oc[3] = unpack (phase_colors [phase]) + + texture:Show() + + return texture + end + + function g:ClearPhaseTexture() + for i, texture in pairs (g.PhaseTextures) do + texture:Hide() + end end - --texture:Hide() - g.TryIndicator [#g.TryIndicator+1] = {texture = texture, text = text} - end - local v = g:CreateTexture (nil, "overlay") - v:SetWidth (1) - v:SetHeight (388) - v:SetPoint ("top", g, "top", 0, 1) - v:SetPoint ("left", g, "left", 55, 0) - v:SetColorTexture (1, 1, 1, 1) + --> chart frame implementations - local h = g:CreateTexture (nil, "overlay") - h:SetWidth (868) - h:SetHeight (2) - h:SetPoint ("top", g, "top", 0, -367) - h:SetPoint ("left", g, "left") - h:SetColorTexture (1, 1, 1, 1) + function g:ChangeColorOnDataSeries (index, color) + self.Data [index].Color = color + self.NeedsUpdate=true + end + + function g:AddDataSeriesOnFirstIndex (points, color, n2) + local data + --Make sure there is data points + if not points then + return + end + + data=points + if n2==nil then + n2=false + end + if n2 or (table.getn(points)==2 and table.getn(points[1])~=2) then + data={} + for k,v in ipairs(points[1]) do + tinsert(data,{v,points[2][k]}) + end + end + + table.insert (self.Data, 1, {Points=data;Color=color}) + + self.NeedsUpdate=true + end + + DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "phases_string", "phases:", "GameFontHighlightSmall") + EncounterDetails.Frame["phases_string"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 20, CONST_CHART_TIMELINE_Y_POSITION) + + DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt0", "00:00", "GameFontHighlightSmall") + EncounterDetails.Frame["timeamt0"]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", 85, CONST_CHART_TIMELINE_Y_POSITION) + + --> create lines for damage and time + for i = 1, 8, 1 do + local line = g:CreateTexture (nil, "overlay") + line:SetColorTexture (unpack (CONST_DAMAGE_LINES_COLOR)) + line:SetWidth (CONST_CHART_WIDTH) + line:SetHeight (1) + + DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "dpsamt"..i, "", "GameFontHighlightSmall") + EncounterDetails.Frame["dpsamt"..i]:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", CONST_CHART_DAMAGELINE_X_POSITION, -61 + (-( (CONST_CHART_HEIGHT / 9) *i ))) + line:SetPoint ("topleft", EncounterDetails.Frame["dpsamt"..i].widget, "bottom", -27, 0) + + DetailsFrameWork:NewLabel (EncounterDetails.Frame, EncounterDetails.Frame, nil, "timeamt"..i, "", "GameFontHighlightSmall") + EncounterDetails.Frame["timeamt"..i].widget:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", CONST_CHART_TIMELINE_X_POSITION + ( (CONST_CHART_WIDTH / 9) * i ), CONST_CHART_TIMELINE_Y_POSITION + 1) + end + + g.max_time = 0 + g.max_damage = 0 + + EncounterDetails.MaxGraphics = EncounterDetails.MaxGraphics or 5 + + --> fight segments at the top right corner + for i = 1, EncounterDetails.MaxGraphics do + local texture = g:CreateTexture (nil, "overlay") + texture:SetWidth (9) + texture:SetHeight (9) + texture:SetPoint ("TOPLEFT", EncounterDetails.Frame, "TOPLEFT", (i*65) + 499, -81) + texture:SetColorTexture (unpack (grafico_cores[i])) + local text = g:CreateFontString (nil, "OVERLAY", "GameFontHighlightSmall") + text:SetPoint ("LEFT", texture, "right", 2, 0) + text:SetJustifyH ("LEFT") + if (i == 1) then + text:SetText (Loc ["STRING_CURRENT"]) + else + text:SetText (Loc ["STRING_TRY"] .. " #" .. i) + end + g.TryIndicator [#g.TryIndicator+1] = {texture = texture, text = text} + end + + --> vertical line at the left side + local v = g:CreateTexture (nil, "overlay") + v:SetWidth (1) + v:SetHeight (CONST_CHART_HEIGHT + 1) + v:SetPoint ("top", g, "top", 0, 1) + v:SetPoint ("left", g, "left", CONST_CHART_DAMAGELINE_X_POSITION + 30, 0) --> leave 30 pixels for the damage text + v:SetColorTexture (1, 1, 1, 1) + + --> horizontal line at the bottom side + local h = g:CreateTexture (nil, "overlay") + h:SetWidth (CONST_CHART_WIDTH) + h:SetHeight (1) + h:SetPoint ("top", g, "top", 0, -CONST_CHART_HEIGHT + CONST_PHASE_BAR_HEIGHT*2) + h:SetPoint ("left", g, "left") + h:SetColorTexture (1, 1, 1, 1) end -- ~start ~main ~frame ~baseframe ~bossframe @@ -1032,22 +1058,34 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) name_bg_texture:SetHeight (54) name_bg_texture:SetVertexColor (0, 0, 0, 0.2) + --> header background + local headerFrame = CreateFrame ("frame", "EncounterDetailsHeaderFrame", BossFrame) + headerFrame:EnableMouse (false) + headerFrame:SetPoint ("topleft", titlebar, "bottomleft", 0, -1) + headerFrame:SetPoint ("topright", titlebar, "bottomright", 0, -1) + headerFrame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true}) + headerFrame:SetBackdropColor (.7, .7, .7, .4) + headerFrame:SetBackdropBorderColor (0, 0, 0, 0) + headerFrame:SetHeight (48) + --window title local titleLabel = DetailsFrameWork:NewLabel (titlebar, titlebar, nil, "titulo", Loc ["STRING_WINDOW_TITLE"], "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) titleLabel:SetPoint ("center", BossFrame, "center") titleLabel:SetPoint ("top", BossFrame, "top", 0, -7) --> Nome do Encontro - DetailsFrameWork:NewLabel (BossFrame, BossFrame, nil, "boss_name", "Unknown Encounter", "QuestFont_Large") + DetailsFrameWork:NewLabel (headerFrame, headerFrame, nil, "boss_name", "Unknown Encounter", "QuestFont_Large") + BossFrame.boss_name = headerFrame.boss_name BossFrame.boss_name:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 100, -46) - + --> Nome da Raid - DetailsFrameWork:NewLabel (BossFrame, BossFrame, nil, "raid_name", "Unknown Raid", "GameFontHighlightSmall") + DetailsFrameWork:NewLabel (headerFrame, headerFrame, nil, "raid_name", "Unknown Raid", "GameFontHighlightSmall") + BossFrame.raid_name = headerFrame.raid_name BossFrame.raid_name:SetPoint ("CENTER", BossFrame.boss_name, "CENTER", 0, 14) --> icone da classe no canto esquerdo superior - BossFrame.boss_icone = BossFrame:CreateTexture (nil, "overlay") - BossFrame.boss_icone:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 4, -24) + BossFrame.boss_icone = headerFrame:CreateTexture (nil, "overlay") + BossFrame.boss_icone:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 9, -24) BossFrame.boss_icone:SetWidth (46) BossFrame.boss_icone:SetHeight (46) @@ -1154,6 +1192,10 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) to = to2 end + for _, button in ipairs (BossFrame.AllButtons) do + button:SetTemplate (PhaseButtonTemplate) + end + BossFrame.DBMBars:Hide() BossFrame.BigWigsBars:Hide() BossFrame.label_dbm_bars:Hide() @@ -1174,6 +1216,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) BossFrame.ShowType = "main" BossFrame.segmentosDropdown:Enable() + + BossFrame.buttonSwitchNormal:SetTemplate (PhaseButtonTemplateSelected) elseif (to == "spellsauras") then @@ -1208,6 +1252,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) BossFrame.DBMBars:Refresh() BossFrame.BigWigsBars:Refresh() + + BossFrame.buttonSwitchSpellsAuras:SetTemplate (PhaseButtonTemplateSelected) elseif (to == "emotes") then @@ -1245,6 +1291,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) BossFrame.EmotesSegment:Select (emote_segment) BossFrame.segmentosDropdown:Disable() + + BossFrame.buttonSwitchBossEmotes:SetTemplate (PhaseButtonTemplateSelected) elseif (to == "phases") then @@ -1256,6 +1304,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) BossFrame.ShowType = "phases" EncounterDetailsPhaseFrame:Show() + + BossFrame.buttonSwitchPhases:SetTemplate (PhaseButtonTemplateSelected) elseif (to == "graph") then @@ -1292,45 +1342,50 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end BossFrame.segmentosDropdown:Enable() + + BossFrame.buttonSwitchGraphic:SetTemplate (PhaseButtonTemplateSelected) end end -- ~button ~menu - --summary - local BUTTON_WIDTH = 80 - local BUTTON_HEIGHT = 20 + local BUTTON_WIDTH = 120 + local BUTTON_HEIGHT = 20 + local HEADER_MENUBUTTONS_SPACEMENT = 4 + local HEADER_MENUBUTTONS_X = 290 + local HEADER_MENUBUTTONS_Y = -38 + + --summary BossFrame.buttonSwitchNormal = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Summary", "main") - BossFrame.buttonSwitchNormal:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 300, -38) - BossFrame.buttonSwitchNormal:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0, 0.1015625, 0, 0.515625}) - BossFrame.buttonSwitchNormal:SetTemplate (PhaseButtonTemplate) + BossFrame.buttonSwitchNormal:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", HEADER_MENUBUTTONS_X, HEADER_MENUBUTTONS_Y) + BossFrame.buttonSwitchNormal:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0, 0.1015625, 0, 0.505625}) + BossFrame.buttonSwitchNormal:SetTemplate (PhaseButtonTemplateSelected) --chart BossFrame.buttonSwitchGraphic = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Charts", "graph") - BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", 0, 0) - BossFrame.buttonSwitchGraphic:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0.1171875, 0.21875, 0, 0.515625}) + BossFrame.buttonSwitchGraphic:SetPoint ("left", BossFrame.buttonSwitchNormal, "right", HEADER_MENUBUTTONS_SPACEMENT, 0) + BossFrame.buttonSwitchGraphic:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {0.1271875, 0.21875, 0, 0.505625}) BossFrame.buttonSwitchGraphic:SetTemplate (PhaseButtonTemplate) --emotes BossFrame.buttonSwitchBossEmotes = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Emotes", "emotes") - BossFrame.buttonSwitchBossEmotes:SetPoint ("left", BossFrame.buttonSwitchGraphic, "right", 0, 0) - BossFrame.buttonSwitchBossEmotes:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {90/256, 116/256, 0, 0.515625}) + BossFrame.buttonSwitchBossEmotes:SetPoint ("left", BossFrame.buttonSwitchGraphic, "right", HEADER_MENUBUTTONS_SPACEMENT, 0) + BossFrame.buttonSwitchBossEmotes:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {91/256, 116/256, 0, 0.505625}) BossFrame.buttonSwitchBossEmotes:SetTemplate (PhaseButtonTemplate) --spells e auras BossFrame.buttonSwitchSpellsAuras = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "WeakAuras", "spellsauras") - BossFrame.buttonSwitchSpellsAuras:SetPoint ("left", BossFrame.buttonSwitchBossEmotes, "right", 0, 0) - BossFrame.buttonSwitchSpellsAuras:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {120/256, 146/256, 0, 0.515625}) + BossFrame.buttonSwitchSpellsAuras:SetPoint ("left", BossFrame.buttonSwitchBossEmotes, "right", HEADER_MENUBUTTONS_SPACEMENT, 0) + BossFrame.buttonSwitchSpellsAuras:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {121/256, 146/256, 0, 0.505625}) BossFrame.buttonSwitchSpellsAuras:SetTemplate (PhaseButtonTemplate) --phases BossFrame.buttonSwitchPhases = _detalhes.gump:CreateButton (BossFrame, BossFrame.switch, BUTTON_WIDTH, BUTTON_HEIGHT, "Phases", "phases") - BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchSpellsAuras, "right", 0, 0) - --BossFrame.buttonSwitchPhases:SetIcon ([[Interface\AdventureMap\AdventureMap]], 18, 18, "overlay", {801/1024, 845/1024, 249/1024, 291/1024}) - BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {150/256, 176/256, 0, 0.515625}) + BossFrame.buttonSwitchPhases:SetPoint ("left", BossFrame.buttonSwitchSpellsAuras, "right", HEADER_MENUBUTTONS_SPACEMENT, 0) + BossFrame.buttonSwitchPhases:SetIcon ("Interface\\AddOns\\Details_EncounterDetails\\images\\boss_frame_buttons", 18, 18, "overlay", {151/256, 176/256, 0, 0.505625}) BossFrame.buttonSwitchPhases:SetTemplate (PhaseButtonTemplate) - + BossFrame.AllButtons = {BossFrame.buttonSwitchNormal, BossFrame.buttonSwitchGraphic, BossFrame.buttonSwitchBossEmotes, BossFrame.buttonSwitchSpellsAuras, BossFrame.buttonSwitchPhases} --tooltips BossFrame.buttonSwitchNormal.MouseOnEnterHook = function() @@ -1375,6 +1430,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) local emote_lines = {} local emote_search_table = {} + local CONST_EMOTES_MAX_LINES = 32 + local refresh_emotes = function (self) --update emote scroll @@ -1409,7 +1466,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end if (emote_pool) then - for bar_index = 1, 26 do + for bar_index = 1, CONST_EMOTES_MAX_LINES do local data = emote_pool [bar_index + offset] local bar = emote_lines [bar_index] @@ -1436,9 +1493,9 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end end - FauxScrollFrame_Update (self, #emote_pool, 26, 15) + FauxScrollFrame_Update (self, #emote_pool, CONST_EMOTES_MAX_LINES, 15) else - for bar_index = 1, 26 do + for bar_index = 1, CONST_EMOTES_MAX_LINES do local bar = emote_lines [bar_index] bar:Hide() end @@ -1448,7 +1505,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) BossFrame.EmoteWidgets = {} --~emotes ~whispers - local bar_div_emotes = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 390, "artwork", {724/1024, 728/1024, 0, 245/512}) + local bar_div_emotes = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512}) bar_div_emotes:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74) bar_div_emotes:Hide() tinsert (BossFrame.EmoteWidgets, bar_div_emotes) @@ -1508,7 +1565,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) EncounterDetails:SendReportWindow (reportFunc) end - for i = 1, 26 do + for i = 1, CONST_EMOTES_MAX_LINES do local line = CreateFrame ("frame", nil, BossFrame) local y = (i-1) * 15 * -1 line:SetPoint ("topleft", scrollframe, "topleft", 0, y) @@ -1571,8 +1628,9 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end return t end - local dropdown = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEmotesSegmentDropdown", "EmotesSegment", 160, 20, build_emote_segments, 1) + local dropdown = DetailsFrameWork:NewDropDown (BossFrame, _, "$parentEmotesSegmentDropdown", "EmotesSegment", 180, 20, build_emote_segments, 1) dropdown:SetPoint ("topleft", emotes_segment_label, "bottomleft", -1, -2) + dropdown:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) tinsert (BossFrame.EmoteWidgets, dropdown) tinsert (BossFrame.EmoteWidgets, emotes_segment_label) @@ -1584,8 +1642,8 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) local emotes_search_results_label = DetailsFrameWork:CreateLabel (BossFrame, "", 11, nil, "GameFontNormal", "SearchResults") emotes_search_results_label:SetPoint ("topleft", BossFrame, "topleft", 10, -190) -- - local search = DetailsFrameWork:NewTextEntry (BossFrame, nil, "$parentEmoteSearchBox", nil, 160, 20) - search:SetTemplate (PhaseButtonTemplate) + local search = DetailsFrameWork:NewTextEntry (BossFrame, nil, "$parentEmoteSearchBox", nil, 180, 20) + search:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) search:SetPoint ("topleft",emotes_search_label, "bottomleft", -1, -2) search:SetJustifyH ("left") @@ -1619,7 +1677,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) tinsert (BossFrame.EmoteWidgets, emotes_search_label) -- report button - local report_emote_button = DetailsFrameWork:NewButton (BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 160, 16, function() + local report_emote_button = DetailsFrameWork:NewButton (BossFrame, nil, "$parentReportEmoteButton", "ReportEmoteButton", 180, 20, function() local reportFunc = function (IsCurrent, IsReverse, AmtLines) local segment = EncounterDetails.charsaved.emotes and EncounterDetails.charsaved.emotes [emote_segment] @@ -1665,15 +1723,15 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) EncounterDetails:Msg ("There is nothing to report.") end end - + local use_slider = true EncounterDetails:SendReportWindow (reportFunc, nil, nil, use_slider) end, nil, nil, nil, "Report Results") - - report_emote_button:SetIcon ([[Interface\AddOns\Details\images\report_button]], 8, 14, nil, {0, 1, 0, 1}, nil, 4, 2) - report_emote_button:SetTemplate (PhaseButtonTemplate) - report_emote_button:SetPoint ("topleft", search, "bottomleft", 0, -2) + report_emote_button:SetIcon ([[Interface\AddOns\Details\images\report_button]], 8, 14, nil, {0, 1, 0, 1}, nil, 4, 2) + report_emote_button:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) + + report_emote_button:SetPoint ("topleft", search, "bottomleft", 0, -4) report_emote_button:Disable() tinsert (BossFrame.EmoteWidgets, report_emote_button) @@ -1696,8 +1754,11 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) --> spells and auras ~auras ~spell ~weakaura ăura - -- actor dropdown + local CONST_MAX_AURA_LINES = 22 + + -- actor dropdown + local EnemyActorSpells_label = DetailsFrameWork:CreateLabel (BossFrame, "Enemy Unit:", 11, nil, "GameFontHighlightSmall") EnemyActorSpells_label:SetPoint ("topleft", BossFrame, "topleft", 10, -85) @@ -1761,7 +1822,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) self:SetBackdropColor (.3, .3, .3, .5) end - for i = 1, 18 do + for i = 1, CONST_MAX_AURA_LINES do local anchor_frame = CreateFrame ("frame", "BossFrameSpellAnchor" .. i, BossFrame) local icon_button_func = function (texture) @@ -1772,15 +1833,15 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) local spellicon = DetailsFrameWork:NewImage (spellicon_button, [[Interface\ICONS\TEMP]], 19, 19, "background", nil, "icon", "$parentIcon") spellicon_button:InstallCustomTexture() - local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 60, 20) - spellid:SetTemplate (PhaseButtonTemplate) + local spellid = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 80, 20) + spellid:SetTemplate (AurasButtonTemplate) spellid:SetHook ("OnEditFocusGained", on_focus_gain) spellid:SetHook ("OnEditFocusLost", on_focus_lost) spellid:SetHook ("OnEnter", on_enter_spell) spellid:SetHook ("OnLeave", on_leave_spell) - local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 140, 20) - spellname:SetTemplate (PhaseButtonTemplate) + local spellname = DetailsFrameWork:CreateTextEntry (anchor_frame, EncounterDetails.empty_function, 180, 20) + spellname:SetTemplate (AurasButtonTemplate) spellname:SetHook ("OnEditFocusGained", on_focus_gain) spellname:SetHook ("OnEditFocusLost", on_focus_lost) spellname:SetHook ("OnEnter", on_enter_spell) @@ -1795,8 +1856,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) spellinfo:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true}) spellinfo:SetBackdropColor (.3, .3, .3, .5) spellinfo:SetBackdropBorderColor (0, 0, 0, 1) - - spellinfo:SetSize (60, 20) + spellinfo:SetSize (80, 20) spellinfo:SetScript ("OnEnter", info_onenter) spellinfo:SetScript ("OnLeave", info_onleave) @@ -1805,9 +1865,9 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) spellinfotext:SetText ("info") spellinfo:SetPoint ("left", spellname.widget, "right", 4, 0) - local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 105, 18, create_aura_func, nil, nil, nil, "Create Aura") + local create_aura = DetailsFrameWork:NewButton (anchor_frame, nil, "$parentCreateAuraButton", "AuraButton", 135, 18, create_aura_func, nil, nil, nil, "Create Aura") create_aura:SetPoint ("left", spellinfo, "right", 4, 0) - create_aura:SetTemplate (PhaseButtonTemplate) + create_aura:SetTemplate (AurasButtonTemplate) anchor_frame.icon = spellicon anchor_frame.spellid = spellid @@ -1872,7 +1932,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) local encounter_id = EncounterDetails_SpellAurasScroll.encounter_id local offset = FauxScrollFrame_GetOffset (self) - for bar_index = 1, 18 do + for bar_index = 1, CONST_MAX_AURA_LINES do local data = pool [bar_index + offset] local bar = spell_blocks [bar_index] @@ -1903,7 +1963,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) end end - FauxScrollFrame_Update (self, #pool, 18, 20) + FauxScrollFrame_Update (self, #pool, CONST_MAX_AURA_LINES, 20) end @@ -1947,7 +2007,7 @@ _detalhes.EncounterDetailsTempWindow = function (EncounterDetails) EnemyActorSpells:Hide() EnemyActorSpells_label:Hide() - local bar_div = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 390, "artwork", {724/1024, 728/1024, 0, 245/512}) + local bar_div = DetailsFrameWork:CreateImage (BossFrame, "Interface\\AddOns\\Details_EncounterDetails\\images\\boss_bg", 4, 480, "artwork", {724/1024, 728/1024, 0, 245/512}) bar_div:SetPoint ("TOPLEFT", BossFrame, "TOPLEFT", 244, -74) bar_div:Hide() @@ -2076,7 +2136,7 @@ PhaseFrame.CurrentSegment = {} PhaseFrame.PhaseButtons = {} EncounterDetailsPhaseFrame:Hide() -local ScrollWidth, ScrollHeight, ScrollLineAmount, ScrollLineHeight = 200, 310, 15, 20 +local ScrollWidth, ScrollHeight, ScrollLineAmount, ScrollLineHeight = 250, 410, 20, 20 local PhasesY = -88 local AnchorY = -120 @@ -2520,20 +2580,29 @@ end segmentos_string:SetPoint ("bottomleft", frame, "bottomleft", 20, 16) -- ~dropdown - local segmentos = DetailsFrameWork:NewDropDown (frame, _, "$parentSegmentsDropdown", "segmentosDropdown", 160, 18, buildSegmentosMenu, nil) + local segmentos = DetailsFrameWork:NewDropDown (frame, _, "$parentSegmentsDropdown", "segmentosDropdown", 160, 20, buildSegmentosMenu, nil) segmentos:SetPoint ("left", segmentos_string, "right", 2, 0) + segmentos:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) - local options = DetailsFrameWork:NewButton (frame, nil, "$parentOptionsButton", "OptionsButton", 86, 16, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") - options:SetPoint ("left", segmentos, "right", 7, -1) + --> options button + local options = DetailsFrameWork:NewButton (frame, nil, "$parentOptionsButton", "OptionsButton", 120, 20, EncounterDetails.OpenOptionsPanel, nil, nil, nil, "Options") + options:SetPoint ("left", segmentos, "right", 10, 0) options:SetTextColor (1, 0.93, 0.74) options:SetIcon ([[Interface\Buttons\UI-OptionsButton]], 14, 14, nil, {0, 1, 0, 1}, nil, 3) + options:SetTemplate (DetailsFrameWork:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")) --> Caixa do Dano total tomado pela Raid - -- ~containers ~frontpage ~damagetaken + -- ~containers ~damagetaken + + local CONST_BOX_HEIGHT = 220 + local CONST_BOX_VERTICAL_SPACING = -26 + local CONST_BOX_HORIZONTAL_SPACING = 42 + local BOX_WIDTH = 250 - local BOX_HEIGHT = 170 - local BOX_HEIGHT_UPPER = 175 + local BOX_HEIGHT = CONST_BOX_HEIGHT --232 + local BOX_HEIGHT_UPPER = CONST_BOX_HEIGHT --175 + local container_damagetaken_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDamageTaken", frame) set_backdrop (container_damagetaken_window) @@ -2556,11 +2625,8 @@ end frame.Widgets [#frame.Widgets+1] = dano_recebido_bg - DetailsFrameWork:NewLabel (dano_recebido_bg, dano_recebido_bg, nil, "damagetaken_title", "Damage Taken per Player", "GameFontHighlightSmall") --localize-me - dano_recebido_bg.damagetaken_title:SetPoint ("BOTTOMLEFT", container_damagetaken_window, "TOPLEFT", 5, 3) - - --container_damagetaken_window:SetBackdrop({edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, insets = {left = 1, right = 1, top = 0, bottom = 1},}) - --container_damagetaken_window:SetBackdropBorderColor (0,0,0,0) + DetailsFrameWork:NewLabel (dano_recebido_bg, dano_recebido_bg, nil, "damagetaken_title", "Damage Taken per Player", "GameFontHighlight") --localize-me + dano_recebido_bg.damagetaken_title:SetPoint ("BOTTOMLEFT", container_damagetaken_window, "TOPLEFT", 5, 0) container_damagetaken_frame:SetBackdrop (backdrop) container_damagetaken_frame:SetBackdropBorderColor (0,0,0,0) @@ -2596,10 +2662,8 @@ end set_backdrop (container_habilidades_window) local container_habilidades_frame = CreateFrame ("Frame", "Details_Boss_FrameHabilidades", container_habilidades_window) - container_habilidades_frame:SetScript ("OnMouseDown", mouse_down) container_habilidades_frame:SetScript ("OnMouseUp", mouse_up) - container_habilidades_frame.barras = {} --label titulo % background @@ -2615,12 +2679,8 @@ end frame.Widgets [#frame.Widgets+1] = container_habilidades_window frame.Widgets [#frame.Widgets+1] = container_habilidades_frame - DetailsFrameWork:NewLabel (habilidades_inimigas_bg, habilidades_inimigas_bg, nil, "habilidades_title", "Damage Taken by Spell", "GameFontHighlightSmall") --localize-me - habilidades_inimigas_bg.habilidades_title:SetPoint ("BOTTOMLEFT", container_habilidades_window, "TOPLEFT", 5, 3) - - --> container background - --container_habilidades_window:SetBackdrop({edgeFile = "Interface\\DialogFrame\\UI-DialogBox-gold-Border", tile = true, tileSize = 16, edgeSize = 5, insets = {left = 1, right = 1, top = 0, bottom = 1},}) - --container_habilidades_window:SetBackdropBorderColor (0,0,0,0) + DetailsFrameWork:NewLabel (habilidades_inimigas_bg, habilidades_inimigas_bg, nil, "habilidades_title", "Damage Taken by Spell", "GameFontHighlight") --localize-me + habilidades_inimigas_bg.habilidades_title:SetPoint ("BOTTOMLEFT", container_habilidades_window, "TOPLEFT", 5, 0) container_habilidades_frame:SetBackdrop (backdrop) container_habilidades_frame:SetBackdropBorderColor (0,0,0,0) @@ -2636,7 +2696,7 @@ end container_habilidades_window:SetWidth (BOX_WIDTH) container_habilidades_window:SetHeight (BOX_HEIGHT) container_habilidades_window:SetScrollChild (container_habilidades_frame) - container_habilidades_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 10, -286) + container_habilidades_window:SetPoint ("TOPLEFT", container_damagetaken_window, "bottomleft", 0, CONST_BOX_VERTICAL_SPACING) --LOCATION DetailsFrameWork:NewScrollBar (container_habilidades_window, container_habilidades_frame, 4, -16) container_habilidades_window.slider:Altura (BOX_HEIGHT-31) @@ -2654,7 +2714,7 @@ end --> Caixa dos Adds -- ~adds ădds local BOX_WIDTH = 270 - local BOX_HEIGHT = 173 + local BOX_HEIGHT = CONST_BOX_HEIGHT --173 local container_adds_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerAdds", frame) set_backdrop (container_adds_window) @@ -2664,7 +2724,7 @@ end frame.Widgets [#frame.Widgets+1] = container_adds_window container_adds_frame.barras = {} - local adds_total_string = DetailsFrameWork:CreateLabel ( container_adds_window, "damage done") + local adds_total_string = DetailsFrameWork:CreateLabel (container_adds_window, "damage done") adds_total_string.textcolor = "gray" adds_total_string.textsize = 9 adds_total_string:SetPoint ("bottomright", container_adds_window, "topright", 0, 3) @@ -2679,9 +2739,9 @@ end container_adds_window:SetWidth (BOX_WIDTH) container_adds_window:SetHeight (BOX_HEIGHT_UPPER) container_adds_window:SetScrollChild (container_adds_frame) - container_adds_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 290, -90) + container_adds_window:SetPoint ("TOPLEFT", container_damagetaken_window, "topright", CONST_BOX_HORIZONTAL_SPACING, 0) - DetailsFrameWork:NewLabel (container_adds_window, container_adds_window, nil, "titulo", Loc ["STRING_ADDS"], "QuestFont_Large", 16, {1, 1, 1}) + DetailsFrameWork:NewLabel (container_adds_window, container_adds_window, nil, "titulo", Loc ["STRING_ADDS"], "GameFontHighlight") container_adds_window.titulo:SetPoint ("bottomleft", container_adds_window, "topleft", 0, 0) DetailsFrameWork:NewScrollBar (container_adds_window, container_adds_frame, 4, -16) @@ -2724,11 +2784,10 @@ end container_interrupt_window:SetWidth (BOX_WIDTH) container_interrupt_window:SetHeight (BOX_HEIGHT_UPPER) container_interrupt_window:SetScrollChild (container_interrupt_frame) - --container_interrupt_window:SetPoint ("TOPLEFT", frame, "TOPLEFT", 470, -234) - container_interrupt_window:SetPoint ("TOPLEFT", container_adds_window, "TOPRIGHT", 28, 0) + container_interrupt_window:SetPoint ("TOPLEFT", container_adds_window, "TOPRIGHT", CONST_BOX_HORIZONTAL_SPACING, 0) - DetailsFrameWork:NewLabel (container_interrupt_window, container_interrupt_window, nil, "titulo", Loc ["STRING_INTERRUPTS"], "QuestFont_Large", 16, {1, 1, 1}) - container_interrupt_window.titulo:SetPoint ("bottomleft", container_interrupt_window, "topleft", 0, 3) + DetailsFrameWork:NewLabel (container_interrupt_window, container_interrupt_window, nil, "titulo", Loc ["STRING_INTERRUPTS"], "GameFontHighlight") + container_interrupt_window.titulo:SetPoint ("bottomleft", container_interrupt_window, "topleft", 0, 0) DetailsFrameWork:NewScrollBar (container_interrupt_window, container_interrupt_frame, 4, -16) container_interrupt_window.slider:Altura (BOX_HEIGHT-31) @@ -2771,9 +2830,9 @@ end container_dispell_window:SetWidth (BOX_WIDTH) container_dispell_window:SetHeight (BOX_HEIGHT_UPPER) container_dispell_window:SetScrollChild (container_dispell_frame) - container_dispell_window:SetPoint ("TOPLEFT", container_adds_window, "BOTTOMLEFT", 0, -28) + container_dispell_window:SetPoint ("TOPLEFT", container_adds_window, "BOTTOMLEFT", 0, CONST_BOX_VERTICAL_SPACING) - DetailsFrameWork:NewLabel (container_dispell_window, container_dispell_window, nil, "titulo", Loc ["STRING_DISPELLS"], "QuestFont_Large", 16, {1, 1, 1}) + DetailsFrameWork:NewLabel (container_dispell_window, container_dispell_window, nil, "titulo", Loc ["STRING_DISPELLS"], "GameFontHighlight") container_dispell_window.titulo:SetPoint ("bottomleft", container_dispell_window, "topleft", 0, 0) DetailsFrameWork:NewScrollBar (container_dispell_window, container_dispell_frame, 4, -16) @@ -2787,7 +2846,7 @@ end container_dispell_frame.window = container_dispell_window container_dispell_window.ultimo = 0 frame.overall_dispell = container_dispell_window - + --> Caixa das mortes -- ~mortes ~deaths ~dead local container_dead_window = CreateFrame ("ScrollFrame", "Details_Boss_ContainerDead", frame) @@ -2805,15 +2864,15 @@ end container_dead_frame:SetScript ("OnMouseDown", mouse_down) container_dead_frame:SetScript ("OnMouseUp", mouse_up) container_dead_frame.barras = {} - + container_dead_frame:SetPoint ("left", container_dead_window, "left") container_dead_frame:SetPoint ("right", container_dead_window, "right") container_dead_frame:SetPoint ("top", container_dead_window, "top") container_dead_frame:SetPoint ("bottom", container_dead_window, "bottom", 0, 10) - + container_dead_frame:SetWidth (BOX_WIDTH) container_dead_frame:SetHeight (BOX_HEIGHT) - + container_dead_frame:EnableMouse (true) container_dead_frame:SetResizable (false) container_dead_frame:SetMovable (true) @@ -2821,10 +2880,10 @@ end container_dead_window:SetWidth (BOX_WIDTH) container_dead_window:SetHeight (BOX_HEIGHT_UPPER) container_dead_window:SetScrollChild (container_dead_frame) - container_dead_window:SetPoint ("TOPLEFT", container_dispell_window, "TOPRIGHT", 28, 0) - - DetailsFrameWork:NewLabel (container_dead_window, container_dead_window, nil, "titulo", Loc ["STRING_DEATH_LOG"], "QuestFont_Large", 16, {1, 1, 1}) - container_dead_window.titulo:SetPoint ("bottomleft", container_dead_window, "topleft", 0, 1) + container_dead_window:SetPoint ("TOPLEFT", container_dispell_window, "TOPRIGHT", CONST_BOX_HORIZONTAL_SPACING, 0) + + DetailsFrameWork:NewLabel (container_dead_window, container_dead_window, nil, "titulo", Loc ["STRING_DEATH_LOG"], "GameFontHighlight") + container_dead_window.titulo:SetPoint ("bottomleft", container_dead_window, "topleft", 0, 0) DetailsFrameWork:NewScrollBar (container_dead_window, container_dead_frame, 4, -16) container_dead_window.slider:Altura (BOX_HEIGHT-31) @@ -2837,8 +2896,8 @@ end container_dead_frame.window = container_dead_window container_dead_window.ultimo = 0 frame.overall_dead = container_dead_window - - + + --emotes frame local emote_frame = CreateFrame ("frame", "DetailsEncountersEmoteFrame", UIParent) emote_frame:RegisterEvent ("CHAT_MSG_RAID_BOSS_EMOTE")