From 31145e54b51c7dc5ed11d3ab6da189585c7181f0 Mon Sep 17 00:00:00 2001 From: Tercio Date: Wed, 4 Feb 2015 16:09:11 -0200 Subject: [PATCH] - Added an option to ignore nicknames and always use character names. - Enabling the display icon on title bar now makes the title text automatically move slightly to right. - Fixed issue with skin changing when the window has the statusbar enabled. --- boot.lua | 11 ++++-- classes/classe_instancia_include.lua | 1 + classes/container_combatentes.lua | 4 +- core/control.lua | 2 +- core/plugins_statusbar.lua | 58 ++++++++++++++++++---------- functions/profiles.lua | 1 + functions/skins.lua | 6 +++ gumps/janela_info.lua | 2 +- gumps/janela_options.lua | 44 ++++++++++++++++++++- gumps/janela_principal.lua | 14 +++---- 10 files changed, 108 insertions(+), 35 deletions(-) diff --git a/boot.lua b/boot.lua index a3509cef..6b756b46 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 = 509 --it's 509 for release - _detalhes.userversion = "v3.9.4" + _detalhes.userversion = "v3.9.6" _detalhes.realversion = 58 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -20,6 +20,11 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ +|cFFFFFF00v3.9.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n +|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n +|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n + |cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n |cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n @@ -36,9 +41,9 @@ do |cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n |cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\n\n --]] - +-- |cFFFFFF00v3.9.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\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 Added display icons for all skins which still didn't have they.\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 Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\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.6 (|cFFFFCC00Feb 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\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 Added display icons for all skins which still didn't have they.\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 Created custom spell for Living Bomb explosion.\n\n|cFFFFFF00-|r Fixed statusbar textures and mini displays.\n\n|cFFFFFF00-|r Fixed an issue with title bar buttons when toggling the titlebar anchor from bottom to top position.\n\n|cFFFFFF00-|r Fixed an issue with title bar text when toggling the statusbar position from bottom to top.\n\n|cFFFFFF00-|r Fixed yet another bug with avoidance tab on player detail window.\n\n|cFFFFFF00-|r Fixed the window ungroup button (above the resize one).\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/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 5a7c670f..8832b23a 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -45,6 +45,7 @@ _detalhes.instance_skin_ignored_values = { ["grab_on_top"] = true, ["libwindow"] = true, ["ignore_mass_showhide"] = true, + ["window_scale"] = true, } function _detalhes:ResetInstanceConfigKeepingValues (maintainsnap) diff --git a/classes/container_combatentes.lua b/classes/container_combatentes.lua index 5121afbe..4229ded1 100644 --- a/classes/container_combatentes.lua +++ b/classes/container_combatentes.lua @@ -162,7 +162,9 @@ --> é um player if (_bit_band (flag, OBJECT_TYPE_PLAYER) ~= 0) then - novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent + if (not _detalhes.ignore_nicktag) then + novo_objeto.displayName = _detalhes:GetNickname (serial, false, true) --> serial, default, silent + end if (not novo_objeto.displayName) then if (_IsInInstance() and _detalhes.remove_realm_from_name) then diff --git a/core/control.lua b/core/control.lua index 8347bccc..691f5322 100644 --- a/core/control.lua +++ b/core/control.lua @@ -1053,7 +1053,7 @@ if (avatar [2] and avatar [4] and avatar [1]) then GameCooltip:SetBannerImage (1, avatar [2], 80, 40, avatarPoint, avatarTexCoord, nil) --> overlay [2] avatar path GameCooltip:SetBannerImage (2, avatar [4], 200, 55, backgroundPoint, avatar [5], avatar [6]) --> background - GameCooltip:SetBannerText (1, avatar [1], textPoint) --> text [1] nickname + GameCooltip:SetBannerText (1, (not _detalhes.ignore_nicktag and avatar [1]) or objeto.nome, textPoint) --> text [1] nickname end else if (_detalhes.remove_realm_from_name and objeto.displayName:find ("%*")) then diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index 302bece1..cebc974a 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -1483,10 +1483,21 @@ extraWindow:DisableGradient() window.textstyle:SetPoint (10, -15) local onSelectTextStyle = function (_, child, style) - child.options.textStyle = style - if (child.Refresh and type (child.Refresh) == "function") then - child:Refresh (child) + + window.instance.StatusBar.left.options.textStyle = style + window.instance.StatusBar.center.options.textStyle = style + window.instance.StatusBar.right.options.textStyle = style + + if (window.instance.StatusBar.left.Refresh and type (window.instance.StatusBar.left.Refresh) == "function") then + window.instance.StatusBar.left:Refresh (window.instance.StatusBar.left) end + if (window.instance.StatusBar.center.Refresh and type (window.instance.StatusBar.center.Refresh) == "function") then + window.instance.StatusBar.center:Refresh (window.instance.StatusBar.center) + end + if (window.instance.StatusBar.right.Refresh and type (window.instance.StatusBar.right.Refresh) == "function") then + window.instance.StatusBar.right:Refresh (window.instance.StatusBar.right) + end + end local textStyle = {{value = 1, label = Loc ["STRING_PLUGINOPTIONS_ABBREVIATE"] .. " (105.5K)", onclick = onSelectTextStyle}, {value = 2, label = Loc ["STRING_PLUGINOPTIONS_COMMA"] .. " (105.500)", onclick = onSelectTextStyle}, @@ -1501,12 +1512,20 @@ extraWindow:DisableGradient() local selectedColor = function() local r, g, b, a = ColorPickerFrame:GetColorRGB() window.textcolortexture:SetTexture (r, g, b, a) - _detalhes.StatusBar:ApplyOptions (window.child, "textcolor", {r, g, b, a}) + --_detalhes.StatusBar:ApplyOptions (window.child, "textcolor", {r, g, b, a}) + + local color = {r, g, b, a} + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textcolor", color) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textcolor", color) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textcolor", color) end local canceledColor = function() local r, g, b, a = unpack (ColorPickerFrame.previousValues) window.textcolortexture:SetTexture (r, g, b, a) - _detalhes.StatusBar:ApplyOptions (window.child, "textcolor", {r, g, b, a}) + local color = {r, g, b, a} + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textcolor", color) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textcolor", color) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textcolor", color) end local colorpick = function() ColorPickerFrame.func = selectedColor @@ -1519,33 +1538,27 @@ extraWindow:DisableGradient() ColorPickerFrame:Show() end - _detalhes.gump:NewImage (window, nil, 150, 16, nil, nil, "textcolortexture", "$parentTextColorTexture") + _detalhes.gump:NewImage (window, nil, 160, 16, nil, nil, "textcolortexture", "$parentTextColorTexture") window.textcolortexture:SetPoint ("left", window.textcolor, "right", 2) window.textcolortexture:SetTexture (1, 1, 1) - _detalhes.gump:NewButton (window, _, "$parentTextColorButton", "textcolorbutton", 150, 20, colorpick) + _detalhes.gump:NewButton (window, _, "$parentTextColorButton", "textcolorbutton", 160, 20, colorpick) window.textcolorbutton:SetPoint ("left", window.textcolor, "right", 2) + --window.textcolorbutton:InstallCustomTexture() - local applyToAll = function() - _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textcolor", window.child.options.textColor) - _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textcolor", window.child.options.textColor) - _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textcolor", window.child.options.textColor) - end - _detalhes.gump:NewButton (window, _, "$parentTextColorApplyToAllButton", "applyToAll", 45, 16, applyToAll, nil, nil, nil, "->") - window.applyToAll:InstallCustomTexture() - window.applyToAll:SetPoint ("left", window.textcolorbutton, "right", 5) - window.applyToAll.tooltip = "apply this color to all micro displays" - --> text size _detalhes.gump:NewLabel (window, _, "$parentFontSizeLabel", "fonsizeLabel", Loc ["STRING_PLUGINOPTIONS_TEXTSIZE"]) window.fonsizeLabel:SetPoint (10, -55) -- - _detalhes.gump:NewSlider (window, _, "$parentSliderFontSize", "fonsizeSlider", 170, 20, 9, 15, .5, 1) + _detalhes.gump:NewSlider (window, _, "$parentSliderFontSize", "fonsizeSlider", 170, 20, 7, 20, 1, 1) window.fonsizeSlider:SetPoint ("left", window.fonsizeLabel, "right", 2) window.fonsizeSlider:SetThumbSize (50) --window.fonsizeSlider.useDecimals = true window.fonsizeSlider:SetHook ("OnValueChange", function (self, child, amount) - _detalhes.StatusBar:ApplyOptions (child, "textsize", amount) + --_detalhes.StatusBar:ApplyOptions (child, "textsize", amount) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textsize", amount) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textsize", amount) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textsize", amount) end) --> align @@ -1578,7 +1591,12 @@ extraWindow:DisableGradient() --> text font local onSelectFont = function (_, child, fontName) - _detalhes.StatusBar:ApplyOptions (child, "textface", fontName) + --_detalhes.StatusBar:ApplyOptions (child, "textface", fontName) + + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.left, "textface", fontName) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.center, "textface", fontName) + _detalhes.StatusBar:ApplyOptions (window.instance.StatusBar.right, "textface", fontName) + end local fontObjects = SharedMedia:HashTable ("font") diff --git a/functions/profiles.lua b/functions/profiles.lua index 25cff328..fad38ec9 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -957,6 +957,7 @@ local default_player_data = { last_instance_time = 0, --> nicktag cache nick_tag_cache = {}, + ignore_nicktag = false, --> plugin data plugin_database = {}, --> information about this character diff --git a/functions/skins.lua b/functions/skins.lua index 4e64e435..27de55f4 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -304,6 +304,7 @@ local _ icon_on_top = true, icon_ignore_alpha = true, + icon_titletext_position = {3, 3}, --overwrites instance_cprops = { @@ -525,6 +526,7 @@ local _ icon_on_top = true, icon_ignore_alpha = true, + icon_titletext_position = {5, 4}, --overwrites instance_cprops = { @@ -746,6 +748,7 @@ local _ icon_on_top = true, icon_ignore_alpha = true, + icon_titletext_position = {1, 2}, instance_cprops = { ["show_statusbar"] = false, @@ -1047,6 +1050,7 @@ local _ control_script = nil, icon_ignore_alpha = true, + icon_titletext_position = {3, 4}, --instance overwrites --[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]] @@ -1435,6 +1439,7 @@ local _ icon_on_top = true, icon_ignore_alpha = true, + icon_titletext_position = {2, 5}, instance_cprops = { ["menu_icons_size"] = 0.899999976158142, @@ -1681,6 +1686,7 @@ local _ icon_on_top = true, icon_ignore_alpha = true, + icon_titletext_position = {2, 5}, instance_cprops = { ["show_statusbar"] = false, diff --git a/gumps/janela_info.lua b/gumps/janela_info.lua index 0de2fc6f..d492d538 100644 --- a/gumps/janela_info.lua +++ b/gumps/janela_info.lua @@ -103,7 +103,7 @@ function _detalhes:AbreJanelaInfo (jogador, from_att_change) end if (avatar and avatar [1]) then - info.nome:SetText (avatar [1] or nome) + info.nome:SetText ((not _detalhes.ignore_nicktag and avatar [1]) or nome) end if (avatar and avatar [2]) then diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 6dbc27ea..0e15e953 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -3593,6 +3593,19 @@ function window:CreateFrame1() frame1.avatarNickname:SetDrawLayer ("overlay", 3) frame1.avatarPreview2:SetDrawLayer ("overlay", 2) + --> ignore nicknames -------------------------------------------------------------------------------------------------------------------------------------------- + + g:NewLabel (frame1, _, "$parentIgnoreNicknamesLabel", "IgnoreNicknamesLabel", Loc ["STRING_OPTIONS_IGNORENICKNAME"], "GameFontHighlightLeft") + g:NewSwitch (frame1, _, "$parentIgnoreNicknamesSlider", "IgnoreNicknamesSlider", 60, 20, _, _, _detalhes.ignore_nicktag) + frame1.IgnoreNicknamesSlider:SetPoint ("left", frame1.IgnoreNicknamesLabel, "right", 2) + + frame1.IgnoreNicknamesSlider.OnSwitch = function (self, _, value) + _detalhes.ignore_nicktag = value + _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) + end + + window:CreateLineBackground2 (frame1, "IgnoreNicknamesSlider", "IgnoreNicknamesLabel", Loc ["STRING_OPTIONS_IGNORENICKNAME_DESC"]) + --> realm name -------------------------------------------------------------------------------------------------------------------------------------------- g:NewLabel (frame1, _, "$parentRealmNameLabel", "realmNameLabel", Loc ["STRING_OPTIONS_REALMNAME"], "GameFontHighlightLeft") @@ -3917,7 +3930,8 @@ function window:CreateFrame1() frame1.avatarPreview2:SetPoint (avatar_x_anchor2+1, -159) frame1.avatarNickname:SetPoint (avatar_x_anchor2+109, -191) - frame1.realmNameLabel:SetPoint (avatar_x_anchor, -235) + frame1.IgnoreNicknamesLabel:SetPoint (avatar_x_anchor, -235) + frame1.realmNameLabel:SetPoint (avatar_x_anchor, -255) --frame1.ToolsLabel:SetPoint (avatar_x_anchor, -265) --frame1.EraseDataLabel:SetPoint (avatar_x_anchor, -290) @@ -3935,7 +3949,7 @@ function window:CreateFrame1() {"CreateWindowButton", 6, true}, } - window:arrange_menu (frame1, right_side, x, -265) + window:arrange_menu (frame1, right_side, x, -285) local left_side = { {"GeneralAnchorLabel", 1, true}, @@ -7123,12 +7137,38 @@ function window:CreateFrame7() frame7.hideIconSlider:SetPoint ("left", frame7.hideIconLabel, "right", 2) frame7.hideIconSlider.OnSwitch = function (self, instance, value) + instance:HideMainIcon (value) + if (not DetailsOptionsWindow.loading_settings and _detalhes.skins [instance.skin].icon_titletext_position) then + if (not value and instance.attribute_text.enabled and instance.attribute_text.side == instance.toolbar_side) then + instance.attribute_text.anchor [1] = _detalhes.skins [instance.skin].icon_titletext_position [1] + instance.attribute_text.anchor [2] = _detalhes.skins [instance.skin].icon_titletext_position [2] + instance:AttributeMenu() + elseif (value and instance.attribute_text.enabled and instance.attribute_text.side == instance.toolbar_side) then + instance.attribute_text.anchor [1] = _detalhes.skins [instance.skin].instance_cprops.attribute_text.anchor [1] + instance.attribute_text.anchor [2] = _detalhes.skins [instance.skin].instance_cprops.attribute_text.anchor [2] + instance:AttributeMenu() + end + end + if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then for _, this_instance in ipairs (instance:GetInstanceGroup()) do if (this_instance ~= instance) then this_instance:HideMainIcon (value) + + if (not DetailsOptionsWindow.loading_settings and _detalhes.skins [this_instance.skin].icon_titletext_position) then + if (not value and this_instance.attribute_text.enabled and this_instance.attribute_text.side == this_instance.toolbar_side) then + this_instance.attribute_text.anchor [1] = _detalhes.skins [this_instance.skin].icon_titletext_position [1] + this_instance.attribute_text.anchor [2] = _detalhes.skins [this_instance.skin].icon_titletext_position [2] + this_instance:AttributeMenu() + elseif (value and this_instance.attribute_text.enabled and this_instance.attribute_text.side == this_instance.toolbar_side) then + this_instance.attribute_text.anchor [1] = _detalhes.skins [this_instance.skin].instance_cprops.attribute_text.anchor [1] + this_instance.attribute_text.anchor [2] = _detalhes.skins [this_instance.skin].instance_cprops.attribute_text.anchor [2] + this_instance:AttributeMenu() + end + end + end end end diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index f3dbefc0..9832c0c0 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -6140,14 +6140,8 @@ function _detalhes:SetWindowScale (scale, from_options) if (not scale) then scale = self.window_scale end - - self.window_scale = scale - - self.baseframe:SetScale (scale) - self.rowframe:SetScale (scale) - + if (from_options) then - local group = self:GetInstanceGroup() for _, instance in _ipairs (group) do @@ -6164,6 +6158,12 @@ function _detalhes:SetWindowScale (scale, from_options) for _, instance in _ipairs (group) do instance:SaveMainWindowPosition() end + + else + self.window_scale = scale + self.baseframe:SetScale (scale) + self.rowframe:SetScale (scale) + --self:SaveMainWindowPosition() -- skin was replacing window_scale end end