diff --git a/Bindings.xml b/Bindings.xml index b50f93da..3e020b60 100644 --- a/Bindings.xml +++ b/Bindings.xml @@ -11,88 +11,26 @@ DetailsKeyBindScrollUp() - - local instance1 = _detalhes.tabela_instancias [1]; - if (instance1 and not instance1:IsEnabled()) then - instance1:EnableInstance(); - elseif (not instance1) then - _detalhes:Msg ("Window 1 isn't created yet."); - end + + _detalhes:ToggleWindows() - - local instance2 = _detalhes.tabela_instancias [2]; - if (instance2 and not instance2:IsEnabled()) then - instance2:EnableInstance(); - elseif (not instance2) then - _detalhes:Msg ("Window 2 isn't created yet."); - end + + + _detalhes:ToggleWindow (1) - - local instance3 = _detalhes.tabela_instancias [3]; - if (instance3 and not instance3:IsEnabled()) then - instance3:EnableInstance(); - elseif (not instance3) then - _detalhes:Msg ("Window 3 isn't created yet."); - end + + _detalhes:ToggleWindow (2) - - local instance4 = _detalhes.tabela_instancias [4]; - if (instance4 and not instance4:IsEnabled()) then - instance4:EnableInstance(); - elseif (not instance4) then - _detalhes:Msg ("Window 4 isn't created yet."); - end + + _detalhes:ToggleWindow (3) - - local instance5 = _detalhes.tabela_instancias [5]; - if (instance5 and not instance5:IsEnabled()) then - instance5:EnableInstance(); - elseif (not instance5) then - _detalhes:Msg ("Window 5 isn't created yet."); - end + + _detalhes:ToggleWindow (4) - - - local instance1 = _detalhes.tabela_instancias [1]; - if (instance1 and instance1:IsEnabled()) then - instance1:ShutDown(); - else - _detalhes:Msg ("Window 1 isn't open."); - end + + _detalhes:ToggleWindow (5) - - local instance2 = _detalhes.tabela_instancias [2]; - if (instance2 and instance2:IsEnabled()) then - instance2:ShutDown(); - else - _detalhes:Msg ("Window 2 isn't open."); - end - - - local instance3 = _detalhes.tabela_instancias [3]; - if (instance3 and instance3:IsEnabled()) then - instance3:ShutDown(); - else - _detalhes:Msg ("Window 3 isn't open."); - end - - - local instance4 = _detalhes.tabela_instancias [4]; - if (instance4 and instance4:IsEnabled()) then - instance4:ShutDown(); - else - _detalhes:Msg ("Window 4 isn't open."); - end - - - local instance5 = _detalhes.tabela_instancias [5]; - if (instance5 and instance5:IsEnabled()) then - instance5:ShutDown(); - else - _detalhes:Msg ("Window 5 isn't open."); - end - - + DetailsChangeDisplayFromBookmark (1); diff --git a/boot.lua b/boot.lua index a12cb213..24c885cf 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.1" + _detalhes.userversion = "v3.9.2" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,17 +20,20 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v3.9.1 (|cFFFFCC00Jan 29, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v3.9.2 (|cFFFFCC00Jan 30, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n +|cFFFFFF00-|r Added slash command 'toggle'.\n\n |cFFFFFF00-|r More tweaks and fixes on skins.\n\n +|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n |cFFFFFF00-|r Improvements on Bookmark panel.\n\n |cFFFFFF00-|r Improvements on spec icons with transparency.\n\n |cFFFFFF00-|r 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 +--|cFFFFFF00v3.9.2 (|cFFFFCC00Jan 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r More tweaks and fixes on skins.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r Create custom spell for Living Bomb explosion.\n\n -- - 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_VERSION_LOG"] = "|cFFFFFF00v3.9.2 (|cFFFFCC00Jan 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r More tweaks and fixes on skins.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin.\n\n|cFFFFFF00-|r Improvements on Bookmark panel.\n\n|cFFFFFF00-|r Improvements on spec icons with transparency.\n\n|cFFFFFF00-|r 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 " @@ -363,21 +366,18 @@ do _G ["BINDING_HEADER_DETAILS_KEYBIND_BOOKMARK"] = Loc ["STRING_KEYBIND_BOOKMARK"] --> keys + + _G ["BINDING_NAME_DETAILS_TOGGLE_ALL"] = Loc ["STRING_KEYBIND_TOGGLE_WINDOWS"] + _G ["BINDING_NAME_DETAILS_RESET_SEGMENTS"] = Loc ["STRING_KEYBIND_RESET_SEGMENTS"] _G ["BINDING_NAME_DETAILS_SCROLL_UP"] = Loc ["STRING_KEYBIND_SCROLL_UP"] _G ["BINDING_NAME_DETAILS_SCROLL_DOWN"] = Loc ["STRING_KEYBIND_SCROLL_DOWN"] - _G ["BINDING_NAME_DETAILS_REOPEN_WINDOW1"] = format (Loc ["STRING_KEYBIND_REOPEN_WINDOW"], 1) - _G ["BINDING_NAME_DETAILS_REOPEN_WINDOW2"] = format (Loc ["STRING_KEYBIND_REOPEN_WINDOW"], 2) - _G ["BINDING_NAME_DETAILS_REOPEN_WINDOW3"] = format (Loc ["STRING_KEYBIND_REOPEN_WINDOW"], 3) - _G ["BINDING_NAME_DETAILS_REOPEN_WINDOW4"] = format (Loc ["STRING_KEYBIND_REOPEN_WINDOW"], 4) - _G ["BINDING_NAME_DETAILS_REOPEN_WINDOW5"] = format (Loc ["STRING_KEYBIND_REOPEN_WINDOW"], 5) - - _G ["BINDING_NAME_DETAILS_CLOSE_WINDOW1"] = format (Loc ["STRING_KEYBIND_CLOSE_WINDOW"], 1) - _G ["BINDING_NAME_DETAILS_CLOSE_WINDOW2"] = format (Loc ["STRING_KEYBIND_CLOSE_WINDOW"], 2) - _G ["BINDING_NAME_DETAILS_CLOSE_WINDOW3"] = format (Loc ["STRING_KEYBIND_CLOSE_WINDOW"], 3) - _G ["BINDING_NAME_DETAILS_CLOSE_WINDOW4"] = format (Loc ["STRING_KEYBIND_CLOSE_WINDOW"], 4) - _G ["BINDING_NAME_DETAILS_CLOSE_WINDOW5"] = format (Loc ["STRING_KEYBIND_CLOSE_WINDOW"], 5) + _G ["BINDING_NAME_DETAILS_TOOGGLE_WINDOW1"] = format (Loc ["STRING_KEYBIND_TOGGLE_WINDOW"], 1) + _G ["BINDING_NAME_DETAILS_TOOGGLE_WINDOW2"] = format (Loc ["STRING_KEYBIND_TOGGLE_WINDOW"], 2) + _G ["BINDING_NAME_DETAILS_TOOGGLE_WINDOW3"] = format (Loc ["STRING_KEYBIND_TOGGLE_WINDOW"], 3) + _G ["BINDING_NAME_DETAILS_TOOGGLE_WINDOW4"] = format (Loc ["STRING_KEYBIND_TOGGLE_WINDOW"], 4) + _G ["BINDING_NAME_DETAILS_TOOGGLE_WINDOW5"] = format (Loc ["STRING_KEYBIND_TOGGLE_WINDOW"], 5) _G ["BINDING_NAME_DETAILS_BOOKMARK1"] = format (Loc ["STRING_KEYBIND_BOOKMARK_NUMBER"], 1) _G ["BINDING_NAME_DETAILS_BOOKMARK2"] = format (Loc ["STRING_KEYBIND_BOOKMARK_NUMBER"], 2) diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index c82f9e99..b51581d4 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -384,6 +384,48 @@ end end end + function _detalhes:ToggleWindow (index) + local window = _detalhes:GetInstance (index) + + if (window and _getmetatable (window)) then + if (window:IsEnabled()) then + window:ShutDown() + else + window:EnableInstance() + + if (window.meu_id == 1) then + local instance2 = _detalhes:GetInstance(2) + if (instance2 and instance2:IsEnabled()) then + _detalhes.move_janela_func (instance2.baseframe, true, instance2, true) + _detalhes.move_janela_func (instance2.baseframe, false, instance2, true) + end + + elseif (window.meu_id == 2) then + _detalhes.move_janela_func (window.baseframe, true, window, true) + _detalhes.move_janela_func (window.baseframe, false, window, true) + end + + end + end + end + + function _detalhes:ToggleWindows() + local instance = _detalhes:GetInstance (1) + if (instance) then + if (instance:IsEnabled()) then + _detalhes:ShutDownAllInstances() + else + _detalhes:ReabrirTodasInstancias() + + local instance2 = _detalhes:GetInstance(2) + if (instance2) then + _detalhes.move_janela_func (instance2.baseframe, true, instance2, true) + _detalhes.move_janela_func (instance2.baseframe, false, instance2, true) + end + end + end + end + -- reabre todas as instancias function _detalhes:ReabrirTodasInstancias (temp) for index = math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1, -1 do diff --git a/functions/skins.lua b/functions/skins.lua index 843a128f..e2039d3f 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -892,9 +892,79 @@ local _ } }) - -- 0.00048828125 - --reset 19 514 83 530 - --close + local align_right_chat = function() + + if (not RightChatPanel or not RightChatPanel:IsShown()) then + _detalhes:Msg ("Right Chat Panel isn't shown.") + return + end + + local wight, height = RightChatPanel:GetSize() + + local instance1 = _detalhes.tabela_instancias [1] + local instance2 = _detalhes.tabela_instancias [2] + local instance3 = _detalhes.tabela_instancias [3] + + if (not instance2) then + instance2 = _detalhes:CriarInstancia() + instance2:ChangeSkin (instance1.skin) + elseif (not instance2.ativa) then + instance2:AtivarInstancia() + instance2:ChangeSkin (instance1.skin) + end + + if (instance3) then + instance3:ShutDown() + end + + instance1:UngroupInstance() + instance2:UngroupInstance() + + instance1.baseframe:ClearAllPoints() + instance2.baseframe:ClearAllPoints() + + local statusbar_enabled1 = instance1.show_statusbar + local statusbar_enabled2 = instance2.show_statusbar + + local ElvUIRightChatDataPanel = RightChatDataPanel and RightChatDataPanel:IsShown() + + if (instance1.skin == "Forced Square") then + instance1.baseframe:SetSize (wight/2 - 4, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled1 and 14 or 0)) + instance2.baseframe:SetSize (wight/2 - 4 + 2, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled2 and 14 or 0)) + + elseif (instance1.skin == "ElvUI Frame Style") then + instance1.baseframe:SetSize (wight/2 - 4, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled1 and 14 or 0)) + instance2.baseframe:SetSize (wight/2 - 4, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled2 and 14 or 0)) + + elseif (instance1.skin == "ElvUI Style II") then + instance1.baseframe:SetSize (wight/2 - 4 - 2, height - 20 - 2 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled1 and 14 or 0)) + instance2.baseframe:SetSize (wight/2 - 4 - 2, height - 20 - 2 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled2 and 14 or 0)) + + else + instance1.baseframe:SetSize (wight/2 - 4, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled1 and 14 or 0)) + instance2.baseframe:SetSize (wight/2 - 4, height-20 - (ElvUIRightChatDataPanel and 21 or 0) - 8 - (statusbar_enabled2 and 14 or 0)) + + end + + table.wipe (instance1.snap); table.wipe (instance2.snap) + instance1.snap [3] = 2; instance2.snap [1] = 1; + instance1.horizontalSnap = true; instance2.horizontalSnap = true + + instance1.baseframe:SetPoint ("bottomleft", RightChatDataPanel, "topleft", 1 - (instance1.skin == "Forced Square" and 1 or 0), 1 + (statusbar_enabled1 and 14 or 0) - (ElvUIRightChatDataPanel and 0 or 22)) + instance2.baseframe:SetPoint ("bottomright", RightChatToggleButton, "topright", -1, 1 + (statusbar_enabled2 and 14 or 0) - (ElvUIRightChatDataPanel and 0 or 22)) + + instance1:LockInstance (true) + instance2:LockInstance (true) + + instance1:SaveMainWindowPosition() + instance2:SaveMainWindowPosition() + + _detalhes.move_janela_func (instance1.baseframe, true, instance1) + _detalhes.move_janela_func (instance1.baseframe, false, instance1) + _detalhes.move_janela_func (instance2.baseframe, true, instance2) + _detalhes.move_janela_func (instance2.baseframe, false, instance2) + + end _detalhes:InstallSkin ("Forced Square", { file = [[Interface\AddOns\Details\images\skins\simplygray_skin]], @@ -1140,6 +1210,7 @@ local _ }, skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1"], func = align_right_chat, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON1_DESC"]}, {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = set_tooltip_elvui2, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]}, } @@ -1269,64 +1340,6 @@ local _ t:SetTexCoord (.4, 1, 0, 1) t2:SetTexCoord (0, .4, 0, 1) --]] - - local align_right_chat = function() - - if (not RightChatPanel or not RightChatPanel:IsShown()) then - _detalhes:Msg ("Right Chat Panel isn't shown.") - return - end - - local wight, height = RightChatPanel:GetSize() - - local instance1 = _detalhes.tabela_instancias [1] - local instance2 = _detalhes.tabela_instancias [2] - local instance3 = _detalhes.tabela_instancias [3] - - if (not instance2) then - instance2 = _detalhes:CriarInstancia() - instance2:ChangeSkin (instance1.skin) - elseif (not instance2.ativa) then - instance2:AtivarInstancia() - instance2:ChangeSkin (instance1.skin) - end - - if (instance3) then - instance3:ShutDown() - end - - instance1:UngroupInstance() - instance2:UngroupInstance() - - instance1.baseframe:ClearAllPoints() - instance2.baseframe:ClearAllPoints() - - local statusbar_enabled1 = instance1.show_statusbar - local statusbar_enabled2 = instance2.show_statusbar - - instance1.baseframe:SetSize (wight/2 - 4, height-20-21-8 - (statusbar_enabled1 and 14 or 0)) - instance2.baseframe:SetSize (wight/2 - 4, height-20-21-8 - (statusbar_enabled2 and 14 or 0)) - - table.wipe (instance1.snap); table.wipe (instance2.snap) - instance1.snap [3] = 2; instance2.snap [1] = 1; - instance1.horizontalSnap = true; instance2.horizontalSnap = true - - instance1.baseframe:SetPoint ("bottomleft", RightChatDataPanel, "topleft", 1, 1 + (statusbar_enabled1 and 14 or 0)) - instance2.baseframe:SetPoint ("bottomright", RightChatToggleButton, "topright", -1, 1 + (statusbar_enabled2 and 14 or 0)) - - instance1:LockInstance (true) - instance2:LockInstance (true) - - instance1:SaveMainWindowPosition() - instance2:SaveMainWindowPosition() - - _detalhes.move_janela_func (instance1.baseframe, true, instance1) - _detalhes.move_janela_func (instance1.baseframe, false, instance1) - _detalhes.move_janela_func (instance2.baseframe, true, instance2) - _detalhes.move_janela_func (instance2.baseframe, false, instance2) - - end - _detalhes:InstallSkin ("ElvUI Frame Style", { diff --git a/functions/slash.lua b/functions/slash.lua index c335b891..9aba64f6 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -73,7 +73,12 @@ function SlashCmdList.DETAILS (msg, editbox) end end - + + elseif (command == Loc ["STRING_SLASH_TOGGLE"] or command == "toggle") then + + _detalhes:ToggleWindows() + + elseif (command == Loc ["STRING_SLASH_WORLDBOSS"] or command == "worldboss") then local questIds = {{"Tarlna the Ageless", 81535}, {"Drov the Ruiner ", 87437}, {"Rukhmar", 87493}} @@ -867,13 +872,16 @@ function SlashCmdList.DETAILS (msg, editbox) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_NEW"] .. "|r: " .. Loc ["STRING_SLASH_NEW_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_SHOW"] .. "|r: " .. Loc ["STRING_SLASH_SHOW_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_HIDE"] .. "|r: " .. Loc ["STRING_SLASH_HIDE_DESC"]) + + print ("|cffffaeae/details " .. Loc ["STRING_SLASH_TOGGLE"] .. "|r: " .. Loc ["STRING_SLASH_TOGGLE_DESC"]) + print ("|cffffaeae/details " .. Loc ["STRING_SLASH_ENABLE"] .. "|r: " .. Loc ["STRING_SLASH_ENABLE_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_DISABLE"] .. "|r: " .. Loc ["STRING_SLASH_DISABLE_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_RESET"] .. "|r: " .. Loc ["STRING_SLASH_RESET_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_OPTIONS"] .. "|r|cfffcffb0 |r: " .. Loc ["STRING_SLASH_OPTIONS_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_CHANGES"] .. "|r: " .. Loc ["STRING_SLASH_CHANGES_DESC"]) print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WIPECONFIG"] .. "|r: " .. Loc ["STRING_SLASH_WIPECONFIG_DESC"]) - print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"]) + --print ("|cffffaeae/details " .. Loc ["STRING_SLASH_WORLDBOSS"] .. "|r: " .. Loc ["STRING_SLASH_WORLDBOSS_DESC"]) print (" ") end diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index bac4fb94..5798a137 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -1262,10 +1262,10 @@ local window_openned_at = time() texto7:SetText (Loc ["STRING_WELCOME_30"]) local texto_shortcut = window:CreateFontString (nil, "overlay", "GameFontNormal") - texto_shortcut:SetPoint ("topleft", window, "topleft", 25, -110) + texto_shortcut:SetPoint ("topleft", window, "topleft", 25, -105) texto_shortcut:SetText (Loc ["STRING_WELCOME_31"]) texto_shortcut:SetWidth (290) - texto_shortcut:SetHeight (90) + texto_shortcut:SetHeight (120) texto_shortcut:SetJustifyH ("left") texto_shortcut:SetJustifyV ("top") texto_shortcut:SetTextColor (1, 1, 1, 1) diff --git a/startup.lua b/startup.lua index d35fa120..b0b47deb 100644 --- a/startup.lua +++ b/startup.lua @@ -497,10 +497,11 @@ function _G._detalhes:Start() DBM:RegisterCallback ("DBM_Announce", dbm_callback_phase) DBM:RegisterCallback ("pull", dbm_callback_pull) end - + + --[[ function _detalhes:TestResize() - _detalhes:OpenNewsWindow (_detalhes.resize_debug) + _detalhes:OpenNewsWindow ("TESTE, |TInterface\\AddOns\\Details\\images\\key_shift:20:40:0:0:64:64:0:64:0:40|t") end _detalhes:ScheduleTimer ("TestResize", 3) --]]