diff --git a/boot.lua b/boot.lua index c805f8d7..735d2f2b 100644 --- a/boot.lua +++ b/boot.lua @@ -3,9 +3,9 @@ _ = 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 125 for release - _detalhes.userversion = "v2.0.16" - _detalhes.realversion = 31 + _detalhes.build_counter = 125 --it's 129 for release + _detalhes.userversion = "a2.1.0" + _detalhes.realversion = 33 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -18,26 +18,15 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v2.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 - - +|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 for manage window under Mode Menu.\n\n +|cFFFFFF00-|r Few changes on 'Default Skin' and 'ElvUI Frame Style BW'.\n\n +|cFFFFFF00Important:|r If the menus is out of the position, just reaply the skin.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "v2.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.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_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/classes/classe_instancia.lua b/classes/classe_instancia.lua index 0da366ac..76cdaa75 100644 --- a/classes/classe_instancia.lua +++ b/classes/classe_instancia.lua @@ -2249,15 +2249,17 @@ function _detalhes:MontaAtributosOption (instancia, func) gindex = gindex + 1 end - + CoolTip:SetLastSelected (2, i, instancia.sub_atributo_last [i]) - end --> custom + CoolTip:AddMenu (1, func, nil, 5, nil, atributos.lista[5], nil, true) CoolTip:AddIcon ("Interface\\AddOns\\Details\\images\\atributos_icones", 1, 1, 20, 20, p*(5-1), p*(5), 0, 1) + CoolTip:AddMenu (2, _detalhes.OpenCustomDisplayWindow, nil, nil, nil, Loc ["STRING_CUSTOM_NEW"], "Interface\\PaperDollInfoFrame\\Character-Plus", true) + CoolTip:AddLine ("$div", nil, 2, nil, -6, -9) for index, custom in _ipairs (_detalhes.custom) do if (custom.temp) then @@ -2267,23 +2269,27 @@ function _detalhes:MontaAtributosOption (instancia, func) end CoolTip:AddMenu (2, func, true, 5, index) - CoolTip:AddIcon (custom.icon, 2, 1, 16, 16) + CoolTip:AddIcon (custom.icon, 2, 1, 20, 20) end --> set the wallpaper on custom GameCooltip:SetWallpaper (2, [[Interface\TALENTFRAME\WarriorArm-TopLeft]], {1, 0, 0, 1}, {1, 1, 1, 0.1}) if (#_detalhes.custom == 0) then - CoolTip:SetLastSelected (2, 5, 1) + CoolTip:SetLastSelected (2, 5, 2) else if (instancia.atributo == 5) then - CoolTip:SetLastSelected (2, 5, instancia.sub_atributo+1) + CoolTip:SetLastSelected (2, 5, instancia.sub_atributo+2) else - CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+1) + CoolTip:SetLastSelected (2, 5, instancia.sub_atributo_last [5]+2) end end CoolTip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar4_vidro]]) + CoolTip:SetOption ("ButtonsYMod", -7) + CoolTip:SetOption ("ButtonsYModSub", -7) + CoolTip:SetOption ("HeighMod", 8) + CoolTip:SetOption ("HeighModSub", 8) CoolTip:SetLastSelected (1, atributo_ativo) diff --git a/classes/classe_instancia_include.lua b/classes/classe_instancia_include.lua index 0725d109..939bc867 100644 --- a/classes/classe_instancia_include.lua +++ b/classes/classe_instancia_include.lua @@ -76,27 +76,16 @@ _detalhes.instance_defaults = { bars_grow_direction = 1, --sort direction is the direction of results on bars (1 = top to bottom 2 = bottom to top) bars_sort_direction = 1, - --reset button info - resetbutton_config = {size = {10, 16}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button]], highlight_texture = [[Interface\Addons\Details\Images\reset_button]], normal_texcoord = {0, 1, 0, 1}, highlight_texcoord = {0, 1, 0, 1}, normal_vertexcolor = {1, 1, 1, 1}, highlight_vertexcolor = {1, 1, 1, 1}}, - --instance button info - instancebutton_config = {size = {20, 16}, anchor = {2, 0}, highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], textcolor = {1, 1, 1, 1}, textsize = 11, textfont = "Friz Quadrata TT", textshadow = false}, - --close button info - closebutton_config = {size = {18, 18}, alpha = 1, anchor = {0, 0}, normal_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], pushed_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Down]]}, --menus: --anchor store the anchor point of main menu menu_anchor = {5, 1, side = 1}, --mode segment attribute report on top position menu_anchor_down = {5, 1}, --mode segment attribute report on bottom position - menu2_anchor = {14, 3}, --close instance erase on top position - menu2_anchor_down = {14, 3}, --close instance erase on bottom position --blackwhiite icons desaturated_menu = false, --mode segment attribute report - desaturated_menu2 = false, --reset instance close --icons on menu - menu_icons = {true, true, true, true}, --mode segment attribute report - menu2_icons = {true, true, true}, --reset instance close + menu_icons = {true, true, true, true, true, true}, --mode segment attribute report reset close --menu icons size multiplicator factor menu_icons_size = 1.0, --mode segment attribute report - menu2_icons_size = 1.0, --reset instance close --auto hide menu buttons auto_hide_menu = {left = false, right = false}, --attribute text diff --git a/framework/cooltip.lua b/framework/cooltip.lua index 9f9a51d9..d9b79986 100644 --- a/framework/cooltip.lua +++ b/framework/cooltip.lua @@ -103,6 +103,7 @@ function DetailsCreateCoolTip() ["LeftBorderSize"] = true, ["RightBorderSize"] = true, ["HeighMod"] = true, + ["HeighModSub"] = true, ["IconBlendMode"] = true, ["IconBlendModeHover"] = true, ["SubFollowButton"] = true, @@ -453,7 +454,7 @@ function DetailsCreateCoolTip() if (CoolTip.OptionsTable.SubMenuIsTooltip) then return CoolTip:Close() end - if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2) then + if (CoolTip.Type ~= 1 and CoolTip.Type ~= 2 and not botao.isDiv) then CoolTip.active = true CoolTip.mouseOver = true @@ -972,7 +973,7 @@ function DetailsCreateCoolTip() --print ("Sub menu called but sub menu indexes is nil") return end - + if (CoolTip.OptionsTable.FixedWidthSub) then frame2:SetWidth (CoolTip.OptionsTable.FixedWidthSub) end @@ -987,6 +988,13 @@ function DetailsCreateCoolTip() local GotChecked = false + local IsTooltip = CoolTip.OptionsTable.SubMenuIsTooltip + if (IsTooltip) then + frame2:EnableMouse (false) + else + frame2:EnableMouse (true) + end + for i = 1, CoolTip.IndexesSub [index] do local button = frame2.Lines [i] @@ -999,6 +1007,12 @@ function DetailsCreateCoolTip() if (checked) then GotChecked = true end + + if (IsTooltip) then + button:EnableMouse (false) + else + button:EnableMouse (true) + end end local selected = CoolTip.SelectedIndexSec [index] @@ -1015,16 +1029,63 @@ function DetailsCreateCoolTip() for i = CoolTip.IndexesSub [index] + 1, #frame2.Lines do gump:Fade (frame2.Lines[i], 1) end + + local spacing = 0 + if (CoolTip.OptionsTable.YSpacingModSub) then + spacing = CoolTip.OptionsTable.YSpacingModSub + end - --[ - local spacing = 0 - if (CoolTip.OptionsTable.YSpacingModSub) then - spacing = CoolTip.OptionsTable.YSpacingModSub - end + --> normalize height of all rows + for i = 1, CoolTip.IndexesSub [index] do + + local menuButton = frame2.Lines [i] - --> normalize height of all rows - for i = 1, CoolTip.IndexesSub [index] do - local menuButton = frame2.Lines [i] + -- CoolTipFrame2.Lines [2].divbar + + if (menuButton.leftText:GetText() == "$div") then + + --> height + menuButton:SetHeight (4) + + --> points + menuButton:ClearAllPoints() + + menuButton:SetPoint ("center", frame2, "center") + menuButton:SetPoint ("left", frame2, "left") + menuButton:SetPoint ("right", frame2, "right") + + menuButton.rightText:SetText ("") + + local div_size_up = tonumber (CoolTip.RightTextTableSub [index] [i] [2]) + if (not div_size_up) then + div_size_up = 0 + end + local div_size_down = tonumber (CoolTip.RightTextTableSub [index] [i] [3]) + if (not div_size_down) then + div_size_down = 0 + end + + menuButton:SetPoint ("top", frame2, "top", 0, ( ( (i-1) * frame2.hHeight) * -1) - 4 + (CoolTip.OptionsTable.ButtonsYModSub or 0) + spacing + (2 + (div_size_up or 0))) + + if (CoolTip.OptionsTable.YSpacingModSub) then + spacing = spacing + CoolTip.OptionsTable.YSpacingModSub + end + + spacing = spacing + 17 + (div_size_down or 0) + + menuButton.leftText:SetText ("") + menuButton.isDiv = true + + if (not menuButton.divbar) then + CoolTip:CreateDivBar (menuButton) + else + menuButton.divbar:Show() + end + + menuButton.divbar:SetPoint ("left", menuButton, "left", frame1:GetWidth()*0.10, 0) + menuButton.divbar:SetPoint ("right", menuButton, "right", -frame1:GetWidth()*0.10, 0) + + else --> height menuButton:SetHeight (frame2.hHeight + (CoolTip.OptionsTable.ButtonHeightModSub or 0)) --> points @@ -1036,10 +1097,17 @@ function DetailsCreateCoolTip() end menuButton:SetPoint ("left", frame2, "left") menuButton:SetPoint ("right", frame2, "right") - end - --]] + + if (menuButton.divbar) then + menuButton.divbar:Hide() + menuButton.isDiv = false + end + end + + end - frame2:SetHeight ( (frame2.hHeight * CoolTip.IndexesSub [index]) + 12 + (-spacing)) + local mod = CoolTip.OptionsTable.HeighModSub or 0 + frame2:SetHeight ( (frame2.hHeight * CoolTip.IndexesSub [index]) + 12 + (-spacing) + mod) if (CoolTip.TopIconTableSub [index]) then local upperImageTable = CoolTip.TopIconTableSub [index] @@ -1064,6 +1132,8 @@ function DetailsCreateCoolTip() gump:Fade (frame2, 0) + CoolTip:CheckOverlap() + if (CoolTip.OptionsTable.SubFollowButton and not CoolTip.frame2_leftside) then local button = frame1.Lines [index] @@ -1250,9 +1320,13 @@ function DetailsCreateCoolTip() function CoolTip:CreateDivBar (button) button.divbar = button:CreateTexture (nil, "overlay") - button.divbar:SetTexture ("Interface\\TALENTFRAME\\talent-main") - button.divbar:SetTexCoord (0, 0.7890625, 0.248046875, 0.264625) + + button.divbar:SetTexture ([[Interface\QUESTFRAME\AutoQuest-Parts]]) + button.divbar:SetTexCoord (238/512, 445/512, 0/64, 4/64) + button.divbar:SetHeight (3) + button.divbar:SetAlpha (0.2) + button.divbar:SetDesaturated (true) end @@ -1349,22 +1423,34 @@ function DetailsCreateCoolTip() --> normalize height of all rows for i = 1, CoolTip.Indexes do local menuButton = frame1.Lines [i] - --> height - menuButton:SetHeight (frame1.hHeight + (CoolTip.OptionsTable.ButtonHeightMod or 0)) - --> points - menuButton:ClearAllPoints() - menuButton:SetPoint ("center", frame1, "center") - menuButton:SetPoint ("top", frame1, "top", 0, ( ( (i-1) * frame1.hHeight) * -1) - 4 + (CoolTip.OptionsTable.ButtonsYMod or 0) + spacing) - if (CoolTip.OptionsTable.YSpacingMod) then - spacing = spacing + CoolTip.OptionsTable.YSpacingMod - end - menuButton:SetPoint ("left", frame1, "left") - menuButton:SetPoint ("right", frame1, "right") - menuButton:EnableMouse (true) if (menuButton.leftText:GetText() == "$div") then + --> height + menuButton:SetHeight (4) + --> points + menuButton:ClearAllPoints() + menuButton:SetPoint ("left", frame1, "left") + menuButton:SetPoint ("right", frame1, "right") + menuButton:SetPoint ("center", frame1, "center") + + local div_size_up = tonumber (CoolTip.LeftTextTable [i] [2]) + if (not div_size_up) then + div_size_up = 0 + end + local div_size_down = tonumber (CoolTip.LeftTextTable [i] [3]) + if (not div_size_down) then + div_size_down = 0 + end + + menuButton:SetPoint ("top", frame1, "top", 0, ( ( (i-1) * frame1.hHeight) * -1) - 4 + (CoolTip.OptionsTable.ButtonsYMod or 0) + spacing - 4 + div_size_up) + if (CoolTip.OptionsTable.YSpacingMod) then + spacing = spacing + CoolTip.OptionsTable.YSpacingMod + end + + spacing = spacing + 4 + div_size_down + menuButton.leftText:SetText ("") menuButton.isDiv = true @@ -1376,15 +1462,27 @@ function DetailsCreateCoolTip() menuButton.divbar:SetPoint ("left", menuButton, "left", frame1:GetWidth()*0.10, 0) menuButton.divbar:SetPoint ("right", menuButton, "right", -frame1:GetWidth()*0.10, 0) - + else + + --> height + menuButton:SetHeight (frame1.hHeight + (CoolTip.OptionsTable.ButtonHeightMod or 0)) + --> points + menuButton:ClearAllPoints() + menuButton:SetPoint ("center", frame1, "center") + menuButton:SetPoint ("top", frame1, "top", 0, ( ( (i-1) * frame1.hHeight) * -1) - 4 + (CoolTip.OptionsTable.ButtonsYMod or 0) + spacing) + if (CoolTip.OptionsTable.YSpacingMod) then + spacing = spacing + CoolTip.OptionsTable.YSpacingMod + end + menuButton:SetPoint ("left", frame1, "left") + menuButton:SetPoint ("right", frame1, "right") + if (menuButton.divbar) then menuButton.divbar:Hide() menuButton.isDiv = false end end - - + end if (CoolTip.OptionsTable.FixedHeight) then @@ -1507,7 +1605,7 @@ function DetailsCreateCoolTip() frame2:ClearAllPoints() frame2:SetPoint ("bottomright", frame1, "bottomleft") CoolTip.frame2_leftside = true - --+ diff + --> diff return CoolTip:SetMyPoint (host, CoolTip.internal_x_mod , CoolTip.internal_y_mod) end @@ -1518,6 +1616,35 @@ function DetailsCreateCoolTip() end + function CoolTip:CheckOverlap() + if (frame2:IsShown()) then + + local frame_2_center_x = frame2:GetCenter() + if (frame_2_center_x) then + local frame_2_half_x = frame2:GetWidth() / 2 + + local frame_1_center_x = frame1:GetCenter() + if (frame_1_center_x) then + + local frame_1_half_x = frame1:GetWidth() / 2 + + local f1_end_point = frame_1_center_x + frame_1_half_x - 3 + local f2_start_point = frame_2_center_x - frame_2_half_x + + if (f2_start_point < f1_end_point) then + local diff = f2_start_point - f1_end_point + + frame2:ClearAllPoints() + frame2:SetPoint ("bottomright", frame1, "bottomleft") + CoolTip.frame2_leftside = true + end + + end + end + + end + end + function CoolTip:GetText (buttonIndex) local button1 = frame1.Lines [buttonIndex] if (not button1) then @@ -1751,6 +1878,7 @@ function DetailsCreateCoolTip() CoolTip.internal_x_mod = 0 CoolTip.internal_y_mod = 0 + CoolTip.current_anchor = nil CoolTip.overlap_checked = false CoolTip.frame2_leftside = nil diff --git a/functions/profiles.lua b/functions/profiles.lua index 108b95ff..d9844865 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -310,10 +310,25 @@ 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) + end + end + --> get the instance local instance = _detalhes:GetInstance (index) if (not instance) then diff --git a/functions/skins.lua b/functions/skins.lua index db6c8ca4..6d4d9b83 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -52,7 +52,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "This was the first skin made for Details!, inspired in the standart wow intercace", + desc = "This was the first skin made for Details!, inspired in the standart wow interface", can_change_alpha_head = false, icon_anchor_main = {-1, 1}, @@ -68,49 +68,172 @@ local _ left_corner_anchor_bottom = {-107, 0}, right_corner_anchor_bottom = {96, 0}, - micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"}, + micro_frames = {left = "DETAILS_STATUSBAR_PLUGIN_THREAT"}, instance_cprops = { - - hide_icon = false, - menu_anchor = {5, -1, side = 1}, - menu_anchor_down = {5, -1}, - menu2_anchor = {37, 10}, - menu2_anchor_down = {22, -6}, - menu_icons_size = 1, - plugins_grow_direction = 2, - bg_alpha = 0.7, - - --rows - row_info = { - texture = "Details Serenity", - texture_class_colors = true, - alpha = 1, - texture_background_class_color = false, - texture_background = "Details Serenity", - fixed_texture_background_color = {0.619607, 0.619607, 0.619607, 0.116164}, - space = {left = 3, right = -5, between = 2}, - backdrop = {enabled = false, size = 6, color = {0, 0, 0, 0.305214}, texture = "Details BarBorder 2"} + ["hide_in_combat_type"] = 1, + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, - - --instance button - instancebutton_config = {size = {22, 14}, anchor = {-2, -1}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", - normal_texture = [[Interface\AddOns\Details\images\skins\default_skin]], - normal_texcoord = {0.0087890625, 0.0322265625, 0.4140625, 0.4296875}, - highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], - pushed_texture = [[Interface\AddOns\Details\images\skins\default_skin]], - pushed_texcoord = {0.0673828125, 0.0908203125, 0.4140625, 0.4296875} + ["menu_anchor"] = { + 13, -- [1] + 2, -- [2] + ["side"] = 2, }, - --reset button - resetbutton_config = {size = {22, 14}, anchor = {1, 0}, - normal_texture = [[Interface\AddOns\Details\images\skins\default_skin]], - normal_texcoord = {0.0380859375, 0.0615234375, 0.4140625, 0.4296875}, - highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]], - pushed_texture = [[Interface\AddOns\Details\images\skins\default_skin]], - pushed_texcoord = {0.0966796875, 0.1201171875, 0.4140625, 0.4296875} + ["bg_r"] = 0.0941, + ["color_buttons"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] }, - --close button - closebutton_config = {size = {32, 32}}, + ["bars_sort_direction"] = 1, + ["attribute_text"] = { + ["enabled"] = true, + ["shadow"] = false, + ["side"] = 1, + ["text_size"] = 10, + ["anchor"] = { + 5, -- [1] + 4, -- [2] + }, + ["text_color"] = { + 0.823529411764706, -- [1] + 0.549019607843137, -- [2] + 0, -- [3] + 1, -- [4] + }, + ["text_face"] = "Friz Quadrata TT", + }, + ["menu_alpha"] = { + ["enabled"] = false, + ["onenter"] = 1, + ["iconstoo"] = true, + ["ignorebars"] = false, + ["onleave"] = 1, + }, + ["total_bar"] = { + ["enabled"] = false, + ["only_in_group"] = true, + ["icon"] = "Interface\\ICONS\\INV_Sigil_Thorim", + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + }, + ["hide_out_of_combat"] = false, + ["strata"] = "LOW", + ["micro_displays_side"] = 2, + ["row_show_animation"] = { + ["anim"] = "Fade", + ["options"] = { + }, + }, + ["hide_in_combat_alpha"] = 0, + ["plugins_grow_direction"] = 2, + ["menu_icons"] = { + true, -- [1] + true, -- [2] + true, -- [3] + true, -- [4] + true, -- [5] + true, -- [6] + }, + ["desaturated_menu"] = false, + ["show_sidebars"] = true, + ["statusbar_info"] = { + ["alpha"] = 1, + ["overlay"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + }, + ["window_scale"] = 1, + ["auto_hide_menu"] = { + ["left"] = false, + ["right"] = false, + }, + ["grab_on_top"] = false, + ["hide_icon"] = false, + ["row_info"] = { + ["textR_outline"] = false, + ["textL_outline"] = true, + ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small", + ["fixed_texture_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + }, + ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", + ["textR_enable_custom_text"] = false, + ["texture_background_class_color"] = false, + ["textL_enable_custom_text"] = false, + ["textL_show_number"] = true, + ["space"] = { + ["right"] = -5, + ["left"] = 3, + ["between"] = 2, + }, + ["fixed_texture_background_color"] = { + 0.619607, -- [1] + 0.619607, -- [2] + 0.619607, -- [3] + 0.116164, -- [4] + }, + ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", + ["start_after_icon"] = true, + ["font_face_file"] = "Fonts\\ARIALN.TTF", + ["fixed_text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["backdrop"] = { + ["enabled"] = false, + ["size"] = 6, + ["color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.305214, -- [4] + }, + ["texture"] = "Details BarBorder 2", + }, + ["textL_class_colors"] = false, + ["textL_custom_text"] = "{data1}. {data3}{data2}", + ["textR_class_colors"] = false, + ["alpha"] = 1, + ["no_icon"] = false, + ["font_size"] = 10, + ["texture_background"] = "Details Serenity", + ["font_face"] = "Arial Narrow", + ["texture_class_colors"] = true, + ["height"] = 14, + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["texture"] = "Details Serenity", + ["percent_type"] = 1, + }, + ["menu_anchor_down"] = { + ["side"] = 2, + -14, -- [1] + -3, -- [2] + }, + ["toolbar_side"] = 1, + ["bg_g"] = 0.0941, + ["bars_grow_direction"] = 1, + ["hide_in_combat"] = false, + ["backdrop_texture"] = "Details Ground", + ["show_statusbar"] = true, + ["menu_icons_size"] = 1, + ["stretch_button_side"] = 1, + ["bg_alpha"] = 0.699999988079071, + ["bg_b"] = 0.0941, }, skin_options = { @@ -146,18 +269,12 @@ local _ instance_cprops = { hide_icon = true, - menu_anchor = {-60, 0, side = 2}, - menu_anchor_down = {-55, -1}, - menu2_anchor = {32, 3}, - menu2_anchor_down = {32, 2}, + menu_icons_size = 0.85, + menu_anchor = {16, 1, side = 2}, + menu_anchor_down = {16, -2}, - menu_icons_size = 0.8, plugins_grow_direction = 1, - instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 11, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {13, 13}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - closebutton_config = {size = {19, 19}, alpha = 0.8}, - show_sidebars = false, show_statusbar = false, color = {.3, .3, .3, 0.80}, @@ -213,18 +330,12 @@ local _ instance_cprops = { hide_icon = true, - menu_anchor = {-60, 1, side = 2}, - menu_anchor_down = {-55, -1}, - menu2_anchor = {32, 4}, - menu2_anchor_down = {32, 2}, + menu_icons_size = 0.90, + menu_anchor = {16, 2, side = 2}, + menu_anchor_down = {16, -2}, - menu_icons_size = 0.8, plugins_grow_direction = 1, - instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {13, 13}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - closebutton_config = {size = {19, 19}, alpha = 0.8}, - show_sidebars = false, show_statusbar = false, color = {0.3058, 0.3058, 0.3058, 0.8838}, --0.9350 @@ -239,7 +350,7 @@ local _ icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]], start_after_icon = false, }, - attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"}, + attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 5}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"}, }, callback = function (skin, instance, just_updating) @@ -291,51 +402,14 @@ local _ right_corner_anchor_bottom = {96, 0}, instance_cprops = { - - resetbutton_config = {size = {13, 13}, anchor = {3, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - closebutton_config = {size = {18, 18}, alpha = 1, anchor = {0, 0}}, ["show_statusbar"] = false, ["backdrop_texture"] = "Details Ground", - ["color"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - 0.9199999570846558, -- [4] - }, - - ["menu_anchor"] = { - -60, -- [1] - 0, -- [2] - ["side"] = 2, - }, - ["menu2_icons"] = { - true, -- [1] - true, -- [2] - true, -- [3] - }, + ["color"] = {1, 1, 1, 0.919999}, + ["menu_anchor"] = {15, 1, ["side"] = 2}, ["bg_r"] = 1, - ["skin"] = "Flat Color", - ["hide_in_combat_type"] = 1, - ["following"] = { - ["enabled"] = false, - ["bar_color"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - }, - ["text_color"] = { - 1, -- [1] - 1, -- [2] - 1, -- [3] - }, - }, - ["switch_healer"] = false, + ["bars_sort_direction"] = 1, - ["switch_damager_in_combat"] = false, - ["desaturated_menu2"] = false, - ["menu2_icons_size"] = 1, ["row_info"] = { ["textR_outline"] = false, ["textL_outline"] = false, @@ -395,11 +469,6 @@ local _ 0, -- [3] }, }, - ["instance_button_anchor"] = { - -27, -- [1] - 1, -- [2] - }, - ["name"] = "NewFlat1", ["attribute_text"] = { ["enabled"] = true, ["shadow"] = true, @@ -419,28 +488,18 @@ local _ }, ["menu_anchor_down"] = { - -55, -- [1] - -1, -- [2] + 15, -- [1] + -3, -- [2] }, - ["hide_in_combat_alpha"] = 0, ["plugins_grow_direction"] = 1, - ["switch_damager"] = false, ["show_sidebars"] = false, ["auto_hide_menu"] = { ["left"] = false, ["right"] = false, }, - ["menu2_anchor_down"] = { - 32, -- [1] - 2, -- [2] - }, ["bars_grow_direction"] = 1, ["hide_icon"] = true, - ["menu_icons_size"] = 0.8500000238418579, - ["menu2_anchor"] = { - 32, -- [1] - 2, -- [2] - }, + ["menu_icons_size"] = 0.95, ["toolbar_side"] = 1, ["bg_g"] = 1, ["bg_alpha"] = 0.07999999821186066, @@ -510,38 +569,177 @@ local _ --[[ when a skin is selected, all customized properties of the window is reseted and then the overwrites are applied]] --[[ for the complete cprop list see the file classe_instancia_include.lua]] instance_cprops = { - row_info = { - textL_outline = true, - textR_outline = true, - texture = "Details Serenity", - icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]], - start_after_icon = false, - texture_background = "Details Serenity", - texture_background_class_color = false, - fixed_texture_background_color = {0, 0, 0, .2}, + ["hide_in_combat_type"] = 1, + ["backdrop_texture"] = "Details Ground", + ["color"] = { + 0.450980392156863, -- [1] + 0.450980392156863, -- [2] + 0.450980392156863, -- [3] + 1, -- [4] }, + ["menu_anchor"] = { + -19, -- [1] + -1, -- [2] + ["side"] = 1, + }, + ["bg_r"] = 0.0941, + ["hide_out_of_combat"] = false, + ["color_buttons"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["bars_sort_direction"] = 1, + ["tooltip"] = { + ["n_abilities"] = 3, + ["n_enemies"] = 3, + }, + ["instance_button_anchor"] = { + -27, -- [1] + 1, -- [2] + }, + ["version"] = 3, + ["row_info"] = { + ["textR_outline"] = true, + ["textL_outline"] = true, + ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha", + ["fixed_texture_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + }, + ["backdrop"] = { + ["enabled"] = false, + ["texture"] = "Details BarBorder 2", + ["color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + 1, -- [4] + }, + ["size"] = 12, + }, + ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", + ["textR_enable_custom_text"] = false, + ["start_after_icon"] = false, + ["textL_enable_custom_text"] = false, + ["textL_show_number"] = true, + ["space"] = { + ["right"] = 0, + ["left"] = 0, + ["between"] = 1, + }, + ["texture_background_class_color"] = false, + ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", + ["texture"] = "Details Serenity", + ["font_face_file"] = "Fonts\\ARIALN.TTF", + ["texture_background_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["fixed_text_color"] = { + 1, -- [1] + 1, -- [2] + 1, -- [3] + }, + ["textL_class_colors"] = false, + ["textL_custom_text"] = "{data1}. {data3}{data2}", + ["textR_class_colors"] = false, + ["alpha"] = 1, + ["no_icon"] = false, + ["font_size"] = 10, + ["texture_background"] = "Details Serenity", + ["font_face"] = "Arial Narrow", + ["texture_class_colors"] = true, + ["height"] = 14, + ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", + ["percent_type"] = 1, + ["fixed_texture_background_color"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.2, -- [4] + }, + }, + ["grab_on_top"] = false, + ["menu_alpha"] = { + ["enabled"] = false, + ["onleave"] = 1, + ["ignorebars"] = false, + ["iconstoo"] = true, + ["onenter"] = 1, + }, + ["menu_anchor_down"] = { + -20, -- [1] + -3, -- [2] + }, + ["micro_displays_side"] = 1, - instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {8, 16}, anchor = {1, 0}}, - closebutton_config = {size = {22, 22}}, - - menu_anchor = {-19, -1, side = 1}, - menu_anchor_down = {-58, 0}, - menu2_anchor = {32, 5}, - menu2_anchor_down = {32, 2}, - - hide_icon = true, - bg_alpha = 0.3, - wallpaper = { - enabled = true, - width = 244.0000362689358, - height = 96.00000674770899, - texcoord = {0.001000000014901161, 0.3424842834472656, 1, 0.5739999771118164}, - overlay = {0, 0, 0, 0.498038113117218}, - anchor = "all", - alpha = 0.4980392451398075, - texture = "Interface\\Glues\\CREDITS\\Fellwood5", + ["strata"] = "LOW", + ["desaturated_menu"] = true, + ["hide_in_combat_alpha"] = 0, + ["plugins_grow_direction"] = 2, + ["show_sidebars"] = false, + ["bars_grow_direction"] = 2, + ["row_show_animation"] = { + ["anim"] = "Fade", + ["options"] = { + }, }, + ["hide_icon"] = true, + ["statusbar_info"] = { + ["alpha"] = 1, + ["overlay"] = { + 0.450980392156863, -- [1] + 0.450980392156863, -- [2] + 0.450980392156863, -- [3] + }, + }, + ["bg_alpha"] = 0.300000011920929, + ["auto_current"] = true, + ["toolbar_side"] = 2, + ["bg_g"] = 0.0941, + ["hide_in_combat"] = false, + ["show_statusbar"] = false, + ["menu_icons_size"] = 1, + ["wallpaper"] = { + ["enabled"] = true, + ["width"] = 265.999943487933, + ["texcoord"] = { + 0.342000007629395, -- [1] + 0.00100000001490116, -- [2] + 1, -- [3] + 0.573999977111816, -- [4] + }, + ["overlay"] = { + 0, -- [1] + 0, -- [2] + 0, -- [3] + 0.807841360569, -- [4] + }, + ["anchor"] = "all", + ["height"] = 226.000007591173, + ["alpha"] = 0.807843208312988, + ["texture"] = "Interface\\Glues\\CREDITS\\Fellwood5", + }, + ["stretch_button_side"] = 1, + ["attribute_text"] = { + ["enabled"] = true, + ["shadow"] = true, + ["side"] = 2, + ["text_size"] = 11, + ["anchor"] = { + 65, -- [1] + 5, -- [2] + }, + ["text_color"] = { + 0.768627450980392, -- [1] + 0.768627450980392, -- [2] + 0.768627450980392, -- [3] + 1, -- [4] + }, + ["text_face"] = "Friz Quadrata TT", + }, + ["window_scale"] = 1, + ["bg_b"] = 0.0941, }, skin_options = { @@ -774,25 +972,15 @@ local _ --[[ for the complete cprop list see the file classe_instancia_include.lua]] instance_cprops = { - closebutton_config = {size = {20, 20}, alpha = 0.60, anchor = {1, 2}}, - instancebutton_config = {size = {20, 16}, anchor = {8, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {12, 12}, anchor = {4, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - - --resetbutton_config = {size = {8, 16}, anchor = {2, 0}}, - - menu_icons_size = 0.80, - menu2_icons_size = 1.10, - menu_anchor = {-58, 0, side = 2}, - menu_anchor_down = {-60, 0}, - menu2_anchor = {32, 3}, - menu2_anchor_down = {32, 3}, + menu_icons_size = 0.90, + menu_anchor = {16, 2, side = 2}, + menu_anchor_down = {16, -2}, plugins_grow_direction = 1, attribute_text = {enabled = true, anchor = {-20, 4}, text_face = "Friz Quadrata TT", text_size = 10, text_color = {1, 1, 1, .7}, side = 1, shadow = true}, hide_icon = true, desaturated_menu = true, - desaturated_menu2 = true, bg_alpha = 0.51, bg_r = 0.3294, @@ -873,25 +1061,15 @@ local _ --[[ for the complete cprop list see the file classe_instancia_include.lua]] instance_cprops = { - closebutton_config = {size = {20, 20}, alpha = 0.60, anchor = {1, 2}}, - instancebutton_config = {size = {20, 16}, anchor = {8, 0}, textcolor = {.7, .7, .7, 1}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {12, 12}, anchor = {4, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - - --resetbutton_config = {size = {8, 16}, anchor = {2, 0}}, - - menu_icons_size = 0.80, - menu2_icons_size = 1.10, - menu_anchor = {-58, 0, side = 2}, - menu_anchor_down = {-60, 0}, - menu2_anchor = {32, 3}, - menu2_anchor_down = {32, 3}, + menu_icons_size = 0.90, + menu_anchor = {16, 2, side = 2}, + menu_anchor_down = {16, -2}, plugins_grow_direction = 1, attribute_text = {enabled = true, anchor = {-20, 4}, text_face = "Friz Quadrata TT", text_size = 10, text_color = {1, 1, 1, .7}, side = 1, shadow = true}, hide_icon = true, desaturated_menu = true, - desaturated_menu2 = true, bg_alpha = 0.51, bg_r = 0.3294, @@ -901,7 +1079,7 @@ local _ row_info = { ["textR_outline"] = false, - ["textL_outline"] = true, + ["textL_outline"] = false, ["icon_file"] = "Interface\\AddOns\\Details\\images\\classes_small_alpha_bw", ["percent_type"] = 1, ["texture_highlight"] = "Interface\\FriendsFrame\\UI-FriendsList-Highlight", @@ -913,7 +1091,7 @@ local _ ["space"] = { ["right"] = -2, ["left"] = 1, - ["between"] = 2, + ["between"] = 0, }, ["fixed_texture_background_color"] = { 0, -- [1] @@ -922,7 +1100,7 @@ local _ 0.20, -- [4] }, ["textR_custom_text"] = "{data1} ({data2}, {data3}%)", - ["start_after_icon"] = true, + ["start_after_icon"] = false, ["font_face_file"] = "Fonts\\ARIALN.TTF", ["fixed_text_color"] = { 0.9058823529411765, -- [1] @@ -952,7 +1130,7 @@ local _ ["texture_class_colors"] = false, ["height"] = 14, ["texture_file"] = "Interface\\AddOns\\Details\\images\\bar4", - ["texture"] = "Details D'ictum", + ["texture"] = "Skyline", ["fixed_texture_color"] = { 0.8627450980392157, -- [1] 0.8627450980392157, -- [2] diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 4f0eeba6..03b43fa7 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -8,7 +8,7 @@ 5 - row texts 6 - window settings 7 - left menu - 8 - right menu + 8 - ------------ 9 - wallpaper 10 - performance teaks 11 - raid tools @@ -5505,7 +5505,6 @@ function window:CreateFrame6() frame6.instanceToolbarSideSlider.OnSwitch = function (self, instance, value) instance.toolbar_side = value instance:ToolbarSide (side) - _G.DetailsOptionsWindow8:update_menuanchor_xy (instance) _G.DetailsOptionsWindow7:update_menuanchor_xy (instance) end frame6.instanceToolbarSideSlider.thumb:SetSize (50, 12) @@ -5798,7 +5797,7 @@ function window:CreateFrame7() frame7.pluginIconsDirectionSlider:SetPoint ("left", frame7.pluginIconsDirectionLabel, "right", 2) frame7.pluginIconsDirectionSlider.OnSwitch = function (self, instance, value) instance.plugins_grow_direction = value - instance:ToolbarMenuButtons() + instance:ToolbarMenuSetButtons() end frame7.pluginIconsDirectionSlider.thumb:SetSize (40, 12) @@ -5806,25 +5805,31 @@ function window:CreateFrame7() --> show or hide buttons local label_icons = g:NewLabel (frame7, _, "$parentShowButtonsLabel", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS"], "GameFontHighlightLeft") - local icon1 = g:NewImage (frame7, [[Interface\GossipFrame\HealerGossipIcon]], 20, 20, "border", nil, "icon1", nil) - local icon2 = g:NewImage (frame7, [[Interface\GossipFrame\TrainerGossipIcon]], 20, 20, "border", nil, "icon2", nil) - local icon3 = g:NewImage (frame7, [[Interface\AddOns\Details\images\sword]], 20, 20, "border", nil, "icon3", nil) - local icon4 = g:NewImage (frame7, [[Interface\COMMON\VOICECHAT-ON]], 20, 20, "border", nil, "icon4", nil) + local icon1 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {0/256, 32/256, 0, 1}, "icon1", nil) + local icon2 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {33/256, 64/256, 0, 1}, "icon2", nil) + local icon3 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {64/256, 96/256, 0, 1}, "icon3", nil) + local icon4 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {96/256, 128/256, 0, 1}, "icon4", nil) + local icon5 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {128/256, 160/256, 0, 1}, "icon5", nil) + local icon6 = g:NewImage (frame7, [[Interface\AddOns\Details\images\toolbar_icons]], 20, 20, "border", {160/256, 192/256, 0, 1}, "icon6", nil) local X1 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x1", nil) local X2 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x2", nil) local X3 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x3", nil) local X4 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x4", nil) + local X5 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x5", nil) + local X6 = g:NewImage (frame7, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x6", nil) X1:SetVertexColor (1, 1, 1, .9) X2:SetVertexColor (1, 1, 1, .9) X3:SetVertexColor (1, 1, 1, .9) X4:SetVertexColor (1, 1, 1, .9) - local x_container = {X1, X2, X3, X4} + X5:SetVertexColor (1, 1, 1, .9) + X6:SetVertexColor (1, 1, 1, .9) + local x_container = {X1, X2, X3, X4, X5, X6} local func = function (menu_button, arg1, arg2) local instance = _G.DetailsOptionsWindow.instance instance.menu_icons [menu_button] = not instance.menu_icons [menu_button] - instance:ToolbarMenuButtons() + instance:ToolbarMenuSetButtons() if (instance.menu_icons [menu_button]) then x_container [menu_button]:Hide() @@ -5841,9 +5846,13 @@ function window:CreateFrame7() button3:InstallCustomTexture() local button4 = g:NewButton (frame7, _, "$parentShowButtons4", "showButtons4Button", 21, 21, func, 4) button4:InstallCustomTexture() + local button5 = g:NewButton (frame7, _, "$parentShowButtons5", "showButtons5Button", 21, 21, func, 5) + button5:InstallCustomTexture() + local button6 = g:NewButton (frame7, _, "$parentShowButtons6", "showButtons6Button", 21, 21, func, 6) + button6:InstallCustomTexture() function frame7:update_icon_buttons (instance) - for i = 1, 4 do + for i = 1, 6 do if (instance.menu_icons [i]) then x_container [i]:Hide() else @@ -5865,9 +5874,17 @@ function window:CreateFrame7() X3:SetPoint ("center", button3, "center") button4:SetPoint ("left", icon3, "right", 2, 0) - icon4:SetPoint ("left", icon3, "right", -2, 0) + icon4:SetPoint ("left", icon3, "right", 2, 0) X4:SetPoint ("center", button4, "center") + button5:SetPoint ("left", icon4, "right", 2, 0) + icon5:SetPoint ("left", icon4, "right", 2, 0) + X5:SetPoint ("center", button5, "center") + + button6:SetPoint ("left", icon5, "right", 2, 0) + icon6:SetPoint ("left", icon5, "right", 2, 0) + X6:SetPoint ("center", button6, "center") + window:CreateLineBackground2 (frame7, "showButtons1Button", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS_DESC"]) --icon sizes @@ -5940,240 +5957,10 @@ function window:CreateFrame8() local frame8 = window.options [8][1] - local titulo_toolbar2 = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbarLabel", Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS"], "GameFontNormal", 16) - local titulo_toolbar2_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", Loc ["STRING_OPTIONS_TOOLBAR2_SETTINGS_DESC"], "GameFontNormal", 9, "white") + local titulo_toolbar2 = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbarLabel", "-- x -- x --", "GameFontNormal", 16) + local titulo_toolbar2_desc = g:NewLabel (frame8, _, "$parentTituloToolbar_buttons", "tituloToolbar2Label", "-- x -- x --", "GameFontNormal", 9, "white") titulo_toolbar2_desc.width = 320 - - --> general settings: - -- menu anchors - local s = g:NewSlider (frame8, _, "$parentMenuAnchorXSlider", "menuAnchorXSlider", SLIDER_WIDTH, 20, -200, 200, 1, instance.menu2_anchor[1]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetThumbSize (50) - local s = g:NewSlider (frame8, _, "$parentMenuAnchorYSlider", "menuAnchorYSlider", SLIDER_WIDTH, 20, -30, 30, 1, instance.menu2_anchor[2]) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetThumbSize (50) - - g:NewLabel (frame8, _, "$parentMenuAnchorXLabel", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU2_X"], "GameFontHighlightLeft") - g:NewLabel (frame8, _, "$parentMenuAnchorYLabel", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU2_Y"], "GameFontHighlightLeft") - - frame8.menuAnchorXSlider:SetPoint ("left", frame8.menuAnchorXLabel, "right", 2, -1) - frame8.menuAnchorYSlider:SetPoint ("left", frame8.menuAnchorYLabel, "right", 2) - - frame8.menuAnchorXSlider:SetThumbSize (50) - frame8.menuAnchorXSlider:SetHook ("OnValueChange", function (self, instance, x) - instance:Menu2Anchor (x, nil) - end) - frame8.menuAnchorYSlider:SetThumbSize (50) - frame8.menuAnchorYSlider:SetHook ("OnValueChange", function (self, instance, y) - instance:Menu2Anchor (nil, y) - end) - - window:CreateLineBackground2 (frame8, "menuAnchorXSlider", "menuAnchorXLabel", Loc ["STRING_OPTIONS_MENU2_X_DESC"]) - window:CreateLineBackground2 (frame8, "menuAnchorYSlider", "menuAnchorYLabel", Loc ["STRING_OPTIONS_MENU2_X_DESC"]) - function frame8:update_menuanchor_xy (instance) - if (instance.toolbar_side == 1) then --top - frame8.menuAnchorXSlider:SetValue (instance.menu2_anchor [1]) - frame8.menuAnchorYSlider:SetValue (instance.menu2_anchor [2]) - elseif (instance.toolbar_side == 2) then --bottom - frame8.menuAnchorXSlider:SetValue (instance.menu2_anchor_down [1]) - frame8.menuAnchorYSlider:SetValue (instance.menu2_anchor_down [2]) - end - end - - -- desaturate - g:NewSwitch (frame8, _, "$parentDesaturateMenuSlider", "desaturateMenuSlider", 60, 20, _, _, instance.desaturated_menu2) - g:NewLabel (frame8, _, "$parentDesaturateMenuLabel", "desaturateMenuLabel", Loc ["STRING_OPTIONS_DESATURATE_MENU"], "GameFontHighlightLeft") - - frame8.desaturateMenuSlider:SetPoint ("left", frame8.desaturateMenuLabel, "right", 2) - frame8.desaturateMenuSlider.OnSwitch = function (self, instance, value) - instance:DesaturateMenu2 (value) - end - - window:CreateLineBackground2 (frame8, "desaturateMenuSlider", "desaturateMenuLabel", Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"]) - - --> show or hide buttons - local label_icons = g:NewLabel (frame8, _, "$parentShowButtonsLabel", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS"], "GameFontHighlightLeft") - local icon1 = g:NewImage (frame8, [[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 20, 20, "border", nil, "icon1", nil) - local icon2 = g:NewImage (frame8, [[Interface\AddOns\Details\images\icons]], 10, 14, "border", nil, "icon2", nil) - icon2:SetTexCoord (0.248046875, 0.287109375, 0.078125, 0.12890625) --127 40 147 66 - icon2:SetVertexColor (.8, .8, .8, 1) - local icon3 = g:NewImage (frame8, [[Interface\AddOns\Details\images\reset_button]], 12, 20, "border", nil, "icon3", nil) - - local X1 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x1", nil) - local X2 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x2", nil) - local X3 = g:NewImage (frame8, [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], 16, 16, nil, nil, "x3", nil) - X1:SetVertexColor (1, 1, 1, .9) - X2:SetVertexColor (1, 1, 1, .9) - X3:SetVertexColor (1, 1, 1, .9) - local x_container = {X1, X2, X3} - - local func = function (menu_button, arg1, arg2) - local instance = _G.DetailsOptionsWindow.instance - instance.menu2_icons [menu_button] = not instance.menu2_icons [menu_button] - instance:ToolbarMenu2Buttons() - - if (instance.menu2_icons [menu_button]) then - x_container [menu_button]:Hide() - else - x_container [menu_button]:Show() - end - end - - local button1 = g:NewButton (frame8, _, "$parentShowButtons1", "showButtons1Button", 21, 21, func, 1) - button1:InstallCustomTexture() - local button2 = g:NewButton (frame8, _, "$parentShowButtons2", "showButtons2Button", 21, 21, func, 2) - button2:InstallCustomTexture() - local button3 = g:NewButton (frame8, _, "$parentShowButtons3", "showButtons3Button", 21, 21, func, 3) - button3:InstallCustomTexture() - - function frame8:update_icon_buttons (instance) - for i = 1, 3 do - if (instance.menu2_icons [i]) then - x_container [i]:Hide() - else - x_container [i]:Show() - end - end - end - - button1:SetPoint ("left", label_icons, "right", 5, 0) - icon1:SetPoint ("center", button1, "center") - X1:SetPoint ("center", button1, "center") - - button2:SetPoint ("left", icon1, "right", 2, 0) - icon2:SetPoint ("center", button2, "center") - X2:SetPoint ("center", button2, "center") - - button3:SetPoint ("left", button2, "right", 2, 0) - icon3:SetPoint ("center", button3, "center") - X3:SetPoint ("center", button3, "center") - - window:CreateLineBackground2 (frame8, "showButtons1Button", "showButtonsLabel", Loc ["STRING_OPTIONS_MENU_SHOWBUTTONS_DESC"]) - - --icon sizes - local s = g:NewSlider (frame8, _, "$parentMenuIconSizeSlider", "menuIconSizeSlider", SLIDER_WIDTH, 20, 0.4, 1.6, 0.05, instance.menu_icons_size, true) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s.useDecimals = true - s.fine_tuning = 0.05 - - g:NewLabel (frame8, _, "$parentMenuIconSizeLabel", "menuIconSizeLabel", Loc ["STRING_OPTIONS_MENU_BUTTONSSIZE"], "GameFontHighlightLeft") - - frame8.menuIconSizeSlider:SetPoint ("left", frame8.menuIconSizeLabel, "right", 2, -1) - - frame8.menuIconSizeSlider:SetHook ("OnValueChange", function (self, instance, value) - instance:ToolbarMenu2ButtonsSize (value) - end) - - window:CreateLineBackground2 (frame8, "menuIconSizeSlider", "menuIconSizeLabel", Loc ["STRING_OPTIONS_MENU_BUTTONSSIZE_DESC"]) - - --> instance button - --text size - local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.instancebutton_config.textsize)) - s:SetBackdrop (slider_backdrop) - s:SetBackdropColor (unpack (slider_backdrop_color)) - s:SetThumbSize (50) - - frame8.instanceTextSizeSlider:SetHook ("OnValueChange", function (self, instance, amount) - instance:ToolbarMenu2InstanceButtonSettings (nil, nil, amount, nil) - end) - - g:NewLabel (frame8, _, "$parentInstanceTextSizeLabel", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE"], "GameFontHighlightLeft") - frame8.instanceTextSizeSlider:SetPoint ("left", frame8.instanceTextSizeLabel, "right", 2) - - window:CreateLineBackground2 (frame8, "instanceTextSizeSlider", "instanceTextSizeLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTSIZE_DESC"]) - - --text face - local instance_text_color_onselectfont = function (_, instance, fontName) - instance:ToolbarMenu2InstanceButtonSettings (nil, fontName, nil, nil) - end - local instance_text_color_build_font_menu = function() - local fontObjects = SharedMedia:HashTable ("font") - local fontTable = {} - for name, fontPath in pairs (fontObjects) do - fontTable[#fontTable+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = instance_text_color_onselectfont, font = fontPath, descfont = name, desc = "If there's a bustle in your hedgerow, don't be alarmed now\nIt's just a spring clean for the may queen."} - end - table.sort (fontTable, function (t1, t2) return t1.label < t2.label end) - return fontTable - end - local d = g:NewDropDown (frame8, _, "$parentInstanceTextFontDropdown", "instanceTextFontDropdown", DROPDOWN_WIDTH, 20, instance_text_color_build_font_menu, nil) - d.onenter_backdrop = dropdown_backdrop_onenter - d.onleave_backdrop = dropdown_backdrop_onleave - d:SetBackdrop (dropdown_backdrop) - d:SetBackdropColor (unpack (dropdown_backdrop_onleave)) - - g:NewLabel (frame8, _, "$parentInstanceTextFontLabel", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTFONT"], "GameFontHighlightLeft") - frame8.instanceTextFontDropdown:SetPoint ("left", frame8.instanceTextFontLabel, "right", 2) - - window:CreateLineBackground2 (frame8, "instanceTextFontDropdown", "instanceTextFontLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR_DESC"]) - - -- text color - local instance_textcolor_callback = function (button, r, g, b, a) - _G.DetailsOptionsWindow.instance:ToolbarMenu2InstanceButtonSettings ({r, g, b, a}, nil, nil, nil) - end - g:NewColorPickButton (frame8, "$parentInstanceTextColorPick", "instanceTextColorPick", instance_textcolor_callback) - g:NewLabel (frame8, _, "$parentInstanceTextLabel", "instanceTextColorPickLabel", Loc ["STRING_OPTIONS_INSTANCE_TEXTCOLOR"], "GameFontHighlightLeft") - frame8.instanceTextColorPick:SetPoint ("left", frame8.instanceTextColorPickLabel, "right", 2, 0) - - window:CreateLineBackground2 (frame8, "instanceTextColorPick", "instanceTextColorPickLabel", Loc ["STRING_OPTIONS_RESET_OVERLAY_DESC"]) - - --text shadow - g:NewLabel (frame8, _, "$parentInstanceTextShadowLabel", "instanceTextShadowLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW"], "GameFontHighlightLeft") - g:NewSwitch (frame8, _, "$parentInstanceTexShadowtSwitch", "instanceTextShadowSwitch", 60, 20, nil, nil, instance.instancebutton_config.textshadow) - frame8.instanceTextShadowSwitch:SetPoint ("left", frame8.instanceTextShadowLabel, "right", 2) - frame8.instanceTextShadowSwitch.OnSwitch = function (self, instance, value) - instance:ToolbarMenu2InstanceButtonSettings (nil, nil, nil, value) - end - window:CreateLineBackground2 (frame8, "instanceTextShadowSwitch", "instanceTextShadowLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_SHADOW_DESC"]) - - --> auto hide menu - g:NewLabel (frame8, _, "$parentAutoHideRightMenuLabel", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_RIGHT"], "GameFontHighlightLeft") - g:NewSwitch (frame8, _, "$parentAutoHideRightMenuSwitch", "autoHideRightMenuSwitch", 60, 20, nil, nil, instance.auto_hide_menu.right) - frame8.autoHideRightMenuSwitch:SetPoint ("left", frame8.autoHideRightMenuLabel, "right", 2) - frame8.autoHideRightMenuSwitch.OnSwitch = function (self, instance, value) - --do something - instance:SetAutoHideMenu (nil, value) - end - window:CreateLineBackground2 (frame8, "autoHideRightMenuSwitch", "autoHideRightMenuLabel", Loc ["STRING_OPTIONS_MENU_AUTOHIDE_DESC"]) - - --> Anchors - - --general anchor - g:NewLabel (frame8, _, "$parentRightMenuAnchor", "RightMenuAnchorLabel", Loc ["STRING_OPTIONS_LEFT_MENU_ANCHOR"], "GameFontNormal") - - local x = window.left_start_at - - titulo_toolbar2:SetPoint (x, -30) - titulo_toolbar2_desc:SetPoint (x, -50) - - local left_side = { - {"RightMenuAnchorLabel", 1, true}, - {"showButtonsLabel", 2}, - {"menuIconSizeLabel", 3}, - {"desaturateMenuLabel", 4}, - {"menuAnchorXLabel", 5}, - {"menuAnchorYLabel", 6}, - - {"autoHideRightMenuLabel", 7, true}, - } - - window:arrange_menu (frame8, left_side, x, -90) - - g:NewLabel (frame8, _, "$parentInstanceButtonAnchor", "instanceAnchorLabel", Loc ["STRING_OPTIONS_INSTANCE_BUTTON_ANCHOR"], "GameFontNormal") - - local right_menu = { - {"instanceAnchorLabel", 1, true}, - {"instanceTextColorPickLabel", 2}, - {"instanceTextFontLabel", 3}, - {"instanceTextSizeLabel", 4}, - {"instanceTextShadowLabel", 5}, - } - - window:arrange_menu (frame8, right_menu, window.right_start_at, -90) - end --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -8306,29 +8093,7 @@ end --> if not window --> window 8 - _G.DetailsOptionsWindow8MenuAnchorXSlider.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8MenuAnchorYSlider.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8:update_menuanchor_xy (editing_instance) - - _G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8DesaturateMenuSlider.MyObject:SetValue (editing_instance.desaturated_menu2) - - _G.DetailsOptionsWindow8MenuIconSizeSlider.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8MenuIconSizeSlider.MyObject:SetValue (editing_instance.menu2_icons_size) - - _G.DetailsOptionsWindow8:update_icon_buttons (editing_instance) - - _G.DetailsOptionsWindow8AutoHideRightMenuSwitch.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8AutoHideRightMenuSwitch.MyObject:SetValue (editing_instance.auto_hide_menu.right) - - _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetFixedParameter (editing_instance) - _G.DetailsOptionsWindow8InstanceTexShadowtSwitch.MyObject:SetFixedParameter (editing_instance) - - _G.DetailsOptionsWindow8InstanceTextColorPick.MyObject:SetColor (unpack (editing_instance.instancebutton_config.textcolor)) - _G.DetailsOptionsWindow8InstanceTextSizeSlider.MyObject:SetValue (editing_instance.instancebutton_config.textsize) - _G.DetailsOptionsWindow8InstanceTextFontDropdown.MyObject:Select (editing_instance.instancebutton_config.textfont) - _G.DetailsOptionsWindow8InstanceTexShadowtSwitch.MyObject:SetValue (editing_instance.instancebutton_config.textshadow) +-- _G.DetailsOptionsWindow8 --instanceTextColorLabel diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index 7b80092e..17fffd10 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -482,158 +482,230 @@ local update_line = function (self, target_frame) end -local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce, start_draw_lines +local show_instance_ids = function() + + for id, instance in _detalhes:ListInstances() do + if (instance:IsEnabled()) then + local id_texture1 = instance.baseframe.id_texture1 + if (not id_texture1) then + instance.baseframe.id_texture1 = instance.baseframe:CreateTexture (nil, "overlay") + instance.baseframe.id_texture2 = instance.baseframe:CreateTexture (nil, "overlay") + instance.baseframe.id_texture1:SetTexture ([[Interface\Timer\BigTimerNumbers]]) + instance.baseframe.id_texture2:SetTexture ([[Interface\Timer\BigTimerNumbers]]) + end + + local h = instance.baseframe:GetHeight() * 0.80 + instance.baseframe.id_texture1:SetSize (h, h) + instance.baseframe.id_texture2:SetSize (h, h) + + local id = instance:GetId() + + local first, second = _math_floor (id/10), _math_floor (id%10) + + if (id >= 10) then + instance.baseframe.id_texture1:SetPoint ("center", instance.baseframe, "center", -h/2/2, 0) + instance.baseframe.id_texture2:SetPoint ("left", instance.baseframe.id_texture1, "right", -h/2, 0) + + first = first + 1 + local line = _math_ceil (first / 4) + local x = ( first - ( (line-1) * 4 ) ) / 4 + local l, r, t, b = x-0.25, x, 0.33 * (line-1), 0.33 * line + instance.baseframe.id_texture1:SetTexCoord (l, r, t, b) + + second = second + 1 + local line = _math_ceil (second / 4) + local x = ( second - ( (line-1) * 4 ) ) / 4 + local l, r, t, b = x-0.25, x, 0.33 * (line-1), 0.33 * line + instance.baseframe.id_texture2:SetTexCoord (l, r, t, b) + + instance.baseframe.id_texture1:Show() + instance.baseframe.id_texture2:Show() + else + instance.baseframe.id_texture1:SetPoint ("center", instance.baseframe, "center") + + second = second + 1 + local line = _math_ceil (second / 4) + local x = ( second - ( (line-1) * 4 ) ) / 4 + local l, r, t, b = x-0.25, x, 0.33 * (line-1), 0.33 * line + instance.baseframe.id_texture1:SetTexCoord (l, r, t, b) + + instance.baseframe.id_texture1:Show() + instance.baseframe.id_texture2:Hide() + end + + end + end + +end + +local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce, start_draw_lines, instance_ids_shown, need_show_group_guide local movement_onupdate = function (self, elapsed) - if (start_draw_lines and start_draw_lines > 0.95) then - update_line (self, instancia_alvo.baseframe) - elseif (start_draw_lines) then - start_draw_lines = start_draw_lines + elapsed - end + if (start_draw_lines and start_draw_lines > 0.95) then + update_line (self, instancia_alvo.baseframe) + elseif (start_draw_lines) then + start_draw_lines = start_draw_lines + elapsed + end - if (tempo_movendo and tempo_movendo < 0) then + if (instance_ids_shown and instance_ids_shown > 0.95) then + show_instance_ids() + instance_ids_shown = nil + + if (need_show_group_guide) then + _detalhes.MicroButtonAlert.Text:SetText (Loc ["STRING_WINDOW1ATACH_DESC"]) + _detalhes.MicroButtonAlert:SetPoint ("bottom", need_show_group_guide.baseframe, "top", 0, 30) + _detalhes.MicroButtonAlert:SetHeight (320) + _detalhes.MicroButtonAlert:Show() + + need_show_group_guide = nil + end + elseif (instance_ids_shown) then + instance_ids_shown = instance_ids_shown + elapsed + end + + if (tempo_movendo and tempo_movendo < 0) then - if (precisa_ativar) then --> se a instância estiver fechada - gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2) - gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2) - gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2) - instancia_alvo:SaveMainWindowPosition() - instancia_alvo:RestoreMainWindowPosition() - precisa_ativar = false - - elseif (tempo_fades) then + if (precisa_ativar) then --> se a instância estiver fechada + gump:Fade (instancia_alvo.baseframe, "ALPHA", 0.2) + gump:Fade (instancia_alvo.baseframe.cabecalho.ball, "ALPHA", 0.2) + gump:Fade (instancia_alvo.baseframe.cabecalho.atributo_icon, "ALPHA", 0.2) + instancia_alvo:SaveMainWindowPosition() + instancia_alvo:RestoreMainWindowPosition() + precisa_ativar = false + + elseif (tempo_fades) then + + if (flash_bounce == 0) then + + flash_bounce = 1 + + local tem_livre = false - if (flash_bounce == 0) then - - flash_bounce = 1 - - local tem_livre = false + for lado, livre in _ipairs (nao_anexados) do + if (livre) then + if (lado == 1) then - for lado, livre in _ipairs (nao_anexados) do - if (livre) then - if (lado == 1) then - - local texture = instancia_alvo.h_esquerda.texture - texture:ClearAllPoints() - - if (instancia_alvo.toolbar_side == 1) then - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -14) - else - texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, 0) - end - else - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -34) - else - texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -20) - end - end - - instancia_alvo.h_esquerda:Flash (1, 1, 2.0, false, 0, 0) - tem_livre = true - - elseif (lado == 2) then - - - local texture = instancia_alvo.h_baixo.texture - texture:ClearAllPoints() - - if (instancia_alvo.toolbar_side == 1) then - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -14) - texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -14) - else - texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, 0) - texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, 0) - end - else - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -34) - texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -34) - else - texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -20) - texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -20) - end - end - - instancia_alvo.h_baixo:Flash (1, 1, 2.0, false, 0, 0) - tem_livre = true - - elseif (lado == 3) then - - local texture = instancia_alvo.h_direita.texture - texture:ClearAllPoints() - - if (instancia_alvo.toolbar_side == 1) then - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -14) - else - texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, 0) - end - else - if (instancia_alvo.show_statusbar) then - texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -34) - else - texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -20) - end - end - - instancia_alvo.h_direita:Flash (1, 1, 2.0, false, 0, 0) - tem_livre = true - - elseif (lado == 4) then - - local texture = instancia_alvo.h_cima.texture - texture:ClearAllPoints() - - if (instancia_alvo.toolbar_side == 1) then - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 20) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 20) - else - texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 0) - texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 0) - end - - instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0) - tem_livre = true - + local texture = instancia_alvo.h_esquerda.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -14) + else + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -34) + else + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -20) end end - end - if (tem_livre) then - if (not _detalhes.snap_alert.playing) then - instancia_alvo:SnapAlert() - _detalhes.snap_alert.playing = true - - _detalhes.MicroButtonAlert.Text:SetText (string.format (Loc ["STRING_ATACH_DESC"], self.instance.meu_id, instancia_alvo.meu_id)) - _detalhes.MicroButtonAlert:SetPoint ("bottom", instancia_alvo.baseframe.cabecalho.novo, "top", 0, 18) - _detalhes.MicroButtonAlert:SetHeight (200) - _detalhes.MicroButtonAlert:Show() + instancia_alvo.h_esquerda:Flash (1, 1, 2.0, false, 0, 0) + tem_livre = true + + elseif (lado == 2) then + + + local texture = instancia_alvo.h_baixo.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -14) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -14) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, 0) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -34) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -34) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -20) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -20) + end end + + instancia_alvo.h_baixo:Flash (1, 1, 2.0, false, 0, 0) + tem_livre = true + + elseif (lado == 3) then + + local texture = instancia_alvo.h_direita.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -14) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -34) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -20) + end + end + + instancia_alvo.h_direita:Flash (1, 1, 2.0, false, 0, 0) + tem_livre = true + + elseif (lado == 4) then + + local texture = instancia_alvo.h_cima.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 20) + else + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 0) + end + + instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0) + tem_livre = true + end end - - tempo_movendo = 1 - else - self:SetScript ("OnUpdate", nil) - tempo_movendo = 1 end - else - tempo_movendo = tempo_movendo - elapsed + if (tem_livre) then + if (not _detalhes.snap_alert.playing) then + instancia_alvo:SnapAlert() + _detalhes.snap_alert.playing = true + + _detalhes.MicroButtonAlert.Text:SetText (string.format (Loc ["STRING_ATACH_DESC"], self.instance.meu_id, instancia_alvo.meu_id)) + _detalhes.MicroButtonAlert:SetPoint ("bottom", instancia_alvo.baseframe.cabecalho.modo_selecao.widget, "top", 0, 18) + _detalhes.MicroButtonAlert:SetHeight (200) + _detalhes.MicroButtonAlert:Show() + end + end end + + tempo_movendo = 1 + else + self:SetScript ("OnUpdate", nil) + tempo_movendo = 1 end + + elseif (tempo_movendo) then + tempo_movendo = tempo_movendo - elapsed + end + end local function move_janela (baseframe, iniciando, instancia) @@ -643,7 +715,7 @@ local function move_janela (baseframe, iniciando, instancia) end if (iniciando) then - + if (baseframe.isMoving) then --> ja esta em movimento return @@ -670,8 +742,10 @@ local function move_janela (baseframe, iniciando, instancia) nao_anexados = {true, true, true, true} tempo_movendo = 1 flash_bounce = 0 - + instance_ids_shown = 0 start_draw_lines = 0 + need_show_group_guide = nil + for lado, snap_to in _pairs (instancia_alvo.snap) do if (snap_to == instancia.meu_id) then start_draw_lines = false @@ -724,6 +798,25 @@ local function move_janela (baseframe, iniciando, instancia) need_start = false end + baseframe:SetScript ("OnUpdate", movement_onupdate) + else + --> eh a instancia 1 + local got_snap + for side, instance_id in _pairs (instancia.snap) do + if (instance_id) then + got_snap = true + end + end + + need_show_group_guide = nil + + if (not got_snap) then + need_show_group_guide = instancia + end + + tempo_movendo = nil + start_draw_lines = nil + instance_ids_shown = 0 baseframe:SetScript ("OnUpdate", movement_onupdate) end @@ -742,9 +835,13 @@ local function move_janela (baseframe, iniciando, instancia) for _, ins in _detalhes:ListInstances() do if (ins.baseframe) then ins.baseframe:SetUserPlaced (false) + if (ins.baseframe.id_texture1) then + ins.baseframe.id_texture1:Hide() + ins.baseframe.id_texture2:Hide() + end end end - + --baseframe:SetClampRectInsets (unpack (_detalhes.window_clamp)) if (instancia_alvo) then @@ -2491,8 +2588,8 @@ _detalhes.snap_alert:SetFrameStrata ("FULLSCREEN") function _detalhes:SnapAlert() _detalhes.snap_alert:ClearAllPoints() - _detalhes.snap_alert:SetPoint ("topleft", self.baseframe.cabecalho.novo, "topleft", -8, 6) - _detalhes.snap_alert:SetPoint ("bottomright", self.baseframe.cabecalho.novo, "bottomright", 8, -6) + _detalhes.snap_alert:SetPoint ("topleft", self.baseframe.cabecalho.modo_selecao.widget, "topleft", -8, 6) + _detalhes.snap_alert:SetPoint ("bottomright", self.baseframe.cabecalho.modo_selecao.widget, "bottomright", 8, -6) _detalhes.snap_alert.animOut:Stop() _detalhes.snap_alert.animIn:Play() end @@ -3753,7 +3850,7 @@ function _detalhes:InstanceButtonsColors (red, green, blue, alpha, no_save, only if (only_left) then - local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report} + local icons = {baseToolbar.modo_selecao, baseToolbar.segmento, baseToolbar.atributo, baseToolbar.report, baseToolbar.fechar, baseToolbar.reset, baseToolbar.fechar} for _, button in _ipairs (icons) do button:SetAlpha (alpha) @@ -4012,40 +4109,6 @@ function gump:CriaRodape (baseframe, instancia) BGFrame_scripts (baseframe.DOWNFrame, baseframe, instancia) end -function _detalhes:CheckConsolidates() - for meu_id, instancia in ipairs (_detalhes.tabela_instancias) do - if (instancia.consolidate and meu_id ~= _detalhes.lower_instance) then - instancia:UnConsolidateIcons() - end - end -end - -function _detalhes:ConsolidateIcons() - - self.consolidate = true - - self.consolidateButton:Show() - - self:ToolbarMenuButtons() - - return self:MenuAnchor() -end - -function _detalhes:UnConsolidateIcons() - - self.consolidate = false - - if (not self.consolidateButton) then - return self:ToolbarMenuButtons() - end - - self.consolidateButton:Hide() - - self:ToolbarMenuButtons() - - return self:MenuAnchor() -end - function _detalhes:GetMenuAnchorPoint() local toolbar_side = self.toolbar_side local menu_side = self.menu_anchor.side @@ -4064,14 +4127,6 @@ function _detalhes:GetMenuAnchorPoint() end end end -function _detalhes:GetMenu2AnchorPoint() - local toolbar_side = self.toolbar_side - if (toolbar_side == 1) then --top - return self.menu2_points [1], "topright", "bottomleft" - elseif (toolbar_side == 2) then --bottom - return self.menu2_points [1], "topleft", "topleft" - end -end --> search key: ~icon function _detalhes:ToolbarMenuButtonsSize (size) @@ -4079,11 +4134,6 @@ function _detalhes:ToolbarMenuButtonsSize (size) self.menu_icons_size = size return self:ToolbarMenuButtons() end -function _detalhes:ToolbarMenu2ButtonsSize (size) - size = size or self.menu2_icons_size - self.menu2_icons_size = size - return self:ToolbarMenu2Buttons() -end local SetIconAlphaCacheButtonsTable = {} function _detalhes:SetIconAlpha (alpha, hide, no_animations) @@ -4109,6 +4159,8 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations) SetIconAlphaCacheButtonsTable [2] = self.baseframe.cabecalho.segmento SetIconAlphaCacheButtonsTable [3] = self.baseframe.cabecalho.atributo SetIconAlphaCacheButtonsTable [4] = self.baseframe.cabecalho.report + SetIconAlphaCacheButtonsTable [5] = self.baseframe.cabecalho.reset + SetIconAlphaCacheButtonsTable [6] = self.baseframe.cabecalho.fechar for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do if (self.menu_icons [index]) then @@ -4124,25 +4176,6 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations) end end - table.wipe (SetIconAlphaCacheButtonsTable) - SetIconAlphaCacheButtonsTable [1] = self.baseframe.cabecalho.fechar - SetIconAlphaCacheButtonsTable [2] = self.baseframe.cabecalho.novo - SetIconAlphaCacheButtonsTable [3] = self.baseframe.cabecalho.reset - - for index, button in _ipairs (SetIconAlphaCacheButtonsTable) do - if (self.menu2_icons [index]) then - if (hide) then - gump:Fade (button, _unpack (_detalhes.windows_fade_in)) - else - if (no_animations) then - button:SetAlpha (alpha) - else - gump:Fade (button, "ALPHAANIM", alpha) - end - end - end - end - if (self:IsLowerInstance()) then if (#_detalhes.ToolBar.Shown > 0) then for index, button in ipairs (_detalhes.ToolBar.Shown) do @@ -4160,8 +4193,140 @@ function _detalhes:SetIconAlpha (alpha, hide, no_animations) end end +local tbuttons = {} +function _detalhes:ToolbarMenuSetButtons (_mode, _segment, _attributes, _report, _reset, _close) + + 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 + if (_reset == nil) then + _reset = self.menu_icons[5] + end + if (_close == nil) then + _close = self.menu_icons[6] + end + + self.menu_icons[1] = _mode + self.menu_icons[2] = _segment + self.menu_icons[3] = _attributes + self.menu_icons[4] = _report + self.menu_icons[5] = _reset + self.menu_icons[6] = _close + + table.wipe (tbuttons) + + tbuttons [1] = self.baseframe.cabecalho.modo_selecao + tbuttons [2] = self.baseframe.cabecalho.segmento + tbuttons [3] = self.baseframe.cabecalho.atributo + tbuttons [4] = self.baseframe.cabecalho.report + tbuttons [5] = self.baseframe.cabecalho.reset + tbuttons [6] = self.baseframe.cabecalho.fechar + + local anchor_frame, point1, point2 = self:GetMenuAnchorPoint() + local got_anchor = false + self.lastIcon = nil + + local size = self.menu_icons_size + + --> 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) + 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) + else + button:Hide() + end + end + + elseif (self.menu_anchor.side == 2) then + for index = #tbuttons, 1, -1 do + local button = tbuttons [index] + + if (self.menu_icons [index]) then + button:ClearAllPoints() + if (got_anchor) then + button:SetPoint ("right", self.lastIcon.widget or self.lastIcon, "left", 3, 0) + 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) + else + button:Hide() + end + 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 + +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 @@ -4249,157 +4414,6 @@ function _detalhes:ToolbarMenuButtons (_mode, _segment, _attributes, _report) return true end -function _detalhes:ToolbarMenu2Buttons (_close, _instance, _reset) - if (_close == nil) then - _close = self.menu2_icons[1] - end - if (_instance == nil) then - _instance = self.menu2_icons[2] - end - if (_reset == nil) then - _reset = self.menu2_icons[3] - end - - self.menu2_icons[1] = _close - self.menu2_icons[2] = _instance - self.menu2_icons[3] = _reset - - local buttons = {self.baseframe.cabecalho.fechar, self.baseframe.cabecalho.novo, self.baseframe.cabecalho.reset} - local config = {self.closebutton_config, self.instancebutton_config, self.resetbutton_config} - - local anchor_frame, point1, point2 = self:GetMenu2AnchorPoint() -- self.menu2_points [1], "topleft", "bottomleft" - local got_anchor = false - local lastIcon = nil - - local size = self.menu2_icons_size - local default_texcoord = {0, 1, 0, 1} - local default_vertexcolor = {1, 1, 1, 1} - --> normal buttons - for index, button in ipairs (buttons) do - if (self.menu2_icons [index]) then - - local button_config = config [index] - button:ClearAllPoints() - - if (got_anchor) then - button:SetPoint ("right", lastIcon, "left", button_config.anchor [1], button_config.anchor [2]) - else - button:SetPoint (point1, anchor_frame, point2, button_config.anchor [1], button_config.anchor [2]) - got_anchor = button - end - - button:SetSize (button_config.size[1] * size, button_config.size[2] * size) - - local normal_texture = button:GetNormalTexture() - local highlight_texture = button:GetHighlightTexture() - local pushed_texture = button:GetPushedTexture() - - normal_texture:SetTexture (button_config.normal_texture) - highlight_texture:SetTexture (button_config.highlight_texture or button_config.normal_texture) - pushed_texture:SetTexture (button_config.pushed_texture or button_config.normal_texture) - - if (button_config.normal_texcoord) then - normal_texture:SetTexCoord (unpack (button_config.normal_texcoord)) - else - normal_texture:SetTexCoord (unpack (default_texcoord)) - end - - if (button_config.highlight_texcoord) then - highlight_texture:SetTexCoord (unpack (button_config.highlight_texcoord)) - else - if (button_config.normal_texcoord and button_config.normal_texture == button_config.highlight_texture) then - highlight_texture:SetTexCoord (unpack (button_config.normal_texcoord)) - else - highlight_texture:SetTexCoord (unpack (default_texcoord)) - end - end - - if (button_config.pushed_texcoord) then - pushed_texture:SetTexCoord (unpack (button_config.pushed_texcoord)) - else - if (button_config.normal_texcoord and (not button_config.pushed_texture or button_config.normal_texture == button_config.pushed_texture)) then - pushed_texture:SetTexCoord (unpack (button_config.normal_texcoord)) - else - pushed_texture:SetTexCoord (unpack (default_texcoord)) - end - end - - if (button_config.normal_vertexcolor) then - normal_texture:SetVertexColor (unpack (button_config.normal_vertexcolor)) - else - normal_texture:SetVertexColor (unpack (default_vertexcolor)) - end - - if (button_config.highlight_vertexcolor) then - highlight_texture:SetVertexColor (unpack (button_config.highlight_vertexcolor)) - else - if (button_config.normal_vertexcolor and button_config.normal_texture == button_config.highlight_texture) then - highlight_texture:SetVertexColor (unpack (button_config.normal_vertexcolor)) - else - highlight_texture:SetVertexColor (unpack (default_vertexcolor)) - end - end - - if (button_config.pushed_vertexcolor) then - pushed_texture:SetVertexColor (unpack (button_config.pushed_vertexcolor)) - else - if (button_config.normal_vertexcolor and button_config.normal_texture == button_config.pushed_texture) then - pushed_texture:SetVertexColor (unpack (button_config.normal_vertexcolor)) - else - pushed_texture:SetVertexColor (unpack (default_vertexcolor)) - end - end - - if (button_config.alpha) then - button:GetNormalTexture():SetAlpha (button_config.alpha) - button:GetHighlightTexture():SetAlpha (button_config.alpha) - button:GetPushedTexture():SetAlpha (button_config.alpha) - end - - lastIcon = button - button:SetParent (self.baseframe) - button:SetFrameLevel (self.baseframe.UPFrame:GetFrameLevel()+1) - button:Show() - - else - button:Hide() - end - end - - self:ToolbarMenu2InstanceButtonSettings() - - return true -end - -function _detalhes:ToolbarMenu2InstanceButtonSettings (color, font, size, shadow) - - if (not color) then - color = self.instancebutton_config.textcolor - end - if (not font) then - font = self.instancebutton_config.textfont - end - if (not size) then - size = self.instancebutton_config.textsize - end - if (shadow == nil) then - shadow = self.instancebutton_config.textshadow - end - - self.instancebutton_config.textcolor = color - self.instancebutton_config.textfont = font - self.instancebutton_config.textsize = size - self.instancebutton_config.textshadow = shadow - - local fontstring = self.baseframe.cabecalho.novo:GetFontString() - - _detalhes:SetFontSize (fontstring, size) - _detalhes:SetFontFace (fontstring, SharedMedia:Fetch ("font", font)) - _detalhes:SetFontColor (fontstring, color) - _detalhes:SetFontOutline (fontstring, shadow) - -end - local parameters_table = {} local on_leave_menu = function (self, elapsed) @@ -4412,6 +4426,11 @@ local on_leave_menu = function (self, elapsed) end end +local OnClickNovoMenu = function (_, _, id, instance) + _detalhes.CriarInstancia (_, _, id) + instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao) +end + local build_mode_list = function (self, elapsed) local CoolTip = GameCooltip @@ -4433,13 +4452,15 @@ local build_mode_list = function (self, elapsed) CoolTip:SetOption ("ButtonHeightMod", -5) CoolTip:SetOption ("ButtonsYModSub", -3) - CoolTip:SetOption ("ButtonsYMod", -5) + CoolTip:SetOption ("ButtonsYMod", -10) CoolTip:SetOption ("YSpacingModSub", -3) CoolTip:SetOption ("YSpacingMod", 1) - CoolTip:SetOption ("FixedHeight", 106) - CoolTip:SetOption ("FixedWidthSub", 146) + CoolTip:SetOption ("HeighMod", 10) + + --CoolTip:SetOption ("FixedHeight", 106) + --CoolTip:SetOption ("FixedWidthSub", 146) CoolTip:AddLine (Loc ["STRING_MODE_GROUP"]) CoolTip:AddMenu (1, instancia.AlteraModo, 2, true) @@ -4498,6 +4519,94 @@ local build_mode_list = function (self, elapsed) CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) end + --> window control + GameCooltip:AddLine ("$div") + CoolTip:AddLine ("Window Control") + CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*5, 32/256*6, 0, 1) + + --CoolTip:AddMenu (2, _detalhes.OpenOptionsWindow, true, 1, nil, "Cant Create Window", _, true) + --CoolTip:AddIcon ([[Interface\Buttons\UI-PlusButton-Up]], 2, 1, 16, 16) + + if (_detalhes:GetNumInstancesAmount() < _detalhes:GetMaxInstancesAmount()) then + CoolTip:AddMenu (2, OnClickNovoMenu, true, instancia, nil, "Create Window", _, true) + CoolTip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 2, 1, 16, 16) + GameCooltip:AddLine ("$div", nil, 2) + end + + local ClosedInstances = 0 + + for index = 1, math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1 do + + local _this_instance = _detalhes.tabela_instancias [index] + + if (not _this_instance.ativa) then --> só reabre se ela estiver ativa + + --> pegar o que ela ta mostrando + local atributo = _this_instance.atributo + local sub_atributo = _this_instance.sub_atributo + ClosedInstances = ClosedInstances + 1 + + if (atributo == 5) then --> custom + + local CustomObject = _detalhes.custom [sub_atributo] + + if (not CustomObject) then + _this_instance:ResetAttribute() + atributo = _this_instance.atributo + sub_atributo = _this_instance.sub_atributo + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true) + CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 2, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2])) + else + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. CustomObject:GetName(), _, true) + CoolTip:AddIcon (CustomObject.icon, 2, 1, 20, 20, 0, 1, 0, 1) + end + + else + local modo = _this_instance.modo + + if (modo == 1) then --alone + + atributo = _detalhes.SoloTables.Mode or 1 + local SoloInfo = _detalhes.SoloTables.Menu [atributo] + if (SoloInfo) then + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " " .. SoloInfo [1], _, true) + CoolTip:AddIcon (SoloInfo [2], 2, 1, 20, 20, 0, 1, 0, 1) + else + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " Unknown Plugin", _, true) + end + + elseif (modo == 4) then --raid + + local plugin_name = _this_instance.current_raid_plugin or _this_instance.last_raid_plugin + if (plugin_name) then + local plugin_object = _detalhes:GetPlugin (plugin_name) + if (plugin_object) then + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " " .. plugin_object.__name, _, true) + CoolTip:AddIcon (plugin_object.__icon, 2, 1, 20, 20, 0, 1, 0, 1) + else + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " Unknown Plugin", _, true) + end + else + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " Unknown Plugin", _, true) + end + + else + + CoolTip:AddMenu (2, OnClickNovoMenu, index, instancia, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true) + CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 2, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2])) + + end + end + + CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) + end + end + + CoolTip:SetWallpaper (2, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) + + --> options + GameCooltip:AddLine ("$div") + CoolTip:AddLine (Loc ["STRING_OPTIONS_WINDOW"]) CoolTip:AddMenu (1, _detalhes.OpenOptionsWindow) CoolTip:AddIcon ([[Interface\AddOns\Details\images\modo_icones]], 1, 1, 20, 20, 32/256*4, 32/256*5, 0, 1) @@ -4540,7 +4649,7 @@ local build_segment_list = function (self, elapsed) CoolTip:SetOption ("FixedWidthSub", 175) CoolTip:SetOption ("RightTextWidth", 105) CoolTip:SetOption ("RightTextHeight", 12) - + ----------- segments local menuIndex = 0 _detalhes.segments_amount = math.floor (_detalhes.segments_amount) @@ -4660,7 +4769,7 @@ local build_segment_list = function (self, elapsed) if (menuIndex) then menuIndex = menuIndex + 1 if (instancia.segmento == i) then - CoolTip:SetLastSelected ("main", menuIndex); + CoolTip:SetLastSelected ("main", menuIndex) menuIndex = nil end end @@ -4669,6 +4778,8 @@ local build_segment_list = function (self, elapsed) end + GameCooltip:AddLine ("$div") + ----------- current CoolTip:AddLine (segmentos.current_standard, _, 1, "white") CoolTip:AddMenu (1, instancia.TrocaTabela, 0) @@ -4721,11 +4832,11 @@ local build_segment_list = function (self, elapsed) --> fill é a quantidade de menu que esta sendo mostrada if (instancia.segmento == 0) then if (fill - 2 == menuIndex) then - CoolTip:SetLastSelected ("main", fill - 1) + CoolTip:SetLastSelected ("main", fill + 0) elseif (fill - 1 == menuIndex) then - CoolTip:SetLastSelected ("main", fill) - else CoolTip:SetLastSelected ("main", fill + 1) + else + CoolTip:SetLastSelected ("main", fill + 2) end menuIndex = nil @@ -4776,11 +4887,11 @@ local build_segment_list = function (self, elapsed) --> fill é a quantidade de menu que esta sendo mostrada if (instancia.segmento == -1) then if (fill - 2 == menuIndex) then - CoolTip:SetLastSelected ("main", fill) + CoolTip:SetLastSelected ("main", fill + 1) elseif (fill - 1 == menuIndex) then - CoolTip:SetLastSelected ("main", fill+1) - else CoolTip:SetLastSelected ("main", fill + 2) + else + CoolTip:SetLastSelected ("main", fill + 3) end menuIndex = nil end @@ -4801,13 +4912,17 @@ local build_segment_list = function (self, elapsed) CoolTip:SetOption ("SubMenuIsTooltip", true) CoolTip:SetOption ("ButtonHeightMod", -4) - CoolTip:SetOption ("ButtonsYMod", -4) + CoolTip:SetOption ("ButtonsYMod", -10) CoolTip:SetOption ("YSpacingMod", 4) CoolTip:SetOption ("ButtonHeightModSub", 4) CoolTip:SetOption ("ButtonsYModSub", 0) CoolTip:SetOption ("YSpacingModSub", -4) + CoolTip:SetOption ("HeighMod", 12) + + --CoolTip:SetOption ("ButtonsYMod", -10) + --CoolTip:SetWallpaper (1, [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Horizontal-Desaturated]], nil, {1, 1, 1, 0.3}) CoolTip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) @@ -5022,7 +5137,6 @@ function _detalhes:ChangeSkin (skin_name) --> update menu saturation self:DesaturateMenu() - self:DesaturateMenu2() --> update statusbar color self:StatusBarColor() @@ -5032,7 +5146,6 @@ function _detalhes:ChangeSkin (skin_name) --> update top menus self:LeftMenuAnchorSide() - self:Menu2Anchor() --> update window strata level self:SetFrameStrata() @@ -5687,7 +5800,6 @@ function _detalhes:ToolbarSide (side) --> update top menus self:LeftMenuAnchorSide() - self:Menu2Anchor() self:StretchButtonAnchor() @@ -5818,44 +5930,6 @@ function _detalhes:MenuAnchor (x, y) end -function _detalhes:Menu2Anchor (x, y) - - if (self.toolbar_side == 1) then --top - if (not x) then - x = self.menu2_anchor [1] - end - if (not y) then - y = self.menu2_anchor [2] - end - self.menu2_anchor [1] = x - self.menu2_anchor [2] = y - - elseif (self.toolbar_side== 2) then --bottom - if (not x) then - x = self.menu2_anchor_down [1] - end - if (not y) then - y = self.menu2_anchor_down [2] - end - self.menu2_anchor_down [1] = x - self.menu2_anchor_down [2] = y - end - - local anchor = self.menu2_points [1] - anchor:ClearAllPoints() - - if (self.toolbar_side == 1) then --> top - anchor:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "bottomleft", x, y+16) - - else --> bottom - anchor:SetPoint ("topleft", self.baseframe.cabecalho.ball_r, "topleft", x-17, (y*-1) + 1) - - end - - self:ToolbarMenu2Buttons() - -end - function _detalhes:HideMainIcon (value) if (type (value) ~= "boolean") then @@ -5915,6 +5989,8 @@ function _detalhes:DesaturateMenu (value) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (true) self.baseframe.cabecalho.atributo:GetNormalTexture():SetDesaturated (true) self.baseframe.cabecalho.report:GetNormalTexture():SetDesaturated (true) + self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (true) + self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (true) if (self.meu_id == _detalhes:GetLowerInstanceNumber()) then for _, button in _ipairs (_detalhes.ToolBar.AllButtons) do @@ -5929,6 +6005,8 @@ function _detalhes:DesaturateMenu (value) self.baseframe.cabecalho.segmento:GetNormalTexture():SetDesaturated (false) self.baseframe.cabecalho.atributo:GetNormalTexture():SetDesaturated (false) self.baseframe.cabecalho.report:GetNormalTexture():SetDesaturated (false) + self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (false) + self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (false) if (self.meu_id == _detalhes:GetLowerInstanceNumber()) then for _, button in _ipairs (_detalhes.ToolBar.AllButtons) do @@ -5939,25 +6017,6 @@ function _detalhes:DesaturateMenu (value) end end -function _detalhes:DesaturateMenu2 (value) - - if (value == nil) then - value = self.desaturated_menu2 - end - - if (value) then - self.desaturated_menu2 = true - self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (true) - self.baseframe.cabecalho.novo:GetNormalTexture():SetDesaturated (true) - self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (true) - else - self.desaturated_menu2 = false - self.baseframe.cabecalho.fechar:GetNormalTexture():SetDesaturated (false) - self.baseframe.cabecalho.novo:GetNormalTexture():SetDesaturated (false) - self.baseframe.cabecalho.reset:GetNormalTexture():SetDesaturated (false) - end -end - function _detalhes:ShowSideBars (instancia) if (instancia) then self = instancia @@ -6145,6 +6204,9 @@ end GameCooltip:SetOption ("TextHeightMod", 0) GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetOption ("ButtonsYMod", -7) + GameCooltip:SetOption ("HeighMod", 8) + local font = SharedMedia:Fetch ("font", "Friz Quadrata TT") GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font) @@ -6204,7 +6266,7 @@ end self.instance.baseframe.cabecalho.button_mouse_over = true GameCooltip:Reset() - GameCooltip:SetOption ("ButtonsYMod", -4) + GameCooltip:SetOption ("ButtonsYMod", -7) GameCooltip:SetOption ("ButtonsYModSub", -2) GameCooltip:SetOption ("YSpacingMod", 0) GameCooltip:SetOption ("YSpacingModSub", -3) @@ -6214,7 +6276,9 @@ end GameCooltip:SetOption ("IgnoreButtonAutoHeightSub", false) GameCooltip:SetOption ("SubMenuIsTooltip", true) GameCooltip:SetOption ("FixedWidthSub", 180) - GameCooltip:SetOption ("FixedHeight", 30) + --GameCooltip:SetOption ("FixedHeight", 30) + + GameCooltip:SetOption ("HeighMod", 9) local font = SharedMedia:Fetch ("font", "Friz Quadrata TT") GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font) @@ -6268,9 +6332,16 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.fechar:SetFrameLevel (5) --> altura mais alta que os demais frames baseframe.cabecalho.fechar:SetPoint ("bottomright", baseframe, "topright", 5, -6) --> seta o ponto dele fixando no base frame - baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]]) - baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]) - baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]]) + baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + baseframe.cabecalho.fechar:GetNormalTexture():SetTexCoord (160/256, 192/256, 0, 1) + baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + baseframe.cabecalho.fechar:GetHighlightTexture():SetTexCoord (160/256, 192/256, 0, 1) + baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + baseframe.cabecalho.fechar:GetPushedTexture():SetTexCoord (160/256, 192/256, 0, 1) + + --baseframe.cabecalho.fechar:SetNormalTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]]) + --baseframe.cabecalho.fechar:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]) + --baseframe.cabecalho.fechar:SetPushedTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Down]]) baseframe.cabecalho.fechar.instancia = instancia baseframe.cabecalho.fechar.instance = instancia @@ -6411,38 +6482,16 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.modo_selecao = gump:NewButton (baseframe, nil, "DetailsModeButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\AddOns\Details\images\modo_icone]]) baseframe.cabecalho.modo_selecao:SetPoint ("bottomleft", baseframe.cabecalho.ball, "bottomright", instancia.menu_anchor [1], instancia.menu_anchor [2]) baseframe.cabecalho.modo_selecao:SetFrameLevel (baseframe:GetFrameLevel()+5) + + local b = baseframe.cabecalho.modo_selecao.widget + b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetNormalTexture():SetTexCoord (0/256, 32/256, 0, 1) + b:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetHighlightTexture():SetTexCoord (0/256, 32/256, 0, 1) + b:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetPushedTexture():SetTexCoord (0/256, 32/256, 0, 1) --> Generating Cooltip menu from table template - local modeMenuTable = { - - {text = Loc ["STRING_MODE_GROUP"]}, - {func = instancia.AlteraModo, param1 = 2}, - {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256, r = 32/256*2, t = 0, b = 1, width = 20, height = 20}, - {text = Loc ["STRING_HELP_MODEGROUP"], type = 2}, - {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, - - {text = Loc ["STRING_MODE_ALL"]}, - {func = instancia.AlteraModo, param1 = 3}, - {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*2, r = 32/256*3, t = 0, b = 1, width = 20, height = 20}, - {text = Loc ["STRING_HELP_MODEALL"], type = 2}, - {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, - - {text = Loc ["STRING_MODE_RAID"]}, -- .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)" - {func = instancia.AlteraModo, param1 = 4}, - {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*3, r = 32/256*4, t = 0, b = 1, width = 20, height = 20}, - {text = Loc ["STRING_HELP_MODERAID"], type = 2}, - {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, - - {text = Loc ["STRING_MODE_SELF"]}, -- .. " (|cffa0a0a0" .. Loc ["STRING_MODE_PLUGINS"] .. "|r)" - {func = instancia.AlteraModo, param1 = 1}, - {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 0, r = 32/256, t = 0, b = 1, width = 20, height = 20}, - {text = Loc ["STRING_HELP_MODESELF"], type = 2}, - {icon = [[Interface\TUTORIALFRAME\TutorialFrame-QuestionMark]], type = 2, width = 16, height = 16, l = 8/64, r = 1 - (8/64), t = 8/64, b = 1 - (8/64)}, - - {text = Loc ["STRING_OPTIONS_WINDOW"]}, - {func = _detalhes.OpenOptionsWindow}, - {icon = [[Interface\AddOns\Details\images\modo_icones]], l = 32/256*4, r = 32/256*5, t = 0, b = 1, width = 20, height = 20}, - } --> Cooltip raw method for enter/leave show/hide baseframe.cabecalho.modo_selecao:SetScript ("OnEnter", function (self) @@ -6476,7 +6525,6 @@ function gump:CriaCabecalho (baseframe, instancia) parameters_table [1] = instancia parameters_table [2] = passou parameters_table [3] = checked - parameters_table [4] = modeMenuTable self:SetScript ("OnUpdate", build_mode_list) end) @@ -6505,6 +6553,14 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.segmento = gump:NewButton (baseframe, nil, "DetailsSegmentButton"..instancia.meu_id, nil, 16, 16, _detalhes.empty_function, nil, nil, [[Interface\AddOns\Details\images\segmentos_icone]]) baseframe.cabecalho.segmento:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) + local b = baseframe.cabecalho.segmento.widget + b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetNormalTexture():SetTexCoord (32/256, 64/256, 0, 1) + b:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetHighlightTexture():SetTexCoord (32/256, 64/256, 0, 1) + b:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetPushedTexture():SetTexCoord (32/256, 64/256, 0, 1) + baseframe.cabecalho.segmento:SetHook ("OnMouseUp", function (button, buttontype) if (buttontype == "LeftButton") then @@ -6600,6 +6656,15 @@ function gump:CriaCabecalho (baseframe, instancia) --> SELECIONAR O ATRIBUTO ---------------------------------------------------------------------------------------------------------------------------------------------------- baseframe.cabecalho.atributo = gump:NewButton (baseframe, nil, "DetailsAttributeButton"..instancia.meu_id, nil, 16, 16, instancia.TrocaTabela, instancia, -3, [[Interface\AddOns\Details\images\sword]]) + + local b = baseframe.cabecalho.atributo.widget + b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetNormalTexture():SetTexCoord (66/256, 93/256, 0, 1) + b:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetHighlightTexture():SetTexCoord (68/256, 93/256, 0, 1) + b:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetPushedTexture():SetTexCoord (68/256, 93/256, 0, 1) + --baseframe.cabecalho.atributo = gump:NewDetailsButton (baseframe, _, instancia, instancia.TrocaTabela, instancia, -3, 16, 16, [[Interface\AddOns\Details\images\sword]]) baseframe.cabecalho.atributo:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) baseframe.cabecalho.atributo:SetPoint ("left", baseframe.cabecalho.segmento.widget, "right", 0, 0) @@ -6670,6 +6735,15 @@ function gump:CriaCabecalho (baseframe, instancia) --> REPORTAR ~report ---------------------------------------------------------------------------------------------------------------------------------------------------- baseframe.cabecalho.report = gump:NewButton (baseframe, nil, "DetailsReportButton"..instancia.meu_id, nil, 8, 16, _detalhes.Reportar, instancia, nil, [[Interface\Addons\Details\Images\report_button]]) + + local b = baseframe.cabecalho.report.widget + b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetNormalTexture():SetTexCoord (96/256, 128/256, 0, 1) + b:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetHighlightTexture():SetTexCoord (96/256, 128/256, 0, 1) + b:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetPushedTexture():SetTexCoord (96/256, 128/256, 0, 1) + --baseframe.cabecalho.report = gump:NewDetailsButton (baseframe, _, instancia, _detalhes.Reportar, instancia, nil, 16, 16, [[Interface\COMMON\VOICECHAT-ON]]) baseframe.cabecalho.report:SetPoint ("left", baseframe.cabecalho.atributo, "right", -6, 0) baseframe.cabecalho.report:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) @@ -6688,6 +6762,9 @@ function gump:CriaCabecalho (baseframe, instancia) GameCooltip:SetOption ("TextHeightMod", 0) GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetOption ("ButtonsYMod", -7) + GameCooltip:SetOption ("HeighMod", 8) + GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, SharedMedia:Fetch ("font", "Friz Quadrata TT")) GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19) GameCooltip:AddMenu (1, _detalhes.Reportar, instancia) @@ -6722,146 +6799,7 @@ function gump:CriaCabecalho (baseframe, instancia) end) - --> NOVA INSTANCIA ---------------------------------------------------------------------------------------------------------------------------------------------------- - baseframe.cabecalho.novo = CreateFrame ("button", "DetailsInstanceButton"..instancia.meu_id, baseframe) --, "OptionsButtonTemplate" - baseframe.cabecalho.novo:SetFrameLevel (baseframe.UPFrame:GetFrameLevel()+1) - - baseframe.cabecalho.novo:SetNormalTexture (1, 1, 1, 1) - baseframe.cabecalho.novo:SetHighlightTexture ([[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]) - baseframe.cabecalho.novo:SetPushedTexture (1, 1, 1, 1) - - baseframe.cabecalho.novo:SetWidth (20) - baseframe.cabecalho.novo:SetHeight (16) - baseframe.cabecalho.novo:SetPoint ("bottomright", baseframe, "topright", instancia.instance_button_anchor [1], instancia.instance_button_anchor [2]) - - baseframe.cabecalho.novo:SetScript ("OnClick", function() _detalhes:CriarInstancia (_, true); _G.GameCooltip:ShowMe (false) end) - baseframe.cabecalho.novo:SetText ("#"..instancia.meu_id) - baseframe.cabecalho.novo:SetNormalFontObject ("GameFontHighlightSmall") - - --> cooltip through inject - --> OnClick Function [1] caller [2] fixed param [3] param1 [4] param2 - local OnClickNovoMenu = function (_, _, id) - _detalhes.CriarInstancia (_, _, id) - _G.GameCooltip:ExecFunc (baseframe.cabecalho.novo) - end - - --> Build Menu Function - local BuildClosedInstanceMenu = function() - - local ClosedInstances = 0 - - for index = 1, math.min (#_detalhes.tabela_instancias, _detalhes.instances_amount), 1 do - - local _this_instance = _detalhes.tabela_instancias [index] - - if (not _this_instance.ativa) then --> só reabre se ela estiver ativa - - --> pegar o que ela ta mostrando - local atributo = _this_instance.atributo - local sub_atributo = _this_instance.sub_atributo - ClosedInstances = ClosedInstances + 1 - - if (atributo == 5) then --> custom - - local CustomObject = _detalhes.custom [sub_atributo] - - if (not CustomObject) then - _this_instance:ResetAttribute() - atributo = _this_instance.atributo - sub_atributo = _this_instance.sub_atributo - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true) - CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 1, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2])) - else - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. CustomObject:GetName(), _, true) - CoolTip:AddIcon (CustomObject.icon, 1, 1, 20, 20, 0, 1, 0, 1) - end - - else - local modo = _this_instance.modo - - if (modo == 1) then --alone - - atributo = _detalhes.SoloTables.Mode or 1 - local SoloInfo = _detalhes.SoloTables.Menu [atributo] - if (SoloInfo) then - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. SoloInfo [1], _, true) - CoolTip:AddIcon (SoloInfo [2], 1, 1, 20, 20, 0, 1, 0, 1) - else - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " Unknown Plugin", _, true) - end - - elseif (modo == 4) then --raid - - local plugin_name = _this_instance.current_raid_plugin or _this_instance.last_raid_plugin - if (plugin_name) then - local plugin_object = _detalhes:GetPlugin (plugin_name) - if (plugin_object) then - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. plugin_object.__name, _, true) - CoolTip:AddIcon (plugin_object.__icon, 1, 1, 20, 20, 0, 1, 0, 1) - else - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " Unknown Plugin", _, true) - end - else - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " Unknown Plugin", _, true) - end - - else - - CoolTip:AddMenu (1, OnClickNovoMenu, index, nil, nil, "#".. index .. " " .. _detalhes.atributos.lista [atributo] .. " - " .. _detalhes.sub_atributos [atributo].lista [sub_atributo], _, true) - CoolTip:AddIcon (_detalhes.sub_atributos [atributo].icones[sub_atributo] [1], 1, 1, 20, 20, unpack (_detalhes.sub_atributos [atributo].icones[sub_atributo] [2])) - - end - end - - CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus) - end - end - - if (ClosedInstances == 0) then - if (_detalhes:GetNumInstancesAmount() == _detalhes:GetMaxInstancesAmount()) then - CoolTip:AddMenu (1, _detalhes.OpenOptionsWindow, true, 1, nil, Loc ["STRING_NOMORE_INSTANCES"], _, true) - CoolTip:AddIcon ([[Interface\Buttons\UI-PlusButton-Up]], 1, 1, 16, 16) - else - CoolTip:AddMenu (1, _detalhes.CriarInstancia, true, nil, nil, Loc ["STRING_NOCLOSED_INSTANCES"], _, true) - CoolTip:AddIcon ([[Interface\Buttons\UI-AttributeButton-Encourage-Up]], 1, 1, 16, 16) - end - end - - GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true) - GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) - GameCooltip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color) - - return ClosedInstances - end - - --> Inject Options Table - baseframe.cabecalho.novo.CoolTip = { - --> cooltip type "menu" "tooltip" "tooltipbars" - Type = "menu", - --> how much time wait with mouse over the frame until cooltip show up - ShowSpeed = 0.15, - --> will call for build menu - BuildFunc = BuildClosedInstanceMenu, - --> a hook for OnEnterScript - OnEnterFunc = function() OnEnterMainWindow (instancia, baseframe.cabecalho.novo, 3) end, - --> a hook for OnLeaveScript - OnLeaveFunc = function() OnLeaveMainWindow (instancia, baseframe.cabecalho.novo, 3) end, - --> default message if there is no option avaliable - Default = Loc ["STRING_NOCLOSED_INSTANCES"], - --> instancia is the first parameter sent after click, before parameters - FixedValue = instancia, - Options = function() - if (instancia.toolbar_side == 1) then --top - return {TextSize = 10, NoLastSelectedBar = true, ButtonsYMod = -2} - elseif (instancia.toolbar_side == 2) then --bottom - return {HeightAnchorMod = -7, TextSize = 10, NoLastSelectedBar = true} - end - end - } - - --> Inject - _G.GameCooltip:CoolTipInject (baseframe.cabecalho.novo) -- ~delete ~erase --> RESETAR HISTORICO ---------------------------------------------------------------------------------------------------------------------------------------------------- @@ -6881,9 +6819,13 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.reset:SetScript ("OnEnter", reset_button_onenter) baseframe.cabecalho.reset:SetScript ("OnLeave", reset_button_onleave) - baseframe.cabecalho.reset:SetNormalTexture ([[Interface\Addons\Details\Images\reset_button2]]) - baseframe.cabecalho.reset:SetHighlightTexture ([[Interface\Addons\Details\Images\reset_button2]]) - baseframe.cabecalho.reset:SetPushedTexture ([[Interface\Addons\Details\Images\reset_button2]]) + local b = baseframe.cabecalho.reset + b:SetNormalTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetNormalTexture():SetTexCoord (128/256, 160/256, 0, 1) + b:SetHighlightTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetHighlightTexture():SetTexCoord (128/256, 160/256, 0, 1) + b:SetPushedTexture ([[Interface\AddOns\Details\images\toolbar_icons]]) + b:GetPushedTexture():SetTexCoord (128/256, 160/256, 0, 1) --> fim botão reset diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index 206c1ead..176da67e 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -1119,8 +1119,8 @@ local window_openned_at = time() instance_frame_alert:SetScript ("OnShow", function() local instance = _detalhes:GetInstance (1) - frame_alert.alert:SetPoint ("topleft", instance.baseframe.cabecalho.novo, "topleft", -8, 6) - frame_alert.alert:SetPoint ("bottomright", instance.baseframe.cabecalho.novo, "bottomright", 8, -6) + frame_alert.alert:SetPoint ("topleft", instance.baseframe.cabecalho.modo_selecao.widget, "topleft", -8, 6) + frame_alert.alert:SetPoint ("bottomright", instance.baseframe.cabecalho.modo_selecao.widget, "bottomright", 8, -6) frame_alert.alert.animOut:Stop() frame_alert.alert.animIn:Play() diff --git a/images/icons.tga b/images/icons.tga index fda721dd..e6296c08 100644 Binary files a/images/icons.tga and b/images/icons.tga differ diff --git a/images/modo_icones.tga b/images/modo_icones.tga index f803b6bc..508e464e 100644 Binary files a/images/modo_icones.tga and b/images/modo_icones.tga differ diff --git a/images/skins/default_skin.tga b/images/skins/default_skin.tga index 41d87976..0c2dd89c 100644 Binary files a/images/skins/default_skin.tga and b/images/skins/default_skin.tga differ diff --git a/images/toolbar_icons.tga b/images/toolbar_icons.tga new file mode 100644 index 00000000..454808fa Binary files /dev/null and b/images/toolbar_icons.tga differ diff --git a/startup.lua b/startup.lua index 89568702..c4cf444a 100644 --- a/startup.lua +++ b/startup.lua @@ -100,7 +100,6 @@ function _G._detalhes:Start() self:CriarInstancia() end self:GetLowerInstanceNumber() - self:CheckConsolidates() --> start time machine self.timeMachine:Ligar()