diff --git a/boot.lua b/boot.lua index 4c927e1e..a12cb213 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 489 --it's 489 for release - _detalhes.userversion = "v3.9.0" + _detalhes.userversion = "v3.9.1" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,16 +20,17 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.9.0 (|cFFFFCC00Jan 28, 2015|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Minimalistic V1 is now the default skin again.\n\n -|cFFFFFF00-|r Few improvements on skins.\n\n +|cFFFFFF00v3.9.1 (|cFFFFCC00Jan 29, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r More tweaks and fixes on skins.\n\n +|cFFFFFF00-|r Improvements on Bookmark panel.\n\n +|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n |cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n --]] ---|cFFFFFF00v3.9.0 (|cFFFFCC00Jan 28, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Minimalistic V1 is now the default skin again.\n\n|cFFFFFF00-|r Few improvements on skins.\n\n|cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n +--|cFFFFFF00v3.9.1 (|cFFFFCC00Jan 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More tweaks and fixes in skins.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.0 (|cFFFFCC00Jan 28, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Minimalistic V1 is now the default skin again.\n\n|cFFFFFF00-|r Few improvements on skins.\n\n|cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel.\n\n|cFFFFFF00v3.6.8 (|cFFFFCC00Dec 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Fast (i mean, really fast) Dps/Hps update rate, its option is under Rows: Advanced -> Fast Updates.\n\n|cFFFFFF00-|r Created a custom spell for Mirror Image's Fireball and Frostbolt, with that Player Detail window distinguishes spells from the player and images.\n\n|cFFFFFF00-|r Added new skin: 'ElvUI Style II'." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.1 (|cFFFFCC00Jan 29, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r More tweaks and fixes on skins.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n|cFFFFFF00v3.8.13 (|cFFFFCC00Jan 26, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r RaidCheck (plugin): added an option to be able to use the report panel.\n\n|cFFFFFF00-|r You Are Not Prepared (plugin): added Auto Close the window, can be disabled through its options panel.\n\n|cFFFFFF00-|r Vanguard (plugin): Added Options Panel.\n\n|cFFFFFF00-|r Details! is now using 'LibWindow-1.1' to save and restore the positioning of the windows, bug might appear, please report if something weird happen.\n\n|cFFFFFF00-|r Improved specialization detection in order to try detect spec changes.\n\n|cFFFFFF00-|r Added options to change the brackets and the separator for dps/percent block.\n\n|cFFFFFF00-|r Added options for show (or hide) totals, dps and percent amount.\n\n|cFFFFFF00-|r Added Segments shortcut menu pressing Shift + Right click.\n\n|cFFFFFF00-|r Fixed positioning after reopen a window previously closed on last logon.\n\n|cFFFFFF00-|r Fixed enemies display where sometimes the bars were black instead of red.\n\n|cFFFFFF00-|r Fixed few places where spec icons wasn't being used on.\n\n|cFFFFFF00-|r Fixed avoidance panel on Player Details Window where sometimes was giving errors.\n\n|cFFFFFF00-|r Fixed priest shadow and holy detection.\n\n|cFFFFFF00-|r Fixed blood and unholy spec icons.\n\n|cFFFFFF00-|r Fixed an issue with 'Always Show me' feature where it was showing the player on Enemies display.\n\n|cFFFFFF00v3.8.1 (|cFFFFCC00Jan 17, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin Vanguard: got full rewrite and now it is more easy to use.\n\n|cFFFFFF00-|r Plugin TimeAttack: fixed problem where sometimes required a reload to start a new time.\n\n|cFFFFFF00-|r Plugin Damage the Game!: fixed a problem where sometimes the time didn't started after level 2.\n\n|cFFFFFF00-|r Added specialization icons.\n\n|cFFFFFF00-|r Fixed Auto-Hide where it wasn't hiding the wallpaper of the window.\n\n|cFFFFFF00-|r Added 'Editing Group' check box on option panel, when enabled, settings changed also are modified on all windows in the group.\n\n|cFFFFFF00-|r Changing window's skin, doesn't change any more settings not related with appearance, for example, Auto-Hide, Switches.\n\n|cFFFFFF00-|r Custom display 'Health Potion & Stone' now also track Healing Tonic.\n\n|cFFFFFF00-|r Custom display 'Damage Taken by Spell' now tracks more spells and also melee hits.\n\n|cFFFFFF00-|r Menus now uses 'Friz Quadrata TT' font as default, also added an option to change it on options panel -> miscellaneous.\n\n|cFFFFFF00-|r 'Switch to Current' feature now switches all windows which have this option enabled.\n\n|cFFFFFF00-|r The message telling to use '/details reinstall' now only shows if a problem happen during the addon load process.\n\n|cFFFFFF00-|r Segments Saved option now can be set to 25, up from 5.\n\n|cFFFFFF00-|r Attempt to fix the bug with the monk spell 'Storm, Earth, and Fire'.\n\n|cFFFFFF00-|r Fixed 'Icon Pick' panel.\n\n|cFFFFFF00-|r Fixed bug when reporting friendly fire through player detail window.\n\n|cFFFFFF00-|r Fixed bug with report window where sometimes it was reporting on a wrong channel.\n\n|cFFFFFF00v3.7.1 (|cFFFFCC00Jan 08, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Plugin 'Damage Rank': is now called 'Damage, the Game!' and had its levels adjusted for WoD.\n\n|cFFFFFF00-|r Plugin 'Tiny Threat': fixed player name where it was showing the realm name too.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed frame details (clicking on a bar) shown behind the Vanguard panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': fixed a problem when clicking with right button wasn't opening the bookmark panel.\n\n|cFFFFFF00-|r Plugin 'Vanguard': incoming heals now count shield amount on the player too.\n\n|cFFFFFF00-|r Plugin 'Vanguard' Known Bug: incoming damage and melee vs avoidance seems to be inaccurate by now, we need more time to study and fix it.\n\n|cFFFFFF00-|r Added Twins Ogron's Charge as custom spells, one for the charge by him self and other for the copies (mythic only).\n\n|cFFFFFF00-|r Added option panel for Raid Check plugin.\n\n|cFFFFFF00-|r Added key bindings for open a window, close a window and select a bookmark.\n\n|cFFFFFF00-|r Added 'CTRL + RightClick' closes a window.\n\n|cFFFFFF00-|r Fixed wallpaper transparency after releasing the window from a stretch.|cFFFFFF00-|r Fixed few issues when using class text colors.\n\n|cFFFFFF00-|r Fixed characters name outside instances, now it replaces the realm name with a * and show the complete name on tooltip.\n\n|cFFFFFF00-|r Fixed damage mitigation on damage taken, this affects only specific classes like monk tank.\n\n|cFFFFFF00-|r Fixed auto erase poping up when the player enters on its garrison.\n\n|cFFFFFF00-|r Fixed combat on garrison training dummies which was being marked as Trash Segment.\n\n|cFFFFFF00-|r Fixed command /details disable, wasn't disabling the capture of cooldowns.\n\n|cFFFFFF00-|r Fixed a problem with fast dps/hps when the window is in a empty segment.\n\n|cFFFFFF00-|r Fixed an issue using bookmark panel where it wasn't changing the display when the window is in a plugin mode.\n\n|cFFFFFF00-|r Fixed a bug when bars isn't using class colors on Frags, Auras & Void Zones, Resources and Deaths.\n\n|cFFFFFF00-|r Fixed bar animations when 'Sort Direction' is set to bottom.\n\n|cFFFFFF00-|r Fixed the spam 'you are not in a guild' when checking for new versions.\n\n|cFFFFFF00-|r Fixed translations for Auto Hide Settings bracket under options panel.\n\n|cFFFFFF00-|r Fixed Auto Hide -> Mouse Interaction tool where wans't able to work okey during combat.\n\n|cFFFFFF00v3.6.14b (|cFFFFCC00Jan 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added custom display 'My Spells' which shows your spells in the window.\n\n|cFFFFFF00-|r Added new custom display: Health Potion & Stone.\n\n|cFFFFFF00-|r Added overkill on death's tooltip.\n\n|cFFFFFF00-|r Created custom spells for Twin Ogron's Pulverize. Now it has 3 spells one for each wave.\n\n|cFFFFFF00-|r Created custom spells for Ko'ragh Overflowing Energy. Now it has 2 spells one for when the ball is catched and other when it reaches the ground and explodes.\n\n|cFFFFFF00-|r Changed healing multistrike to use the same format as damage done.\n\n|cFFFFFF00-|r Few improvements on Tiny Threat plugin: color gradient green-red is fixed, texts and bar texture now correctly uses the window settings.\n\n|cFFFFFF00-|r Damage Taken by Spell won't show pets in its tooltip any more.\n\n|cFFFFFF00-|r Enemies display won't show any more mirror images and spirit link totems.\n\n|cFFFFFF00-|r Enemies's tooltip now only show players and show all players instead of only 6.\n\n|cFFFFFF00-|r Few cooldowns shown as raid wide now shows as personal cooldowns.\n\n|cFFFFFF00-|r Fixed dispell tagets on dispell's tooltip.\n\n|cFFFFFF00-|r Fixed 'First Hit' raid tool.\n\n|cFFFFFF00-|r Fixed 'Open Options Panel' from interface panel.\n\n|cFFFFFF00v3.6.8 (|cFFFFCC00Dec 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Fast (i mean, really fast) Dps/Hps update rate, its option is under Rows: Advanced -> Fast Updates.\n\n|cFFFFFF00-|r Created a custom spell for Mirror Image's Fireball and Frostbolt, with that Player Detail window distinguishes spells from the player and images.\n\n|cFFFFFF00-|r Added new skin: 'ElvUI Style II'." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/core/windows.lua b/core/windows.lua index a8527832..7899f361 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -2404,20 +2404,76 @@ function _detalhes:CreateTestBars() local current_combat = _detalhes:GetCombat ("current") + local pclass = select (2, UnitClass ("player")) - local actors_name = {"Ragnaros", "The Lich King", "Your Neighbor", "Your Raid Leader", "Huffer", "Your Internet Girlfriend", "Mr. President", "Parry Hotter", "Your Math Teacher", "King Djoffrey", UnitName ("player") .. " Snow", "A Drunk Dawrf", "Low Dps Guy", "Helvis Phresley", "Stormwind Guard", "A PvP Player", "Bolvar Fordragon","Malygos","Akama","Anachronos","Lady Blaumeux","Cairne Bloodhoof","Borivar","C'Thun","Drek'Thar","Durotan","Eonar","Footman Malakai","Bolvar Fordragon","Fritz Fizzlesprocket","Lisa Gallywix","M'uru","Priestess MacDonnell","Nazgrel","Ner'zhul","Saria Nightwatcher","Chief Ogg'ora","Ogoun","Grimm Onearm","Apothecary Oni'jus","Orman of Stromgarde","General Rajaxx","Baron Rivendare","Roland","Archmage Trelane","Liam Trollbane"} + local actors_name = { + {"Ragnaros", "MAGE", 63}, + {"The Lich King", "DEATHKNIGHT", }, + {"Your Neighbor", "SHAMAN", }, + {"Your Raid Leader", "MONK", }, + {"Huffer", "HUNTER", }, + {"Your Internet Girlfriend", "SHAMAN", }, + {"Mr. President", "WARRIOR", }, + {"Antonidas", "MAGE"}, + {"Your Math Teacher", "SHAMAN", }, + {"King Djoffrey", "PALADIN", }, + {UnitName ("player") .. " Snow", pclass, }, + {"A Drunk Dawrf", "MONK", }, + {"Low Dps Guy", "MONK", }, + {"Helvis Phresley", "DEATHKNIGHT", }, + {"Stormwind Guard", "WARRIOR", }, + {"A PvP Player", "ROGUE", }, + {"Bolvar Fordragon", "PALADIN", }, + {"Malygos", "MAGE", }, + {"Akama", "ROGUE", }, + {"Nozdormu", "MAGE", }, + {"Lady Blaumeux", "DEATHKNIGHT", }, + {"Cairne Bloodhoof", "WARRIOR", }, + {"Borivar", "ROGUE", }, + {"C'Thun", "WARLOCK", }, + {"Drek'Thar", "DEATHKNIGHT", }, + {"Durotan", "WARRIOR", }, + {"Eonar", "DRUID", }, + {"Malfurion Stormrage", "DRUID", }, + {"Footman Malakai", "WARRIOR", }, + {"Bolvar Fordragon", "PALADIN", }, + {"Fritz Fizzlesprocket", "HUNTER", }, + {"Lisa Gallywix", "ROGUE", }, + {"M'uru", "WARLOCK", }, + {"Priestess MacDonnell", "PRIEST", }, + {"Elune", "PRIEST", }, + {"Nazgrel", "WARRIOR", }, + {"Ner'zhul", "WARLOCK", }, + {"Saria Nightwatcher", "PALADIN", }, + {"Kael'thas Sunstrider", "MAGE", 63}, + {"Velen", "PRIEST"}, + {"Tyrande Whisperwind", "PRIEST", 257}, + {"Sargeras", "WARLOCK", 267}, + {"Arthas", "PALADIN", }, + {"Orman of Stromgarde", "WARRIOR", }, + {"General Rajaxx", "WARRIOR", }, + {"Baron Rivendare", "DEATHKNIGHT", }, + {"Roland", "MAGE", }, + {"Archmage Trelane", "MAGE", }, + {"Lilian Voss", "ROGUE", }, + } local actors_classes = CLASS_SORT_ORDER local total_damage = 0 local total_heal = 0 for i = 1, 10 do - local robot = current_combat[1]:PegarCombatente (0x0000000000000, actors_name [math.random (1, #actors_name)], 0x114, true) + + local who = actors_name [math.random (1, #actors_name)] + + local robot = current_combat[1]:PegarCombatente (0x0000000000000, who[1], 0x114, true) robot.grupo = true - robot.classe = actors_classes [math.random (1, #actors_classes)] + robot.classe = who [2] - if (robot.classe == "DEATHKNIGHT") then + if (who[3]) then + robot.spec = who[3] + elseif (robot.classe == "DEATHKNIGHT") then local specs = {250, 251, 252} robot.spec = specs [math.random (1, #specs)] elseif (robot.classe == "DRUID") then @@ -2472,11 +2528,14 @@ robot.spells._ActorTable [56488].total = robot.total end - local robot = current_combat[2]:PegarCombatente (0x0000000000000, actors_name [math.random (1, #actors_name)], 0x114, true) + local who = actors_name [math.random (1, #actors_name)] + local robot = current_combat[2]:PegarCombatente (0x0000000000000, who[1], 0x114, true) robot.grupo = true - robot.classe = actors_classes [math.random (1, #actors_classes)] + robot.classe = who[2] - if (robot.classe == "DEATHKNIGHT") then + if (who[3]) then + robot.spec = who[3] + elseif (robot.classe == "DEATHKNIGHT") then local specs = {250, 251, 252} robot.spec = specs [math.random (1, #specs)] elseif (robot.classe == "DRUID") then diff --git a/functions/loaddata.lua b/functions/loaddata.lua index 93f53311..3ed93017 100644 --- a/functions/loaddata.lua +++ b/functions/loaddata.lua @@ -1,7 +1,3 @@ ---File Revision: 1 ---Last Modification: 07/04/2014 --- Change Log: - -- 07/04/2014: File Created. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/functions/profiles.lua b/functions/profiles.lua index 1c1abf3e..25cff328 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -1,7 +1,3 @@ ---File Revision: 1 ---Last Modification: 07/04/2014 --- Change Log: - -- 07/04/2014: File Created. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/functions/skins.lua b/functions/skins.lua index 5f9b4444..843a128f 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -66,168 +66,180 @@ local _ micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_THREAT"}, instance_cprops = { - ["hide_in_combat_type"] = 1, + ["menu_icons_size"] = 1, ["color"] = { - 1, - 1, - 1, - 1, + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, ["menu_anchor"] = { - 13, - 2, + 13, -- [1] + 2, -- [2] ["side"] = 2, }, ["bg_r"] = 0.0941, ["color_buttons"] = { - 1, - 1, - 1, - 1, + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, ["bars_sort_direction"] = 1, ["attribute_text"] = { ["enabled"] = true, ["shadow"] = false, ["side"] = 1, - ["text_size"] = 10, - ["anchor"] = { - 5, - 3, - }, ["text_color"] = { - 0.823529411764706, - 0.549019607843137, - 0, - 1, + 0.823529411764706, -- [1] + 0.549019607843137, -- [2] + 0, -- [3] + 1, -- [4] }, + ["custom_text"] = "{name}", ["text_face"] = "Friz Quadrata TT", - }, - ["menu_alpha"] = { - ["enabled"] = false, - ["onenter"] = 1, - ["iconstoo"] = true, - ["ignorebars"] = false, - ["onleave"] = 1, - }, - ["total_bar"] = { - ["enabled"] = false, - ["only_in_group"] = true, - ["icon"] = "Interface\\ICONS\\INV_Sigil_Thorim", - ["color"] = { - 1, - 1, - 1, + ["anchor"] = { + 6, -- [1] + 3, -- [2] }, + ["text_size"] = 10, + ["enable_custom_text"] = false, }, - ["hide_out_of_combat"] = false, - ["strata"] = "LOW", ["micro_displays_side"] = 2, - ["row_show_animation"] = { - ["anim"] = "Fade", - ["options"] = { - }, - }, - ["hide_in_combat_alpha"] = 0, - ["plugins_grow_direction"] = 1, - ["menu_icons"] = { - true, - true, - true, - true, - true, -- [5] - true, -- [6] - }, - ["desaturated_menu"] = false, - ["show_sidebars"] = true, - ["statusbar_info"] = { - ["alpha"] = 1, - ["overlay"] = { - 1, - 1, - 1, - }, - }, - ["window_scale"] = 1, ["auto_hide_menu"] = { ["left"] = false, ["right"] = false, }, - ["grab_on_top"] = false, - ["hide_icon"] = false, - ["row_info"] = { - ["textR_outline"] = false, - ["textL_outline"] = true, - ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small", - ["fixed_texture_color"] = { - 0, - 0, - 0, - }, - ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4", - ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", - ["textR_enable_custom_text"] = false, - ["texture_background_class_color"] = false, - ["textL_enable_custom_text"] = false, - ["textL_show_number"] = true, - ["space"] = { - ["right"] = -5, - ["left"] = 3, - ["between"] = 2, - }, - ["fixed_texture_background_color"] = { - 0.619607, - 0.619607, - 0.619607, - 0.116164, - }, - ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", - ["start_after_icon"] = true, - ["font_face_file"] = "Fonts\\ARIALN.TTF", - ["fixed_text_color"] = { - 1, - 1, - 1, - }, - ["backdrop"] = { - ["enabled"] = false, - ["size"] = 6, - ["color"] = { - 0, - 0, - 0, - 0.305214, - }, - ["texture"] = "Details BarBorder 2", - }, - ["textL_class_colors"] = false, - ["textL_custom_text"] = "{data1}. {data3}{data2}", - ["textR_class_colors"] = false, - ["alpha"] = 1, - ["no_icon"] = false, - ["font_size"] = 10, - ["texture_background"] = "Details Serenity", - ["font_face"] = "Arial Narrow", - ["texture_class_colors"] = true, - ["height"] = 14, - ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", - ["texture"] = "Details Serenity", - ["percent_type"] = 1, + ["desaturated_menu"] = false, + ["plugins_grow_direction"] = 1, + ["menu_icons"] = { + true, -- [1] + true, -- [2] + true, -- [3] + true, -- [4] + true, -- [5] + false, -- [6] + ["space"] = -4, + ["shadow"] = true, }, + ["show_sidebars"] = true, ["menu_anchor_down"] = { + -14, -- [1] + -3, -- [2] ["side"] = 2, - -14, - -3, + }, + ["backdrop_texture"] = "Details Ground", + ["statusbar_info"] = { + ["alpha"] = 1, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, }, ["toolbar_side"] = 1, ["bg_g"] = 0.0941, ["bars_grow_direction"] = 1, - ["hide_in_combat"] = false, - ["backdrop_texture"] = "Details Ground", + ["row_info"] = { + ["textR_outline"] = false, + ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal", + ["textL_outline"] = true, + ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", + ["textR_show_data"] = { + true, -- [1] + true, -- [2] + true, -- [3] + }, + ["textL_enable_custom_text"] = false, + ["fixed_text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["space"] = { + ["right"] = -5, + ["left"] = 3, + ["between"] = 1, + }, + ["texture_background_class_color"] = false, + ["start_after_icon"] = true, + ["font_face_file"] = "Fonts\\ARIALN.TTF", + ["textL_custom_text"] = "{data1}. {data3}{data2}", + ["font_size"] = 10, + ["height"] = 14, + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small", + ["textR_bracket"] = "(", + ["textR_enable_custom_text"] = false, + ["fixed_texture_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + }, + ["textL_show_number"] = true, + ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", + ["texture"] = "Details Serenity", + ["models"] = { + ["upper_model"] = "Spells\\AcidBreath_SuperGreen.M2", + ["lower_model"] = "World\\EXPANSION02\\DOODADS\\Coldarra\\COLDARRALOCUS.m2", + ["upper_alpha"] = 0.5, + ["lower_enabled"] = false, + ["lower_alpha"] = 0.1, + ["upper_enabled"] = false, + }, + ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar_background", + ["texture_background"] = "DGround", + ["use_spec_icons"] = true, + ["textR_class_colors"] = false, + ["alpha"] = 1, + ["no_icon"] = false, + ["percent_type"] = 1, + ["fixed_texture_background_color"] = { + 0.619607, -- [1] + 0.619607, -- [2] + 0.619607, -- [3] + 0.116164, -- [4] + }, + ["font_face"] = "Arial Narrow", + ["texture_class_colors"] = true, + ["backdrop"] = { + ["enabled"] = false, + ["texture"] = "Details BarBorder 2", + ["color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.305214, -- [4] + }, + ["size"] = 6, + }, + ["fast_ps_update"] = false, + ["textR_separator"] = ",", + ["textL_class_colors"] = false, + }, ["show_statusbar"] = true, - ["menu_icons_size"] = 1, - ["stretch_button_side"] = 1, ["bg_alpha"] = 0.699999988079071, + ["wallpaper"] = { + ["enabled"] = false, + ["texcoord"] = { + 0, -- [1] + 1, -- [2] + 0, -- [3] + 1, -- [4] + }, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["anchor"] = "all", + ["height"] = 0, + ["alpha"] = 0.5, + ["width"] = 0, + }, + ["stretch_button_side"] = 1, + ["hide_icon"] = false, ["bg_b"] = 0.0941, }, @@ -472,29 +484,178 @@ local _ --overwrites instance_cprops = { - hide_icon = true, - - menu_icons_size = 0.90, - menu_anchor = {16, 2, side = 2}, - menu_anchor_down = {16, -2}, - - plugins_grow_direction = 1, - - show_sidebars = false, - show_statusbar = false, - color = {0.3058, 0.3058, 0.3058, 0.8838}, --0.9350 - bg_alpha = 0.3181, --0.4399 - - row_info = { - texture = "BantoBar", --"Details Serenity" - font_face = "Arial Narrow", - texture_background_class_color = false, - texture_background = "Details Serenity", - fixed_texture_background_color = {0, 0, 0, 0.3186}, - icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]], - start_after_icon = false, + ["color"] = { + 0.3058, -- [1] + 0.3058, -- [2] + 0.3058, -- [3] + 0.8838, -- [4] }, - attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 5}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"}, + ["menu_anchor"] = { + 16, -- [1] + 2, -- [2] + ["side"] = 2, + }, + ["bg_r"] = 0.0941, + ["color_buttons"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["backdrop_texture"] = "Details Ground", + ["row_info"] = { + ["textR_outline"] = false, + ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal", + ["textL_outline"] = false, + ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", + ["textR_show_data"] = { + true, -- [1] + true, -- [2] + true, -- [3] + }, + ["textL_enable_custom_text"] = false, + ["fixed_text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["space"] = { + ["right"] = 0, + ["left"] = 0, + ["between"] = 1, + }, + ["texture_background_class_color"] = false, + ["start_after_icon"] = false, + ["font_face_file"] = "Fonts\\ARIALN.TTF", + ["textL_custom_text"] = "{data1}. {data3}{data2}", + ["font_size"] = 10, + ["height"] = 14, + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar_serenity", + ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha", + ["textR_bracket"] = "(", + ["textR_enable_custom_text"] = false, + ["fixed_texture_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + }, + ["textL_show_number"] = true, + ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", + ["texture"] = "Details Serenity", + ["models"] = { + ["upper_model"] = "Spells\\AcidBreath_SuperGreen.M2", + ["lower_model"] = "World\\EXPANSION02\\DOODADS\\Coldarra\\COLDARRALOCUS.m2", + ["upper_alpha"] = 0.5, + ["lower_enabled"] = false, + ["lower_alpha"] = 0.1, + ["upper_enabled"] = false, + }, + ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar_background", + ["texture_background"] = "DGround", + ["use_spec_icons"] = true, + ["textR_class_colors"] = false, + ["alpha"] = 1, + ["no_icon"] = false, + ["percent_type"] = 1, + ["fixed_texture_background_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.319999992847443, -- [4] + }, + ["font_face"] = "Arial Narrow", + ["texture_class_colors"] = true, + ["backdrop"] = { + ["enabled"] = false, + ["texture"] = "Details BarBorder 2", + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["size"] = 12, + }, + ["fast_ps_update"] = false, + ["textR_separator"] = ",", + ["textL_class_colors"] = false, + }, + ["micro_displays_side"] = 2, + ["strata"] = "LOW", + ["bg_alpha"] = 0.3181, + ["plugins_grow_direction"] = 1, + ["menu_icons"] = { + true, -- [1] + true, -- [2] + true, -- [3] + true, -- [4] + true, -- [5] + false, -- [6] + ["space"] = -4, + ["shadow"] = false, + }, + ["desaturated_menu"] = false, + ["show_sidebars"] = false, + ["menu_anchor_down"] = { + 16, -- [1] + -2, -- [2] + }, + ["statusbar_info"] = { + ["alpha"] = 1, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + }, + ["hide_icon"] = true, + ["toolbar_side"] = 1, + ["bg_g"] = 0.0941, + ["show_statusbar"] = false, + ["menu_icons_size"] = 0.899999976158142, + ["wallpaper"] = { + ["enabled"] = false, + ["texcoord"] = { + 0, -- [1] + 1, -- [2] + 0, -- [3] + 1, -- [4] + }, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["anchor"] = "all", + ["height"] = 0, + ["alpha"] = 0.5, + ["width"] = 0, + }, + ["auto_hide_menu"] = { + ["left"] = false, + ["right"] = false, + }, + ["attribute_text"] = { + ["enabled"] = true, + ["shadow"] = false, + ["side"] = 1, + ["text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["custom_text"] = "{name}", + ["text_face"] = "Arial Narrow", + ["anchor"] = { + -18, -- [1] + 5, -- [2] + }, + ["text_size"] = 11, + ["enable_custom_text"] = false, + }, + ["bg_b"] = 0.0941, }, callback = function (skin, instance, just_updating) @@ -1207,48 +1368,195 @@ local _ --[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]] --[[ for the complete cprop list see the file classe_instancia_include.lua]] instance_cprops = { - - menu_icons_size = 0.90, - menu_anchor = {16, 2, side = 2}, - menu_anchor_down = {16, -2}, - plugins_grow_direction = 1, - menu_icons = {shadow = true}, - - attribute_text = {enabled = true, anchor = {-20, 5}, text_face = "Accidental Presidency", text_size = 12, text_color = {1, 1, 1, .7}, side = 1, shadow = true}, - - hide_icon = true, - desaturated_menu = false, - - bg_alpha = 0.51, - bg_r = 0.3294, - bg_g = 0.3294, - bg_b = 0.3294, - show_statusbar = false, - - row_info = { - texture = "Skyline", - texture_class_colors = true, - alpha = 0.80, - texture_background_class_color = false, - texture_background = "Details D'ictum", - fixed_texture_color = {0, 0, 0}, - fixed_texture_background_color = {0, 0, 0, 0.471}, - space = {left = 1, right = -2, between = 0}, - backdrop = {enabled = true, size = 4, color = {0, 0, 0, 1}, texture = "Details BarBorder 2"}, - icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]], - start_after_icon = false, + ["menu_icons_size"] = 0.899999976158142, + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, - - wallpaper = { - overlay = {1, 1, 1}, - width = 256, - texcoord = {49/1024, 305/1024, 774/1024, 646/1024}, - enabled = true, - anchor = "all", - height = 128, - alpha = 0.8, - texture = [[Interface\AddOns\Details\images\skins\elvui]], - } + ["menu_anchor"] = { + 16, -- [1] + 2, -- [2] + ["side"] = 2, + }, + ["bg_r"] = 0.3294, + ["skin"] = "ElvUI Frame Style", + ["following"] = { + ["bar_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["enabled"] = true, + ["text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + }, + ["color_buttons"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["bars_sort_direction"] = 1, + ["attribute_text"] = { + ["enabled"] = true, + ["shadow"] = true, + ["side"] = 1, + ["text_size"] = 12, + ["custom_text"] = "{name}", + ["text_face"] = "FORCED SQUARE", + ["anchor"] = { + -19, -- [1] + 6, -- [2] + }, + ["text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 0.7, -- [4] + }, + ["enable_custom_text"] = false, + }, + ["row_info"] = { + ["textR_outline"] = false, + ["spec_file"] = "Interface\\AddOns\\Details\\images\\spec_icons_normal_alpha", + ["textL_outline"] = false, + ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", + ["textR_show_data"] = { + true, -- [1] + true, -- [2] + true, -- [3] + }, + ["textL_enable_custom_text"] = false, + ["fixed_text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["space"] = { + ["right"] = -2, + ["left"] = 1, + ["between"] = 1, + }, + ["texture_background_class_color"] = false, + ["start_after_icon"] = false, + ["font_face_file"] = "Interface\\Addons\\Details\\fonts\\FORCED SQUARE.ttf", + ["textL_custom_text"] = "{data1}. {data3}{data2}", + ["font_size"] = 10, + ["height"] = 14, + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha", + ["textR_bracket"] = "(", + ["textR_enable_custom_text"] = false, + ["fixed_texture_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + }, + ["textL_show_number"] = true, + ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", + ["texture"] = "Skyline", + ["use_spec_icons"] = true, + ["textR_class_colors"] = false, + ["textL_class_colors"] = false, + ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar_background", + ["texture_background"] = "DGround", + ["alpha"] = 0.8, + ["no_icon"] = false, + ["percent_type"] = 1, + ["fixed_texture_background_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.339636147022247, -- [4] + }, + ["font_face"] = "FORCED SQUARE", + ["texture_class_colors"] = true, + ["models"] = { + ["upper_model"] = "Spells\\AcidBreath_SuperGreen.M2", + ["lower_model"] = "World\\EXPANSION02\\DOODADS\\Coldarra\\COLDARRALOCUS.m2", + ["upper_alpha"] = 0.5, + ["lower_enabled"] = false, + ["lower_alpha"] = 0.1, + ["upper_enabled"] = false, + }, + ["fast_ps_update"] = false, + ["textR_separator"] = ",", + ["backdrop"] = { + ["enabled"] = false, + ["size"] = 4, + ["color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 1, -- [4] + }, + ["texture"] = "Details BarBorder 2", + }, + }, + ["auto_hide_menu"] = { + ["left"] = false, + ["right"] = false, + }, + ["desaturated_menu"] = false, + ["plugins_grow_direction"] = 1, + ["menu_icons"] = { + true, -- [1] + true, -- [2] + true, -- [3] + true, -- [4] + true, -- [5] + false, -- [6] + ["space"] = -4, + ["shadow"] = true, + }, + ["show_sidebars"] = true, + ["bars_grow_direction"] = 1, + ["menu_anchor_down"] = { + 16, -- [1] + -2, -- [2] + }, + ["backdrop_texture"] = "Details Ground", + ["statusbar_info"] = { + ["alpha"] = 1, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + }, + ["toolbar_side"] = 1, + ["bg_g"] = 0.3294, + ["micro_displays_side"] = 2, + ["bg_alpha"] = 0.51, + ["show_statusbar"] = false, + ["wallpaper"] = { + ["enabled"] = true, + ["texture"] = "Interface\\AddOns\\Details\\images\\skins\\elvui", + ["texcoord"] = { + 0.0480000019073486, -- [1] + 0.298000011444092, -- [2] + 0.630999984741211, -- [3] + 0.755999984741211, -- [4] + }, + ["overlay"] = { + 0.999997794628143, -- [1] + 0.999997794628143, -- [2] + 0.999997794628143, -- [3] + 0.799998223781586, -- [4] + }, + ["anchor"] = "all", + ["height"] = 225.999984741211, + ["alpha"] = 0.800000071525574, + ["width"] = 266.000061035156, + }, + ["stretch_button_side"] = 1, + ["hide_icon"] = true, + ["bg_b"] = 0.3294, }, skin_options = { @@ -1263,7 +1571,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "This skin is based on ElvUI's addons, with an opaque title bar.", + desc = "based on AddonSkins for ElvUI, this skin has opaque title bar and background.", --general can_change_alpha_head = true, diff --git a/gumps/switch.lua b/gumps/switch.lua index 35d7e92d..e821d057 100644 --- a/gumps/switch.lua +++ b/gumps/switch.lua @@ -43,7 +43,7 @@ do frame.topbg:SetPoint ("bottomright", frame, "topright") frame.topbg:SetHeight (20) frame.topbg:SetDesaturated (true) - frame.topbg:SetVertexColor (.3, .3, .3, 0.8) + frame.topbg:SetVertexColor (.3, .3, .3, 1) frame.topbg_frame = CreateFrame ("frame", nil, frame) frame.topbg_frame:SetPoint ("bottomleft", frame, "topleft") @@ -66,6 +66,94 @@ do frame.title_label:SetPoint ("left", frame.star, "right", 4, -1) frame.title_label:SetText ("Bookmark") +--------------------------------------------------------------------------------------------------------------------------- + + frame.editing_window = nil + local windowcolor_callback = function (button, r, g, b, a) + local instance = frame.editing_window + + if (instance.menu_alpha.enabled and a ~= instance.color[4]) then + _detalhes:Msg (Loc ["STRING_OPTIONS_MENU_ALPHAWARNING"]) + instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true) + + if (_detalhes.options_group_edit) then + for _, this_instance in ipairs (instance:GetInstanceGroup()) do + if (this_instance ~= instance) then + this_instance:InstanceColor (r, g, b, instance.menu_alpha.onleave, nil, true) + end + end + end + + return + end + + instance:InstanceColor (r, g, b, a, nil, true) + if (_detalhes.options_group_edit) then + for _, this_instance in ipairs (instance:GetInstanceGroup()) do + if (this_instance ~= instance) then + this_instance:InstanceColor (r, g, b, a, nil, true) + end + end + end + end + + local change_color = function() + frame.editing_window = _detalhes.switch.current_instancia + local r, g, b, a = unpack (frame.editing_window.color) + _detalhes.gump:ColorPick (frame, r, g, b, a, windowcolor_callback) + _detalhes.switch:CloseMe() + end + + local window_color = gump:CreateButton (frame.topbg_frame, change_color, 14, 14) + window_color:SetPoint ("bottomright", frame, "topright", -3, 2) + + local window_color_texture = gump:CreateImage (window_color, [[Interface\AddOns\Details\images\icons]], 14, 14, "artwork", {434/512, 466/512, 277/512, 307/512}) + window_color_texture:SetAlpha (0.25) + window_color_texture:SetAllPoints() + + window_color:SetHook ("OnEnter", function() + window_color_texture:SetAlpha (1) + GameCooltip:Reset() + _detalhes:CooltipPreset (1) + GameCooltip:AddLine (Loc ["STRING_OPTIONS_INSTANCE_COLOR"]) + GameCooltip:SetOwner (window_color.widget) + GameCooltip:SetType ("tooltip") + GameCooltip:Show() + end) + window_color:SetHook ("OnLeave", function() + window_color_texture:SetAlpha (0.25) + GameCooltip:Hide() + end) + +--------------------------------------------------------------------------------------------------------------------------- + + local open_options = function() + _detalhes:OpenOptionsWindow (_detalhes.switch.current_instancia) + _detalhes.switch:CloseMe() + end + local options_button = gump:CreateButton (frame.topbg_frame, open_options, 14, 14, open_options) + options_button:SetPoint ("right", window_color, "left", -2, 0) + + local options_button_texture = gump:CreateImage (options_button, [[Interface\AddOns\Details\images\modo_icones]], 14, 14, "artwork", {0.5, 0.625, 0, 1}) + options_button_texture:SetAlpha (0.25) + options_button_texture:SetAllPoints() + + options_button:SetHook ("OnEnter", function() + options_button_texture:SetAlpha (1) + GameCooltip:Reset() + _detalhes:CooltipPreset (1) + GameCooltip:AddLine (Loc ["STRING_INTERFACE_OPENOPTIONS"]) + GameCooltip:SetOwner (window_color.widget) + GameCooltip:SetType ("tooltip") + GameCooltip:Show() + end) + options_button:SetHook ("OnLeave", function() + options_button_texture:SetAlpha (0.25) + GameCooltip:Hide() + end) + +--------------------------------------------------------------------------------------------------------------------------- + function _detalhes.switch:CloseMe() _detalhes.switch.frame:Hide() GameCooltip:Hide() @@ -373,6 +461,16 @@ function _detalhes.switch:ShowMe (instancia) local altura = instancia.baseframe:GetHeight() local mostrar_quantas = _math_floor (altura / _detalhes.switch.button_height) * 2 + local precisa_mostrar = 0 + for i = 1, #_detalhes.switch.table do + local slot = _detalhes.switch.table [i] + if (slot.atributo) then + precisa_mostrar = precisa_mostrar + 1 + else + break + end + end + if (_detalhes.switch.mostrar_quantas ~= mostrar_quantas) then for i = 1, #_detalhes.switch.buttons do if (i <= mostrar_quantas) then @@ -389,7 +487,7 @@ function _detalhes.switch:ShowMe (instancia) _detalhes.switch.mostrar_quantas = mostrar_quantas end - _detalhes.switch:Resize() + _detalhes.switch:Resize (precisa_mostrar) _detalhes.switch:Update() _detalhes.switch.frame:SetScale (instancia.window_scale) @@ -438,7 +536,7 @@ function _detalhes.switch:ShowMe (instancia) SwitchPanelTutorial.close_label:SetWidth (_detalhes.switch.frame:GetWidth()-30) end - _detalhes.switch:Resize() + _detalhes.switch:Resize (precisa_mostrar) --instancia:StatusBarAlert (right_click_text, right_click_texture) --icon, color, time end @@ -660,15 +758,23 @@ function _detalhes.switch:Update() end -function _detalhes.switch:Resize() +function _detalhes.switch:Resize (precisa_mostrar) local x = 7 local y = 5 + local y_increment = 20 local window_width, window_height = _detalhes.switch.current_instancia:GetSize() local horizontal_amt = floor (math.max (window_width / 100, 2)) - local vertical_amt = floor ((window_height - y) / 20) + local vertical_amt = floor ((window_height - y) / y_increment) + + local total_amt = horizontal_amt * vertical_amt + if (precisa_mostrar > total_amt) then + vertical_amt = floor ((window_height - y) / 15) + y_increment = 15 + end + local size = window_width / horizontal_amt local frame = _detalhes.switch.frame @@ -712,7 +818,7 @@ function _detalhes.switch:Resize() break end end - y = y + 20 + y = y + y_increment end _detalhes.switch.slots = i-1 diff --git a/images/icons.tga b/images/icons.tga index bc9f7c45..44419d6e 100644 Binary files a/images/icons.tga and b/images/icons.tga differ diff --git a/images/spec_icons_normal_alpha.tga b/images/spec_icons_normal_alpha.tga index 62c5a542..5b2dde01 100644 Binary files a/images/spec_icons_normal_alpha.tga and b/images/spec_icons_normal_alpha.tga differ