From 115e80a3e486511d58e2a2c512b09bf6b8d3423f Mon Sep 17 00:00:00 2001 From: Tercio Date: Wed, 5 Aug 2015 15:44:12 -0300 Subject: [PATCH] - Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus. - Fixed ticket #49: death display not working correctly with sort direction bottom-to-top. - Fixed an issue with death display where the text wasn't updating their width correctly. - Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations. - Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon. --- API UI.txt | 3 +++ boot.lua | 13 ++++++++++--- classes/classe_energy.lua | 2 +- classes/classe_instancia_include.lua | 1 + classes/classe_others.lua | 19 ++++++------------ core/plugins_statusbar.lua | 18 ++++++++++++++++- functions/profiles.lua | 3 +++ gumps/janela_options.lua | 29 +++++++++++++++++++++++++--- gumps/janela_principal.lua | 16 ++++++++++++++- 9 files changed, 82 insertions(+), 22 deletions(-) diff --git a/API UI.txt b/API UI.txt index 4a1a602b..1757f977 100644 --- a/API UI.txt +++ b/API UI.txt @@ -29,6 +29,9 @@ refresh_group = boolean, if true it apply the scale to all windows in the group instance:MicroDisplaysSide (side) side = number, 1 = top side of the window, 2 = bottom. +instance:MicroDisplaysLock (is_locked) +is_locked = boolean, true is the micro displays are locked and cannot interact with the mouse. + instance:SetAutoHideMenu (enabled) enabled = boolean, if true, the buttons on window's title bar auto hide when the player isn't interacting with the window. diff --git a/boot.lua b/boot.lua index 3560c7c3..44d53a5a 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 1372 --it's 1372 for release - _detalhes.userversion = "v3.17.11" + _detalhes.build_counter = 1382 --it's 1382 for release + _detalhes.userversion = "v3.17.12" _detalhes.realversion = 74 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -24,11 +24,18 @@ do |cFFFFFF00v3.17.11 (|cFFFFCC00Aug 04, 2015|r|cFFFFFF00)|r:\n\n |cFFFFFF00-|r Fixed an issue with bookmarks not opening correctly.\n\n +|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n +|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n +|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n +|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n +|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n +|cFFFFFF00-|r .\n\n + --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.17.11 (|cFFFFCC00Aug 04, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.17.12 (|cFFFFCC00Aug 05, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added an option for lock micro displays. When locked they don't interact with mouse or stay on top of menus.\n\n|cFFFFFF00-|r Fixed ticket #49: death display not working correctly with sort direction bottom-to-top.\n\n|cFFFFFF00-|r Fixed an issue with death display where the text wasn't updating their width correctly.\n\n|cFFFFFF00-|r Fixed an issue with energy and miscellaneous displays type not working correctly with bar animations.\n\n|cFFFFFF00-|r Fixed an issue while loading old profiles wans't updating their values for newer versions of the addon.\n\n|cFFFFFF00-|r Fixed an issue with bookmarks panel not opening correctly.\n\n|cFFFFFF00v3.17.10 (|cFFFFCC00Aug 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed ticket #47: Title bar font resets with UI reload / relog.\n\n|cFFFFFF00-|r Fixed ticket #46: Icon select panel wasn't opening.\n\n|cFFFFFF00-|r Fixed ticket #45: Windwalker icon for Mistweaver monks.\n\n|cFFFFFF00-|r Fixed issue with vehicles exchanging ownership, e.g. Soulbound Constructor on HFC raid.\n\n|cFFFFFF00v3.17.6 (|cFFFFCC00Jul 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Major improvements on the aura tool creation for WeakAuras.\n\n|cFFFFFF00-|r Fixed some issues with spec icons where sometimes it shows four small icons.\n\n|cFFFFFF00-|r Added an option to show a stopwatch on the title text showing the elapsed time of an encounter.\n\n|cFFFFFF00-|r Window title text now shrinks correctly when isn't enough space for it.\n\n|cFFFFFF00-|r For some special cases, left click now open the report window and shift+click shows the tooltip content in the window.\n\n|cFFFFFF00-|r Damage Taken by Spells now are a part of Damage bracket (no more on custom).\n\n|cFFFFFF00-|r Fixed custom functions for the customized bar left text.\n\n|cFFFFFF00-|r Improvements on report text format and also reverse option now works as intended.\n\n|cFFFFFF00-|r Removed the option for report only what is shown in the window.\n\n|cFFFFFF00-|r Added skins for report panel, the skin follow the skin selected for Player Detail Window.\n\n|cFFFFFF00v3.16.0c (|cFFFFCC00Jul 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with Encounter Details graphic for Archimonde encounter.\n\n|cFFFFFF00-|r Numbers format on Player Detail Window now respect the format chosen on options panel.\n\n|cFFFFFF00-|r Removed pet icons on Player Detail Window.\n\n|cFFFFFF00-|r Fixed some wrong textures on spec icons.\n\n|cFFFFFF00-|r Improvements on all skins for the Player Detail Window.\n\n|cFFFFFF00v3.15.8b (|cFFFFCC00Jul 01, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Soul Capacitor trinket fix.\n\n|cFFFFFF00-|r Fixed several small bugs from 6.2 patch.\n\n|cFFFFFF00-|r Disabled the special behavior for Tyrant Velhari encounter.\n\n|cFFFFFF00v3.15.7 (|cFFFFCC00Jun 23, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for Hellfire Citadel raid.\n\n|cFFFFFF00-|r Added support for custom CLEU parser functions.\n\n|cFFFFFF00-|r Tyrant Velhari encounter now has a custom CLEU parser function for healing where the heal absorbed by Aura of Contempt will count towards overheal and not healing done.\n\n|cFFFFFF00-|r Added support for embed on Chat Tabs.\n\n|cFFFFFF00-|r |cFFAAFFAAPS: We've made an addon for Shadow-Lord Iskar encounter called 'Iskar Assist' check it out|r.\n\n|cFFFFFF00v3.15.5a (|cFFFFCC00Jun 12, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue where sometimes tooltips wasn't being shown.\n\n|cFFFFFF00-|r Fixed a problem with overall data where it was using, even on dungoens, the raid-only 30 delay rule.\n\n|cFFFFFF00-|r Fixed an issue with spec detection (now it may detect even faster).\n\n|cFFFFFF00v3.15.5 (|cFFFFCC00Jun 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed a problem with auto hide feature not hiding plugins hosted by the window.\n\n|cFFFFFF00-|r Fixed an issue with stretch feature when the anchor button was anchored at the bottom side of the window.\n\n|cFFFFFF00-|r Small interface tweaks on tooltips, bookmark and player detail window.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show amount of casts and uptime.\n\n|cFFFFFF00-|r Added an extra tooltip for the class icon at the player's bar.\n\n|cFFFFFF00-|r Activity time now has only 3 seconds inactivity tolerance on battlegrounds and arenas.\n\n|cFFFFFF00-|r Effective time will automatically be used when inside a battleground and using sync from the score board.\n\n|cFFFFFF00-|r Added 'hide all' option on the minimap menu.\n\n|cFFFFFF00-|r Added support for battlegrounds.\n\n|cFFFFFF00-|r Added option for disable showing battleground enemies when the window is in group mode.\n\n|cFFFFFF00-|r Added option to disable the sync from battleground score board.\n\n|cFFFFFF00-|r Enemies from a battleground match segment won't be erased when the player logout.\n\n|cFFFFFF00v3.14.4 (|cFFFFCC00May 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r TimeLine (plugin): now also shows marks symbolizing the player death.\n\n|cFFFFFF00-|r Added raid history panel. Open it through bookmark or /details history.\n\n|cFFFFFF00-|r Added support for skins for Player Detail Window.\n\n|cFFFFFF00-|r Added report history on report button.\n\n|cFFFFFF00-|r Added key bindings settings for report what is shown on window #1 or #2.\n\n|cFFFFFF00v3.14.0b (|cFFFFCC00May 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Several texture changes for a smaller download size.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_energy.lua b/classes/classe_energy.lua index 73b50aea..f0e3a926 100644 --- a/classes/classe_energy.lua +++ b/classes/classe_energy.lua @@ -618,7 +618,7 @@ function atributo_energy:RefreshWindow (instancia, tabela_do_combate, forcar, ex end if (use_animations) then - instancia:fazer_animacoes() + instancia:fazer_animacoes (qual_barra-1) end if (forcar) then diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 68dba4f8..913ebfec 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -119,6 +119,7 @@ _detalhes.instance_defaults = { toolbar_side = 1, --micro displays side micro_displays_side = 2, + micro_displays_locked = true, --stretch button anchor side (1 = top 2 = bottom) stretch_button_side = 1, --where plugins icon will be placed on main window toolbar (1 = left 2 = right) diff --git a/classes/classe_others.lua b/classes/classe_others.lua index 43d2c894..c943aae2 100644 --- a/classes/classe_others.lua +++ b/classes/classe_others.lua @@ -556,10 +556,12 @@ function atributo_misc:DeadAtualizarBarra (morte, qual_barra, colocacao, instanc esta_barra.icone_classe:SetTexCoord (_unpack (CLASS_ICON_TCOORDS [morte[4]])) end esta_barra.icone_classe:SetVertexColor (1, 1, 1) - + if (esta_barra.mouse_over and not instancia.baseframe.isMoving) then --> precisa atualizar o tooltip gump:UpdateTooltip (qual_barra, esta_barra, instancia) end + + esta_barra.texto_esquerdo:SetSize (esta_barra:GetWidth() - esta_barra.texto_direita:GetStringWidth() - 20, 15) end @@ -654,20 +656,11 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo local barras_container = instancia.barras local percentage_type = instancia.row_info.percent_type - if (instancia.bars_sort_direction == 1) then - for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado - if (mortes[i]) then --> correção para um raro e desconhecido problema onde mortes[i] é nil - atributo_misc:DeadAtualizarBarra (mortes[i], qual_barra, i, instancia) - qual_barra = qual_barra+1 - end - end - - elseif (instancia.bars_sort_direction == 2) then - for i = instancia.barraS[2], instancia.barraS[1], 1 do --> vai atualizar só o range que esta sendo mostrado + for i = instancia.barraS[1], instancia.barraS[2], 1 do --> vai atualizar só o range que esta sendo mostrado + if (mortes[i]) then --> correção para um raro e desconhecido problema onde mortes[i] é nil atributo_misc:DeadAtualizarBarra (mortes[i], qual_barra, i, instancia) qual_barra = qual_barra+1 end - end return _detalhes:EndRefresh (instancia, total, tabela_do_combate, showing) --> retorna a tabela que precisa ganhar o refresh @@ -784,7 +777,7 @@ function atributo_misc:RefreshWindow (instancia, tabela_do_combate, forcar, expo end if (use_animations) then - instancia:fazer_animacoes() + instancia:fazer_animacoes (qual_barra-1) end if (instancia.atributo == 5) then --> custom diff --git a/core/plugins_statusbar.lua b/core/plugins_statusbar.lua index f3ca1522..15911934 100644 --- a/core/plugins_statusbar.lua +++ b/core/plugins_statusbar.lua @@ -43,6 +43,20 @@ end end + function _detalhes.StatusBar:LockDisplays (instance, locked) + if (instance.StatusBar.center and instance.StatusBar.left and instance.StatusBar.right) then + if (locked) then + instance.StatusBar.center.frame:EnableMouse (false) + instance.StatusBar.left.frame:EnableMouse (false) + instance.StatusBar.right.frame:EnableMouse (false) + else + instance.StatusBar.center.frame:EnableMouse (true) + instance.StatusBar.left.frame:EnableMouse (true) + instance.StatusBar.right.frame:EnableMouse (true) + end + end + end + --> create a plugin child for an instance function _detalhes.StatusBar:CreateStatusBarChildForInstance (instance, pluginName) local PluginObject = _detalhes.StatusBar.NameTable [pluginName] @@ -291,7 +305,9 @@ --|TTexturePath: size X: size Y: point offset Y X : texture size : coordx1 L : coordx2 R : coordy1 T : coordy2 B |t -- left click: 0.0019531:0.1484375:0.4257813:0.6210938 right click: 0.0019531:0.1484375:0.6269531:0.8222656 - _detalhes.OnEnterMainWindow (frame.child.instance) + local instance = frame.child.instance + + _detalhes.OnEnterMainWindow (instance) frame:SetBackdrop (on_enter_backdrop) frame:SetBackdropColor (0.7, 0.7, 0.7, 0.6) diff --git a/functions/profiles.lua b/functions/profiles.lua index 7cd8d003..b35583c1 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -360,6 +360,9 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) end end + --> apply default values if some key is missing + instance:LoadInstanceConfig() + --> reset basic config instance.snap = {} instance.horizontalSnap = nil diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 5628c580..141b61d8 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -7068,6 +7068,27 @@ function window:CreateFrame6() ConfigLeftMicroFrameButton:SetNormalTexture ([[Interface\Buttons\UI-OptionsButton]]) ConfigLeftMicroFrameButton:SetHighlightTexture ([[Interface\Buttons\UI-OptionsButton]]) ConfigLeftMicroFrameButton.tooltip = Loc ["STRING_OPTIONS_MICRODISPLAYS_OPTION_TOOLTIP"] + + --> lock mini displays + g:NewSwitch (frame6, _, "$parentLockMiniDisplaysSlider", "LockMiniDisplaysSlider", 60, 20, _, _, instance.micro_displays_locked) + g:NewLabel (frame6, _, "$parentLockMiniDisplaysLabel", "LockMiniDisplaysLabel", Loc ["STRING_OPTIONS_MICRODISPLAY_LOCK"], "GameFontHighlightLeft") + + frame6.LockMiniDisplaysSlider:SetPoint ("left", frame6.LockMiniDisplaysLabel, "right", 2) + frame6.LockMiniDisplaysSlider.OnSwitch = function (self, instance, value) + + instance:MicroDisplaysLock (value) + 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:MicroDisplaysLock (value) + end + end + end + + _detalhes:SendOptionsModifiedEvent (DetailsOptionsWindow.instance) + end + + window:CreateLineBackground2 (frame6, "LockMiniDisplaysSlider", "LockMiniDisplaysLabel", Loc ["STRING_OPTIONS_MICRODISPLAY_LOCK_DESC"]) --> sidebars g:NewSwitch (frame6, _, "$parentSideBarsSlider", "sideBarsSlider", 60, 20, _, _, instance.show_sidebars) @@ -7202,8 +7223,6 @@ function window:CreateFrame6() frame6.strataDropdown:SetPoint ("left", frame6.strataLabel, "right", 2) window:CreateLineBackground2 (frame6, "strataDropdown", "strataLabel", Loc ["STRING_OPTIONS_INSTANCE_STRATA_DESC"]) - - --> statusbar color overwrite g:NewLabel (frame6, _, "$parentStatusbarLabelAnchor", "statusbarAnchorLabel", Loc ["STRING_OPTIONS_INSTANCE_STATUSBAR_ANCHOR"], "GameFontNormal") @@ -7308,7 +7327,8 @@ function window:CreateFrame6() {"MicroDisplayCenterLabel", 6}, {"MicroDisplayRightLabel", 7}, {"instanceMicroDisplaysSideLabel", 8, true}, - {"MicroDisplayWarningLabel", 9, true}, + {"LockMiniDisplaysLabel", 9}, + {"MicroDisplayWarningLabel", 10, true}, } window:arrange_menu (frame6, right_side, window.right_start_at, window.top_start_at) @@ -10324,6 +10344,9 @@ end --> if not window _G.DetailsOptionsWindow6WindowScaleSlider.MyObject:SetFixedParameter (editing_instance) _G.DetailsOptionsWindow6WindowScaleSlider.MyObject:SetValue (editing_instance.window_scale) + + _G.DetailsOptionsWindow6LockMiniDisplaysSlider.MyObject:SetFixedParameter (editing_instance) + _G.DetailsOptionsWindow6LockMiniDisplaysSlider.MyObject:SetValue (editing_instance.micro_displays_locked) ---- diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 25126665..4b0a1b30 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -6061,8 +6061,9 @@ function _detalhes:ChangeSkin (skin_name) self:HideSideBars() end - --> refresh the side of the micro displays + --> refresh the side of the micro displays and its lock state self:MicroDisplaysSide() + self:MicroDisplaysLock() --> update statusbar if (self.show_statusbar) then @@ -6660,6 +6661,19 @@ function _detalhes:GetInstanceIconsCurrentAlpha() end end +function _detalhes:MicroDisplaysLock (lockstate) + if (lockstate == nil) then + lockstate = self.micro_displays_locked + end + self.micro_displays_locked = lockstate + + if (lockstate) then --> is locked + _detalhes.StatusBar:LockDisplays (self, true) + else + _detalhes.StatusBar:LockDisplays (self, false) + end +end + function _detalhes:MicroDisplaysSide (side, fromuser) if (not side) then side = self.micro_displays_side