diff --git a/boot.lua b/boot.lua index 735d2f2b..266b0913 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 = 125 --it's 129 for release - _detalhes.userversion = "a2.1.0" + _detalhes.build_counter = 125 --it's 132 for release + _detalhes.userversion = "a2.1.1" _detalhes.realversion = 33 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -18,7 +18,10 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v2.1.0 (|cFFFFCC00Oct 17, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00v2.1.1 (|cFFFFCC00Oct 18, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n +|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n +|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n |cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n |cFFFFFF00-|r Removed window button and added a new option for manage window under Mode Menu.\n\n |cFFFFFF00-|r Few changes on 'Default Skin' and 'ElvUI Frame Style BW'.\n\n @@ -26,7 +29,7 @@ do --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v2.1.0 (|cFFFFCC00Oct 17, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin' and 'ElvUI Frame Style BW'.\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters.\n\n|cFFFFFF00-|r Added mouse wheel scroll speed option.\n\n|cFFFFFF00-|r Added support for healing multistrike and damage multistrike.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r When the windows is locked, trying to move the window through toolbar will stretch it instead.\n\n|cFFFFFF00-|r Renamed overheal for shields, now its called 'shield wasted'.\n\n|cFFFFFF00-|r Fine tuning on healing done, should have high accuracy now.\n\n|cFFFFFF00-|r Encounter Details plugin now supports Highmaul and Blackrock Foundry.\n\n|cFFFFFF00-|r New class cooldowns and spells recognition.\n\n|cFFFFFF00-|r Fixed few bugs on comparison panel and avoidance panel.\n\n|cFFFFFF00-|r Fixed encounter recognition, now it should show the encounter name over segments menu.\n\n|cFFFFFF00-|r Fixed Graphic part of Encounter Details Plugin, now he draws more accurately.\n\n|cFFFFFF00v1.29.3 (|cFFFFCC00Oct 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an addon crash bug when clicking directly on the sword button.\n\n|cFFFFFF00-|r Removed Flat Skin, added new skin: Serenity.\n\n|cFFFFFF00-|r Fixed many issues with bar animations.\n\n|cFFFFFF00-|r Fixed combat encounter start if the player already is in combat when the boss is pulled.\n\n|cFFFFFF00-|r Fixed wheel scroll when sometimes it move very slow or doesn't move the bars at all.\n\n|cFFFFFF00-|r Added option 'Always Show Me' which when enabled and you aren't at the top ranked players shown in the window, it forces to show you in the last bar.\n\n|cFFFFFF00-|r Added option 'First Hit' which when enabled show who did the first struck in the combat (normally is who pulled the boss).\n\n|cFFFFFF00-|r Added a panel to change class colors.\n\n|cFFFFFF00v1.28.3 (|cFFFFCC00Oct 04, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for plugin descriptions on options panel.\n\n|cFFFFFF00-|r Added scale option.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r Added option to use the same profile on all characters without asking.\n\n|cFFFFFF00-|r Added a shortcut color button on main panel on Options Panel.\n\n|cFFFFFF00-|r Added auto erase/ask to erase options.\n\n|cFFFFFF00-|r Bars now highlight when hover over.\n\n|cFFFFFF00-|r Fixed problem with drag the window when the toolbar is on the bottom side.\n\n|cFFFFFF00v1.27.0 (|cFFFFCC00Set 27, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Minimalistic skin is now the old minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 got a new texture, little more darker.\n\n|cFFFFFF00-|r Few tweaks to make more easy making groups of windows.\n\n|cFFFFFF00-|r Bookmark now accepts more than two columns.\n\n|cFFFFFF00v1.26.3 (|cFFFFCC00Set 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changed the way to set the broker text to be more customizable.\n\n|cFFFFFF00-|r Fixed the problem with custom display report.\n\n|cFFFFFF00-|r Added tutorial and a config panel for bookmarks.\n\n|cFFFFFF00-|r Added option for choose the format type of data broker's text.\n\n|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v2.1.1 (|cFFFFCC00Oct 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Tiny Threat: added option to use class colors instead of green-to-red colors.\n\n|cFFFFFF00-|r Added option to enable shadows on toolbar's buttons.\n\n|cFFFFFF00-|r Added option to set the specing between each button on toolbar.\n\n|cFFFFFF00-|r Finally we merged the left and right menus into only one with 6 icons.\n\n|cFFFFFF00-|r Removed window button and added a new option bracket to manage windows under Mode Menu.\n\n|cFFFFFF00-|r Few changes on 'Default Skin' and 'ElvUI Frame Style BW'.\n\n|cFFFFFF00- Important:|r If the menus is out of the position, just reaply the skin.\n\nv2.0.15 (|cFFFFCC00Oct 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed tooltips where sometimes it wans't showing at all.\n\n|cFFFFFF00-|r Fixed the healing done amount on Malkorok encounter.\n\nv2.0.14 (|cFFFFCC00Oct 14, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added pre-potion recognition for WoD pots.\n\n|cFFFFFF00-|r Added spell list for Blackrock Foundry encounters.\n\n|cFFFFFF00-|r Added mouse wheel scroll speed option.\n\n|cFFFFFF00-|r Added support for healing multistrike and damage multistrike.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r When the windows is locked, trying to move the window through toolbar will stretch it instead.\n\n|cFFFFFF00-|r Renamed overheal for shields, now its called 'shield wasted'.\n\n|cFFFFFF00-|r Fine tuning on healing done, should have high accuracy now.\n\n|cFFFFFF00-|r Encounter Details plugin now supports Highmaul and Blackrock Foundry.\n\n|cFFFFFF00-|r New class cooldowns and spells recognition.\n\n|cFFFFFF00-|r Fixed few bugs on comparison panel and avoidance panel.\n\n|cFFFFFF00-|r Fixed encounter recognition, now it should show the encounter name over segments menu.\n\n|cFFFFFF00-|r Fixed Graphic part of Encounter Details Plugin, now he draws more accurately.\n\n|cFFFFFF00v1.29.3 (|cFFFFCC00Oct 11, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an addon crash bug when clicking directly on the sword button.\n\n|cFFFFFF00-|r Removed Flat Skin, added new skin: Serenity.\n\n|cFFFFFF00-|r Fixed many issues with bar animations.\n\n|cFFFFFF00-|r Fixed combat encounter start if the player already is in combat when the boss is pulled.\n\n|cFFFFFF00-|r Fixed wheel scroll when sometimes it move very slow or doesn't move the bars at all.\n\n|cFFFFFF00-|r Added option 'Always Show Me' which when enabled and you aren't at the top ranked players shown in the window, it forces to show you in the last bar.\n\n|cFFFFFF00-|r Added option 'First Hit' which when enabled show who did the first struck in the combat (normally is who pulled the boss).\n\n|cFFFFFF00-|r Added a panel to change class colors.\n\n|cFFFFFF00v1.28.3 (|cFFFFCC00Oct 04, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added support for plugin descriptions on options panel.\n\n|cFFFFFF00-|r Added scale option.\n\n|cFFFFFF00-|r Added a Change Log button on Options Panel.\n\n|cFFFFFF00-|r Added option to use the same profile on all characters without asking.\n\n|cFFFFFF00-|r Added a shortcut color button on main panel on Options Panel.\n\n|cFFFFFF00-|r Added auto erase/ask to erase options.\n\n|cFFFFFF00-|r Bars now highlight when hover over.\n\n|cFFFFFF00-|r Fixed problem with drag the window when the toolbar is on the bottom side.\n\n|cFFFFFF00v1.27.0 (|cFFFFCC00Set 27, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Minimalistic skin is now the old minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 got a new texture, little more darker.\n\n|cFFFFFF00-|r Few tweaks to make more easy making groups of windows.\n\n|cFFFFFF00-|r Bookmark now accepts more than two columns.\n\n|cFFFFFF00v1.26.3 (|cFFFFCC00Set 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changed the way to set the broker text to be more customizable.\n\n|cFFFFFF00-|r Fixed the problem with custom display report.\n\n|cFFFFFF00-|r Added tutorial and a config panel for bookmarks.\n\n|cFFFFFF00-|r Added option for choose the format type of data broker's text.\n\n|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 939bc867..76791ae1 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -83,7 +83,7 @@ _detalhes.instance_defaults = { --blackwhiite icons desaturated_menu = false, --mode segment attribute report --icons on menu - menu_icons = {true, true, true, true, true, true}, --mode segment attribute report reset close + menu_icons = {true, true, true, true, true, true, space = -4, shadow = false}, --mode segment attribute report reset close --menu icons size multiplicator factor menu_icons_size = 1.0, --mode segment attribute report --auto hide menu buttons diff --git a/core/meta.lua b/core/meta.lua index e9792e84..3ad559ee 100644 --- a/core/meta.lua +++ b/core/meta.lua @@ -580,6 +580,7 @@ esta_instancia.consolidateButtonTexture = nil esta_instancia.consolidateButton = nil esta_instancia.lastIcon = nil + esta_instancia.firstIcon = nil esta_instancia.menu_attribute_string = nil diff --git a/functions/profiles.lua b/functions/profiles.lua index d9844865..da4f54e0 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -310,24 +310,30 @@ function _detalhes:ApplyProfile (profile_name, nosave, is_copy) break end - --> fix for the old flat skin - if (skin.skin == "Flat Color") then - skin.skin = "Serenity" - end - - --> fix for old left and right menus - if (skin.menu_icons and type (skin.menu_icons[5]) ~= "boolean") then - skin.menu_icons[5] = true - skin.menu_icons[6] = true - - local skin_profile = _detalhes.skins [skin.skin] and _detalhes.skins [skin.skin].instance_cprops - if (skin_profile) then - skin.menu_icons_size = skin_profile.menu_icons_size - skin.menu_anchor = table_deepcopy (skin_profile.menu_anchor) - --print (skin.menu_anchor[1], skin.menu_anchor[2], skin.menu_anchor.side) - skin.menu_anchor_down = table_deepcopy (skin_profile.menu_anchor_down) + --> fix for the old flat skin (10-10) + if (skin.skin == "Flat Color") then + skin.skin = "Serenity" + end + + --> fix for old left and right menus (15-10) + if (skin.menu_icons and type (skin.menu_icons[5]) ~= "boolean") then + skin.menu_icons[5] = true + skin.menu_icons[6] = true + + local skin_profile = _detalhes.skins [skin.skin] and _detalhes.skins [skin.skin].instance_cprops + if (skin_profile) then + skin.menu_icons_size = skin_profile.menu_icons_size + skin.menu_anchor = table_deepcopy (skin_profile.menu_anchor) + --print (skin.menu_anchor[1], skin.menu_anchor[2], skin.menu_anchor.side) + skin.menu_anchor_down = table_deepcopy (skin_profile.menu_anchor_down) + end + end + if (skin.menu_icons and not skin.menu_icons.space) then + skin.menu_icons.space = -4 + end + if (skin.menu_icons and not skin.menu_icons.shadow) then + skin.menu_icons.shadow = false end - end --> get the instance local instance = _detalhes:GetInstance (index) diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 03b43fa7..962f1c6e 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -5904,6 +5904,36 @@ function window:CreateFrame7() window:CreateLineBackground2 (frame7, "menuIconSizeSlider", "menuIconSizeLabel", Loc ["STRING_OPTIONS_MENU_BUTTONSSIZE_DESC"]) + --icon spacement + + local s = g:NewSlider (frame7, _, "$parentMenuIconSpaceSlider", "MenuIconSpaceSlider", SLIDER_WIDTH, 20, -5, 10, 1, instance.menu_icons.space) + s:SetBackdrop (slider_backdrop) + s:SetBackdropColor (unpack (slider_backdrop_color)) + + g:NewLabel (frame7, _, "$parentMenuIconSpaceLabel", "MenuIconSpaceLabel", Loc ["STRING_OPTIONS_MENUS_SPACEMENT"], "GameFontHighlightLeft") + + frame7.MenuIconSpaceSlider:SetPoint ("left", frame7.MenuIconSpaceLabel, "right", 2, -1) + + frame7.MenuIconSpaceSlider:SetHook ("OnValueChange", function (self, instance, value) + instance:ToolbarMenuSetButtonsOptions (value) + end) + + window:CreateLineBackground2 (frame7, "MenuIconSpaceSlider", "MenuIconSpaceLabel", Loc ["STRING_OPTIONS_MENUS_SPACEMENT_DESC"]) + + --icon shadow + + g:NewSwitch (frame7, _, "$parentMenuIconShadowSlider", "MenuIconShadowSlider", 60, 20, _, _, instance.menu_icons.shadow) + g:NewLabel (frame7, _, "$parentMenuIconShadowLabel", "MenuIconShadowLabel", Loc ["STRING_OPTIONS_MENUS_SHADOW"], "GameFontHighlightLeft") + + frame7.MenuIconShadowSlider:SetPoint ("left", frame7.MenuIconShadowLabel, "right", 2) + frame7.MenuIconShadowSlider.OnSwitch = function (self, instance, value) + instance:ToolbarMenuSetButtonsOptions (nil, value) + end + + window:CreateLineBackground2 (frame7, "MenuIconShadowSlider", "MenuIconShadowLabel", Loc ["STRING_OPTIONS_MENUS_SHADOW_DESC"]) + + + --auto hide menus --text anchor on options menu --g:NewLabel (frame7, _, "$parentAutoHideLabelAnchor", "autoHideLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_ANCHOR"], "GameFontNormal") @@ -5935,13 +5965,15 @@ function window:CreateFrame7() {label_icons, 2}, {"menuIconSizeLabel", 3}, {"desaturateMenuLabel", 4}, - {"menuAnchorXLabel", 5}, - {"menuAnchorYLabel", 6}, + {"MenuIconShadowLabel", 5}, + {"menuAnchorXLabel", 6}, + {"menuAnchorYLabel", 7}, + {"MenuIconSpaceLabel", 8}, - {"hideIconLabel", 7, true}, - {"autoHideLeftMenuLabel", 8}, - {"menuAnchorSideLabel", 9}, - {"pluginIconsDirectionLabel", 10}, + {"hideIconLabel", 9, true}, + {"autoHideLeftMenuLabel", 10}, + {"menuAnchorSideLabel", 11}, + {"pluginIconsDirectionLabel", 12}, } window:arrange_menu (frame7, left_side, x, -90) @@ -8066,7 +8098,11 @@ end --> if not window _G.DetailsOptionsWindow6WindowScaleSlider.MyObject:SetValue (editing_instance.window_scale) --> window 7 - + _G.DetailsOptionsWindow7MenuIconShadowSlider.MyObject:SetFixedParameter (editing_instance) + _G.DetailsOptionsWindow7MenuIconShadowSlider.MyObject:SetValue (editing_instance.menu_icons.shadow) + _G.DetailsOptionsWindow7MenuIconSpaceSlider.MyObject:SetFixedParameter (editing_instance) + _G.DetailsOptionsWindow7MenuIconSpaceSlider.MyObject:SetValue (editing_instance.menu_icons.space) + _G.DetailsOptionsWindow7AutoHideLeftMenuSwitch.MyObject:SetFixedParameter (editing_instance) _G.DetailsOptionsWindow7AutoHideLeftMenuSwitch.MyObject:SetValue (editing_instance.auto_hide_menu.left) diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 17fffd10..fc140edb 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -4193,6 +4193,21 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations) end end +function _detalhes:ToolbarMenuSetButtonsOptions (spacement, shadow) + if (type (spacement) ~= "number") then + spacement = self.menu_icons.space + end + + if (type (shadow) ~= "boolean") then + shadow = self.menu_icons.shadow + end + + self.menu_icons.space = spacement + self.menu_icons.shadow = shadow + + return self:ToolbarMenuSetButtons() +end + local tbuttons = {} function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, _reset, _close) @@ -4233,21 +4248,26 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, local anchor_frame, point1, point2 = self:GetMenuAnchorPoint() local got_anchor = false + self.lastIcon = nil + self.firstIcon = nil local size = self.menu_icons_size + local space = self.menu_icons.space + local shadow = self.menu_icons.shadow --> normal buttons - + if (self.menu_anchor.side == 1) then for index, button in _ipairs (tbuttons) do if (self.menu_icons [index]) then button:ClearAllPoints() if (got_anchor) then - button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", -3, 0) + button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", space, 0) else button:SetPoint (point1, anchor_frame, point2) got_anchor = button + self.firstIcon = button end self.lastIcon = button button:SetParent (self.baseframe) @@ -4255,6 +4275,16 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, button:Show() button:SetSize (16*size, 16*size) + + if (shadow) then + button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + else + button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + end else button:Hide() end @@ -4267,10 +4297,11 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, if (self.menu_icons [index]) then button:ClearAllPoints() if (got_anchor) then - button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left", 3, 0) + button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left", -space, 0) else button:SetPoint (point1, anchor_frame, point2) got_anchor = button + self.firstIcon = button end self.lastIcon = button button:SetParent (self.baseframe) @@ -4278,6 +4309,16 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, button:Show() button:SetSize (16*size, 16*size) + + if (shadow) then + button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons_shadow]]) + else + button:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + button:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + button:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + end else button:Hide() end @@ -4287,27 +4328,35 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, --> plugins buttons if (self:IsLowerInstance()) then if (#_detalhes.ToolBar.Shown > 0) then + + local last_plugin_icon + for index, button in ipairs (_detalhes.ToolBar.Shown) do button:ClearAllPoints() + if (got_anchor) then - if (self.plugins_grow_direction == 2) then --right (default) - if (self.lastIcon == buttons[4]) then - button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", 2, 0) --, button.x, button.y - else - button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right") --, button.x, button.y + if (self.plugins_grow_direction == 2) then --right + if (self.menu_anchor.side == 1) then --left + button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right") + elseif (self.menu_anchor.side == 2) then --right + button:SetPoint ("left", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "right") end elseif (self.plugins_grow_direction == 1) then --left - if (index == 1) then - button:SetPoint ("right", got_anchor.widget or got_anchor, "left") --, button.x, button.y - else - button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left") --, button.x, button.y + if (self.menu_anchor.side == 1) then --left + button:SetPoint ("right", last_plugin_icon or self.firstIcon.widget or self.firstIcon, "left") + elseif (self.menu_anchor.side == 2) then --right + button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left") end end else button:SetPoint (point1, anchor_frame, point2) + self.firstIcon = button got_anchor = button end + self.lastIcon = button + last_plugin_icon = button + button:SetParent (self.baseframe) button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1) button:Show() @@ -4322,96 +4371,7 @@ function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, end function _detalhes:ToolbarMenuButtons (_mode, _segment, _attributes, _report) - - if (true) then - return self:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report) - end - - if (_mode == nil) then - _mode = self.menu_icons[1] - end - if (_segment == nil) then - _segment = self.menu_icons[2] - end - if (_attributes == nil) then - _attributes = self.menu_icons[3] - end - if (_report == nil) then - _report = self.menu_icons[4] - end - - self.menu_icons[1] = _mode - self.menu_icons[2] = _segment - self.menu_icons[3] = _attributes - self.menu_icons[4] = _report - - local buttons = {self.baseframe.cabecalho.modo_selecao, self.baseframe.cabecalho.segmento, self.baseframe.cabecalho.atributo, self.baseframe.cabecalho.report} - - local anchor_frame, point1, point2 = self:GetMenuAnchorPoint() - local got_anchor = false - self.lastIcon = nil - - local size = self.menu_icons_size - - --> normal buttons - for index, button in _ipairs (buttons) do - if (self.menu_icons [index]) then - button:ClearAllPoints() - if (got_anchor) then - button:SetPoint ("left", self.lastIcon, "right") - else - button:SetPoint (point1, anchor_frame, point2) - got_anchor = button - end - self.lastIcon = button - button:SetParent (self.baseframe) - button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1) - button:Show() - - if (buttons[4] == button) then - button:SetSize (8*size, 16*size) - else - button:SetSize (16*size, 16*size) - end - else - button:Hide() - end - end - - --> plugins buttons - if (self:IsLowerInstance()) then - if (#_detalhes.ToolBar.Shown > 0) then - for index, button in ipairs (_detalhes.ToolBar.Shown) do - button:ClearAllPoints() - if (got_anchor) then - if (self.plugins_grow_direction == 2) then --right (default) - if (self.lastIcon == buttons[4]) then - button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right", 2, 0) --, button.x, button.y - else - button:SetPoint ("left", self.lastIcon.widget or self.lastIcon, "right") --, button.x, button.y - end - elseif (self.plugins_grow_direction == 1) then --left - if (index == 1) then - button:SetPoint ("right", got_anchor.widget or got_anchor, "left") --, button.x, button.y - else - button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left") --, button.x, button.y - end - end - else - button:SetPoint (point1, anchor_frame, point2) - got_anchor = button - end - self.lastIcon = button - button:SetParent (self.baseframe) - button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1) - button:Show() - - button:SetSize (16*size, 16*size) - end - end - end - - return true + return self:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report) end local parameters_table = {} diff --git a/images/toolbar_icons.tga b/images/toolbar_icons.tga index 454808fa..e7dbc0f0 100644 Binary files a/images/toolbar_icons.tga and b/images/toolbar_icons.tga differ diff --git a/images/toolbar_icons_shadow.tga b/images/toolbar_icons_shadow.tga new file mode 100644 index 00000000..467a1998 Binary files /dev/null and b/images/toolbar_icons_shadow.tga differ diff --git a/plugins/Details_TinyThreat/Details_TinyThreat.lua b/plugins/Details_TinyThreat/Details_TinyThreat.lua index 16cdeedb..8bc6f723 100644 --- a/plugins/Details_TinyThreat/Details_TinyThreat.lua +++ b/plugins/Details_TinyThreat/Details_TinyThreat.lua @@ -212,6 +212,8 @@ local function CreatePluginFrames (data) local Threater = function() + local options = ThreatMeter.options + if (ThreatMeter.Actived and UnitExists ("target") and not _UnitIsFriend ("player", "target")) then if (_IsInRaid()) then for i = 1, _GetNumGroupMembers(), 1 do @@ -370,9 +372,6 @@ local function CreatePluginFrames (data) local role = threat_actor [4] thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role])) - --local color = RAID_CLASS_COLORS [threat_actor [5]] - --thisRow.textleft:SetTextColor (color.r, color.g, color.b) - thisRow:SetLeftText (threat_actor [1]) local pct = threat_actor [2] @@ -380,8 +379,16 @@ local function CreatePluginFrames (data) thisRow:SetRightText (ThreatMeter:ToK2 (threat_actor [6]) .. " (" .. _cstr ("%.1f", pct) .. "%)") thisRow:SetValue (pct) - if (ThreatMeter.options.useplayercolor and threat_actor [1] == player) then - thisRow:SetColor (_unpack (ThreatMeter.options.playercolor)) + if (options.useplayercolor and threat_actor [1] == player) then + thisRow:SetColor (_unpack (options.playercolor)) + + elseif (options.useclasscolors) then + local color = RAID_CLASS_COLORS [threat_actor [5]] + if (color) then + thisRow:SetColor (color.r, color.g, color.b) + else + thisRow:SetColor (1, 1, 1, 1) + end else if (index == 2) then thisRow:SetColor (pct*0.01, _math_abs (pct-100)*0.01, 0, 1) @@ -418,8 +425,8 @@ local function CreatePluginFrames (data) thisRow._icon:SetTexCoord (_unpack (RoleIconCoord [role])) thisRow:SetRightText (ThreatMeter:ToK2 (threat_actor [6]) .. " (" .. _cstr ("%.1f", threat_actor [2]) .. "%)") thisRow:SetValue (threat_actor [2]) - if (ThreatMeter.options.useplayercolor) then - thisRow:SetColor (_unpack (ThreatMeter.options.playercolor)) + if (options.useplayercolor) then + thisRow:SetColor (_unpack (options.playercolor)) else thisRow:SetColor (threat_actor [2]*0.01, _math_abs (threat_actor [2]-100)*0.01, 0, .3) end @@ -562,6 +569,13 @@ local build_options_panel = function() desc = "If Player Color is enabled, your bar have this color.", name = "Color" }, + { + type = "toggle", + get = function() return ThreatMeter.saveddata.useclasscolors end, + set = function (self, fixedparam, value) ThreatMeter.saveddata.useclasscolors = value end, + desc = "When enabled, threat bars uses the class color of the character.", + name = "Use Class Colors" + }, } _detalhes.gump:BuildMenu (options_frame, menu, 15, -65, 260) @@ -602,7 +616,7 @@ function ThreatMeter:OnEvent (_, event, ...) local MINIMAL_DETAILS_VERSION_REQUIRED = 1 --> Install - local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.06") + local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.07") if (type (install) == "table" and install.error) then print (install.error) end @@ -627,6 +641,7 @@ function ThreatMeter:OnEvent (_, event, ...) ThreatMeter.saveddata.showamount = ThreatMeter.saveddata.showamount or false ThreatMeter.saveddata.useplayercolor = ThreatMeter.saveddata.useplayercolor or false ThreatMeter.saveddata.playercolor = ThreatMeter.saveddata.playercolor or {1, 1, 1} + ThreatMeter.saveddata.useclasscolors = ThreatMeter.saveddata.useclasscolors or false ThreatMeter.options = ThreatMeter.saveddata