From 44cdcf50c15aec3cbe00735ebaf8f6a1c7922a7a Mon Sep 17 00:00:00 2001 From: tercio Date: Sat, 18 Oct 2014 14:33:43 -0300 Subject: [PATCH] updates --- boot.lua | 11 +- classes/classe_instancia_include.lua | 2 +- core/meta.lua | 1 + functions/profiles.lua | 40 +++-- gumps/janela_options.lua | 50 +++++- gumps/janela_principal.lua | 164 +++++++----------- images/toolbar_icons.tga | Bin 9870 -> 10122 bytes images/toolbar_icons_shadow.tga | Bin 0 -> 19073 bytes .../Details_TinyThreat/Details_TinyThreat.lua | 31 +++- 9 files changed, 160 insertions(+), 139 deletions(-) create mode 100644 images/toolbar_icons_shadow.tga 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 454808faf364e9d4ef666b95aaeca3230483c28c..e7dbc0f04e6811cedc27ea3f3c2e9a2f7e40b99e 100644 GIT binary patch delta 1310 zcmX|BZA?>F81A7T^uu0g3#9_KP$(2Zz_I8QJKBL7J}L~hi62XFpddpM7y}}63IZwt zS~znvenf>tqYPoY%QC}Q7CXj-uI;_o{aE&cpZhgu=I3z>R&w20rKJWY9 zN&i@F@M+e#0zVBvfOsGQNCGT?79gKZ{oUt$MN6`zWh}cr{%F3hA(CHO72agt{2gd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}=ndCkS>U*8a;k4|V^>&$QEOLp@ zvJVC(8in=B3LM||XI@aS{Y@Gp#oat zlnL7(7UB)tpZwXyBLAso98Y6phYoD4MBtV7JPzuAx3KzyzfPpgWs^x+pN&<=>Teer sX(UQSBYkKY{>BP5tTzL2MtUdSy4HlJW2Ea0F-cD`v3p{ literal 0 HcmV?d00001 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