diff --git a/Libs/DF/button.lua b/Libs/DF/button.lua index 01b5bc629..80896fbff 100644 --- a/Libs/DF/button.lua +++ b/Libs/DF/button.lua @@ -459,9 +459,16 @@ local ButtonMetaFunctions = _G[DF.GlobalWidgetControlNames ["button"]] local isAtlas = C_Texture.GetAtlasInfo(texture) if (isAtlas) then self.icon:SetAtlas(texture) + + elseif (DF:IsHtmlColor(texture)) then + local r, g, b, a = DF:ParseColors(texture) + self.icon:SetColorTexture(r, g, b, a) else self.icon:SetTexture(texture) end + elseif (type(texture) == "table") then + local r, g, b, a = DF:ParseColors(texture) + self.icon:SetColorTexture(r, g, b, a) else self.icon:SetTexture(texture) end @@ -811,7 +818,7 @@ local ButtonMetaFunctions = _G[DF.GlobalWidgetControlNames ["button"]] end else if (button.MyObject.icon) then - button.MyObject.icon:SetPoint ("left", button, "left", 7 + (button.MyObject.icon.leftpadding or 0), -2) + button.MyObject.icon:SetPoint ("left", button, "left", 5 + (button.MyObject.icon.leftpadding or 0), -1) else button.text:SetPoint ("center", button,"center", 1, -1) end diff --git a/Libs/DF/fw.lua b/Libs/DF/fw.lua index a66c8823e..70e082ca5 100644 --- a/Libs/DF/fw.lua +++ b/Libs/DF/fw.lua @@ -1,6 +1,6 @@ -local dversion = 367 +local dversion = 368 local major, minor = "DetailsFramework-1.0", dversion local DF, oldminor = LibStub:NewLibrary (major, minor) diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index e11779225..89ae8197b 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -119,7 +119,7 @@ LIB_OPEN_RAID_CAN_LOAD = false local GetContainerNumSlots = GetContainerNumSlots or C_Container.GetContainerNumSlots local GetContainerItemID = GetContainerItemID or C_Container.GetContainerItemID local GetContainerItemLink = GetContainerItemLink or C_Container.GetContainerItemLink - + function openRaidLib.ShowDiagnosticErrors(value) CONST_DIAGNOSTIC_ERRORS = value end diff --git a/boot.lua b/boot.lua index 470323972..f3c08ba49 100644 --- a/boot.lua +++ b/boot.lua @@ -6,11 +6,11 @@ local version, build, date, tocversion = GetBuildInfo() - _detalhes.build_counter = 10032 - _detalhes.alpha_build_counter = 10032 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 10033 + _detalhes.alpha_build_counter = 10033 --if this is higher than the regular counter, use it instead _detalhes.dont_open_news = true _detalhes.game_version = version - _detalhes.userversion = version .. _detalhes.build_counter + _detalhes.userversion = version .. " " .. _detalhes.build_counter _detalhes.realversion = 146 --core version, this is used to check API version for scripts and plugins (see alias below) _detalhes.APIVersion = _detalhes.realversion --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" --simple stirng to show to players @@ -18,7 +18,7 @@ _detalhes.BFACORE = 131 --core version on BFA launch _detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch -- - _detalhes.dragonflight_beta_version = 35 + _detalhes.dragonflight_beta_version = 36 Details = _detalhes @@ -349,6 +349,13 @@ do available = {}, }, } + + --make a color namespace + Details.Colors = {} + function Details.Colors.GetMenuTextColor() + return "orange" + end + --> armazena as fun��es para inicializa��o dos dados - Metatable functions _detalhes.refresh = {} --> armazena as fun��es para limpar e guardas os dados - Metatable functions diff --git a/core/parser.lua b/core/parser.lua index 2d7dd8837..a24f9fbbf 100755 --- a/core/parser.lua +++ b/core/parser.lua @@ -4870,6 +4870,7 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 return Details.Schedules.After(1, Details.Check_ZONE_CHANGED_NEW_AREA) end + --~zone ~area function _detalhes:Check_ZONE_CHANGED_NEW_AREA() local zoneName, zoneType, _, _, _, _, _, zoneMapID = GetInstanceInfo() @@ -4886,6 +4887,10 @@ local SPELL_POWER_PAIN = SPELL_POWER_PAIN or (PowerEnum and PowerEnum.Pain) or 1 if (zoneType == "party" or zoneType == "raid") then _is_in_instance = true + + if (DetailsFramework.IsDragonflight()) then + Details:Msg("friendly reminder to enabled combat logs (/combatlog) if you're recording them (Dragonflight Beta).") + end end if (_detalhes.last_zone_type ~= zoneType) then diff --git a/frames/window_main.lua b/frames/window_main.lua index 80c44267f..26d17a7dd 100644 --- a/frames/window_main.lua +++ b/frames/window_main.lua @@ -1,6 +1,5 @@ local Details = _G._detalhes -local Details = Details local Loc = LibStub("AceLocale-3.0"):GetLocale("Details") local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0") local segmentos = Details.segmentos @@ -27,7 +26,7 @@ local modo_raid = Details._detalhes_props["MODO_RAID"] local modo_alone = Details._detalhes_props["MODO_ALONE"] local IsInInstance = _G.IsInInstance -local tok_functions = Details.ToKFunctions +local tokFunctions = Details.ToKFunctions --constants local baseframe_strata = "LOW" @@ -1641,7 +1640,7 @@ local lockFunctionOnEnter = function (self) self.label:SetTextColor (1, 1, 1, .6) Details:CooltipPreset (2.1) - GameCooltip:SetOption ("FixedWidth", 180) + GameCooltip:SetOption("FixedWidth", 180) GameCooltip:AddFromTable (lockButtonTooltip) GameCooltip:SetOwner (self) @@ -1776,7 +1775,7 @@ local unSnapButtonOnEnter = function (self) self.mostrando = true Details:CooltipPreset (2.1) - GameCooltip:SetOption ("FixedWidth", 180) + GameCooltip:SetOption("FixedWidth", 180) GameCooltip:AddFromTable (unSnapButtonTooltip) GameCooltip:ShowCooltip (self, "tooltip") @@ -4562,7 +4561,7 @@ local fast_ps_func = function (self) local combatTime = instance.showing:GetCombatTime() local abbreviationType = Details.ps_abbreviation - local abbreviationFunc = tok_functions[abbreviationType] + local abbreviationFunc = tokFunctions[abbreviationType] local isInLineTextEnabled = instance.use_multi_fontstrings local instanceShowDataSettings = instance.row_info.textR_show_data @@ -5968,7 +5967,7 @@ local OnClickNovoMenu = function (_, _, id, instance) end function Details:SetTooltipMinWidth() - GameCooltip:SetOption ("MinWidth", 155) + GameCooltip:SetOption("MinWidth", 155) end function Details:FormatCooltipBackdrop() @@ -6117,8 +6116,8 @@ local build_mode_list = function(self, deltaTime) end end - gameCooltip:SetOption ("TextSize", Details.font_sizes.menus) - gameCooltip:SetOption ("TextFont", Details.font_faces.menus) + gameCooltip:SetOption("TextSize", Details.font_sizes.menus) + gameCooltip:SetOption("TextFont", Details.font_faces.menus) end end @@ -6946,20 +6945,20 @@ local buildSegmentTooltip = function(self, deltaTime) Details:SetMenuOwner (self, instance) - gameCooltip:SetOption ("TextSize", Details.font_sizes.menus) - gameCooltip:SetOption ("TextFont", Details.font_faces.menus) + gameCooltip:SetOption("TextSize", Details.font_sizes.menus) + gameCooltip:SetOption("TextFont", Details.font_faces.menus) - gameCooltip:SetOption ("SubMenuIsTooltip", true) + gameCooltip:SetOption("SubMenuIsTooltip", true) - gameCooltip:SetOption ("ButtonHeightMod", -4) - gameCooltip:SetOption ("ButtonsYMod", -10) - gameCooltip:SetOption ("YSpacingMod", 1) + gameCooltip:SetOption("ButtonHeightMod", -4) + gameCooltip:SetOption("ButtonsYMod", -10) + gameCooltip:SetOption("YSpacingMod", 1) - gameCooltip:SetOption ("ButtonHeightModSub", 4) - gameCooltip:SetOption ("ButtonsYModSub", 0) - gameCooltip:SetOption ("YSpacingModSub", -4) + gameCooltip:SetOption("ButtonHeightModSub", 4) + gameCooltip:SetOption("ButtonsYModSub", 0) + gameCooltip:SetOption("YSpacingModSub", -4) - gameCooltip:SetOption ("HeighMod", 12) + gameCooltip:SetOption("HeighMod", 12) Details:SetTooltipMinWidth() @@ -8985,41 +8984,41 @@ end local instancia = self._instance or self.widget._instance local baseframe = instancia.baseframe - local GameCooltip = GameCooltip + local gameCooltip = GameCooltip - OnEnterMainWindow (self.instance, self) - GameCooltip.buttonOver = true + OnEnterMainWindow(self.instance, self) + gameCooltip.buttonOver = true self.instance.baseframe.cabecalho.button_mouse_over = true if (self.instance.desaturated_menu) then self:GetNormalTexture():SetDesaturated (false) end - GameCooltip:Reset() - GameCooltip:SetType ("menu") + gameCooltip:Reset() + gameCooltip:SetType ("menu") - GameCooltip:SetOption ("ButtonsYMod", -6) - GameCooltip:SetOption ("HeighMod", 6) - GameCooltip:SetOption ("YSpacingMod", -3) - GameCooltip:SetOption ("TextHeightMod", 0) - GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + gameCooltip:SetOption("ButtonsYMod", -6) + gameCooltip:SetOption("HeighMod", 6) + gameCooltip:SetOption("YSpacingMod", -3) + gameCooltip:SetOption("TextHeightMod", 0) + gameCooltip:SetOption("IgnoreButtonAutoHeight", false) Details:SetTooltipMinWidth() - GameCooltip:AddLine(Loc["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus) - GameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange") - GameCooltip:AddMenu(1, Details.tabela_historico.resetar_overall) + gameCooltip:AddLine(Loc["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus) + gameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange") + gameCooltip:AddMenu(1, Details.tabela_historico.resetar_overall) - GameCooltip:AddLine("$div", nil, 1, nil, -5, -11) + gameCooltip:AddLine("$div", nil, 1, nil, -5, -11) - GameCooltip:AddLine(Loc["STRING_ERASE_DATA"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus) - GameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red") - GameCooltip:AddMenu(1, Details.tabela_historico.resetar) + gameCooltip:AddLine(Loc["STRING_ERASE_DATA"], nil, 1, "white", nil, Details.font_sizes.menus, Details.font_faces.menus) + gameCooltip:AddIcon([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red") + gameCooltip:AddMenu(1, Details.tabela_historico.resetar) show_anti_overlap (self.instance, self, "top") Details:SetMenuOwner (self, self.instance) - GameCooltip:ShowCooltip() + gameCooltip:ShowCooltip() end local reset_button_onleave = function (self) @@ -9096,19 +9095,19 @@ end GameCooltip:Reset() GameCooltip:SetType ("menu") - GameCooltip:SetOption ("ButtonsYMod", -7) - GameCooltip:SetOption ("ButtonsYModSub", -2) - GameCooltip:SetOption ("YSpacingMod", 0) - GameCooltip:SetOption ("YSpacingModSub", -3) - GameCooltip:SetOption ("TextHeightMod", 0) - GameCooltip:SetOption ("TextHeightModSub", 0) - GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) - GameCooltip:SetOption ("IgnoreButtonAutoHeightSub", false) - GameCooltip:SetOption ("SubMenuIsTooltip", true) - GameCooltip:SetOption ("FixedWidthSub", 180) - --GameCooltip:SetOption ("FixedHeight", 30) - - GameCooltip:SetOption ("HeighMod", 9) + GameCooltip:SetOption("ButtonsYMod", -7) + GameCooltip:SetOption("ButtonsYModSub", -2) + GameCooltip:SetOption("YSpacingMod", 0) + GameCooltip:SetOption("YSpacingModSub", -3) + GameCooltip:SetOption("TextHeightMod", 0) + GameCooltip:SetOption("TextHeightModSub", 0) + GameCooltip:SetOption("IgnoreButtonAutoHeight", false) + GameCooltip:SetOption("IgnoreButtonAutoHeightSub", false) + GameCooltip:SetOption("SubMenuIsTooltip", true) + GameCooltip:SetOption("FixedWidthSub", 180) + --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, Details.font_sizes.menus, Details.font_faces.menus) @@ -9187,11 +9186,11 @@ local report_on_enter = function (self, motion, forced, from_click) GameCooltip:Reset() GameCooltip:SetType ("menu") - GameCooltip:SetOption ("ButtonsYMod", -6) - GameCooltip:SetOption ("HeighMod", 6) - GameCooltip:SetOption ("YSpacingMod", -1) - GameCooltip:SetOption ("TextHeightMod", 0) - GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetOption("ButtonsYMod", -6) + GameCooltip:SetOption("HeighMod", 6) + GameCooltip:SetOption("YSpacingMod", -1) + GameCooltip:SetOption("TextHeightMod", 0) + GameCooltip:SetOption("IgnoreButtonAutoHeight", false) Details:SetTooltipMinWidth() @@ -9287,10 +9286,10 @@ local atributo_on_enter = function (self, motion, forced, from_click) local have_plugins = Details:MontaRaidOption (instancia) if (not have_plugins) then GameCooltip:SetType ("tooltip") - GameCooltip:SetOption ("ButtonsYMod", 0) + GameCooltip:SetOption("ButtonsYMod", 0) - GameCooltip:SetOption ("TextHeightMod", 0) - GameCooltip:SetOption ("IgnoreButtonAutoHeight", false) + GameCooltip:SetOption("TextHeightMod", 0) + GameCooltip:SetOption("IgnoreButtonAutoHeight", false) GameCooltip:AddLine("All raid plugins already\nin use or disabled.", nil, 1, "white", nil, 10, SharedMedia:Fetch ("font", "Friz Quadrata TT")) GameCooltip:AddIcon([[Interface\GROUPFRAME\UI-GROUP-ASSISTANTICON]], 1, 1) GameCooltip:SetWallpaper (1, Details.tooltip.menus_bg_texture, Details.tooltip.menus_bg_coords, Details.tooltip.menus_bg_color, true) @@ -9299,11 +9298,11 @@ local atributo_on_enter = function (self, motion, forced, from_click) else Details:MontaAtributosOption (instancia) - GameCooltip:SetOption ("YSpacingMod", -1) - GameCooltip:SetOption ("YSpacingModSub", -2) + GameCooltip:SetOption("YSpacingMod", -1) + GameCooltip:SetOption("YSpacingModSub", -2) end - GameCooltip:SetOption ("TextSize", Details.font_sizes.menus) + GameCooltip:SetOption("TextSize", Details.font_sizes.menus) Details:SetMenuOwner (self, instancia) diff --git a/frames/window_options2.lua b/frames/window_options2.lua index 3fedc0378..8ac674b39 100644 --- a/frames/window_options2.lua +++ b/frames/window_options2.lua @@ -61,14 +61,29 @@ function Details.options.InitializeOptionsWindow(instance) f:Hide() + local formatFooterText = function(object) + object.fontface = "GameFontNormal" + object.fontsize = 10 + object.fontcolor = {1, 0.82, 0} + end + + --create a floating frame to hold footer frames + local footerFrame = CreateFrame("frame", "$parentFooterFrame", f, "BackdropTemplate") + footerFrame:SetPoint("bottomleft", f, "bottomleft", 0, 0) + footerFrame:SetPoint("bottomright", f, "bottomright", 0, 0) + footerFrame:SetHeight(50) + footerFrame:SetFrameLevel(f:GetFrameLevel() + 10) + DF:ApplyStandardBackdrop(footerFrame) + + local gradientBelowTheLine = DetailsFramework:CreateTexture(footerFrame, {gradient = "vertical", fromColor = {0, 0, 0, 0.25}, toColor = "transparent"}, 1, 90, "artwork", {0, 1, 0, 1}, "dogGradient") + gradientBelowTheLine:SetPoint("bottoms") + --select the instance to edit - local onSelectInstance = function (_, _, instanceId) + local onSelectInstance = function(_, _, instanceId) local instance = _detalhes.tabela_instancias[instanceId] - if (not instance:IsEnabled() or not instance:IsStarted()) then _detalhes.CriarInstancia (_, _, instance.meu_id) end - Details.options.SetCurrentInstance(instance) f.updateMicroFrames() end @@ -123,8 +138,9 @@ function Details.options.InitializeOptionsWindow(instance) end return instanceList end - - local instanceSelection = DF:NewDropDown (f, _, "$parentInstanceSelectDropdown", "instanceDropdown", 200, 18, buildInstanceMenu) --, nil, options_dropdown_template + + local instanceSelection = DF:NewDropDown (footerFrame, _, "$parentInstanceSelectDropdown", "instanceDropdown", 200, 18, buildInstanceMenu) --, nil, options_dropdown_template + f.instanceDropdown = instanceSelection instanceSelection:SetPoint("bottomright", f, "bottomright", -7, 09) instanceSelection:SetTemplate(options_dropdown_template) instanceSelection:SetHook("OnEnter", function() @@ -137,28 +153,29 @@ function Details.options.InitializeOptionsWindow(instance) GameCooltip:Hide() end) - local instances_string = DF:NewLabel(f, nil, "$parentInstanceDropdownLabel", "instancetext", Loc ["STRING_OPTIONS_EDITINSTANCE"], "GameFontNormal", 12) + local instances_string = DF:NewLabel(footerFrame, nil, "$parentInstanceDropdownLabel", "instancetext", Loc ["STRING_OPTIONS_EDITINSTANCE"], "GameFontNormal", 12) instances_string:SetPoint("right", instanceSelection, "left", -2, 1) + formatFooterText(instances_string) - local bigdogImage = DF:NewImage(f, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.9, 200*0.9, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog") - bigdogImage:SetPoint("bottomright", f, "bottomright", -3, 27) + local bigdogImage = DF:NewImage(footerFrame, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.9, 200*0.9, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog") + bigdogImage:SetPoint("bottomright", footerFrame, "topright", 0, 0) bigdogImage:SetAlpha(.25) --editing group checkbox local onToggleEditingGroup = function(self, fixparam, value) _detalhes.options_group_edit = value end - local editingGroupCheckBox = DF:CreateSwitch(f, onToggleEditingGroup, _detalhes.options_group_edit, _, _, _, _, _, "$parentEditGroupCheckbox", _, _, _, _, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE")) + local editingGroupCheckBox = DF:CreateSwitch(footerFrame, onToggleEditingGroup, _detalhes.options_group_edit, _, _, _, _, _, "$parentEditGroupCheckbox", _, _, _, _, DF:GetTemplate("switch", "OPTIONS_CHECKBOX_BRIGHT_TEMPLATE")) editingGroupCheckBox:SetAsCheckBox() editingGroupCheckBox.tooltip = Loc ["STRING_MINITUTORIAL_OPTIONS_PANEL2"] - local editingGroupLabel = DF:NewLabel(f, nil, "$parentEditingGroupLabel", "editingGroupLabel", "Editing Group:", "GameFontNormal", 12) --localize-me + local editingGroupLabel = DF:NewLabel(footerFrame, nil, "$parentEditingGroupLabel", "editingGroupLabel", "Editing Group:", "GameFontNormal", 12) --localize-me editingGroupLabel:SetPoint("bottomleft", instances_string, "topleft", 0, 5) editingGroupCheckBox:SetPoint("left", editingGroupLabel, "right", 2, 0) + formatFooterText(editingGroupLabel) --> create test bars DF:NewColor ("C_OptionsButtonOrange", 0.9999, 0.8196, 0, 1) - local create_test_bars_func = function() _detalhes.CreateTestBars() if (not _detalhes.test_bar_update) then @@ -167,25 +184,24 @@ function Details.options.InitializeOptionsWindow(instance) _detalhes:StopTestBarUpdate() end end - local fillbars = DF:NewButton (f, _, "$parentCreateExampleBarsButton", nil, 140, 20, create_test_bars_func, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1) + local fillbars = DF:NewButton(footerFrame, _, "$parentCreateExampleBarsButton", nil, 140, 20, create_test_bars_func, nil, nil, nil, Loc ["STRING_OPTIONS_TESTBARS"], 1) fillbars:SetPoint ("bottomleft", f.widget, "bottomleft", 10, 10) fillbars:SetTemplate(options_button_template) fillbars:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {323/512, 365/512, 42/512, 78/512}, {1, 1, 1, 0.6}, 4, 2) --> change log - local changelog = DF:NewButton (f, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1) + local changelog = DF:NewButton(footerFrame, _, "$parentOpenChangeLogButton", nil, 140, 20, _detalhes.OpenNewsWindow, "change_log", nil, nil, Loc ["STRING_OPTIONS_CHANGELOG"], 1) changelog:SetPoint ("left", fillbars, "right", 10, 0) changelog:SetTemplate (options_button_template) changelog:SetIcon ("Interface\\AddOns\\Details\\images\\icons", nil, nil, nil, {367/512, 399/512, 43/512, 76/512}, {1, 1, 1, 0.8}, 4, 2) --> search field - local searchBox = DF:CreateTextEntry(f, function()end, 140, 20, _, _, _, options_dropdown_template) - searchBox:SetPoint ("bottomleft", fillbars, "topleft", 0, 5) + local searchBox = DF:CreateTextEntry(footerFrame, function()end, 140, 20, _, _, _, options_dropdown_template) + searchBox:SetPoint("left", changelog, "right", 10, 0) - local searchLabel = DF:CreateLabel(f, "Search:", DF:GetTemplate ("font", "ORANGE_FONT_TEMPLATE")) --localize-me - searchLabel:SetPoint ("bottomleft", searchBox, "topleft", 0, 2) - searchLabel.fontface = "GameFontNormal" - searchLabel.fontsize = 12 + local searchLabel = DF:CreateLabel(footerFrame, "Search:") --localize-me + searchLabel:SetPoint("bottomleft", searchBox, "topleft", 0, 2) + formatFooterText(searchLabel) searchBox:SetHook("OnChar", function() if (searchBox.text ~= "") then @@ -304,25 +320,22 @@ function Details.options.InitializeOptionsWindow(instance) f.sectionFramesContainer[i]:Hide() if (f.sectionFramesContainer[i].sectionButton) then f.sectionFramesContainer[i].sectionButton:SetTemplate(options_button_template) + f.sectionFramesContainer[i].sectionButton:SetIcon({.4, .4, .4}, 4, section_menu_button_height -4, "overlay") end end f.sectionFramesContainer[sectionId]:Show() - --hightlight the option button f.sectionFramesContainer[sectionId].sectionButton:SetTemplate(options_button_template_selected) + f.sectionFramesContainer[sectionId].sectionButton:SetIcon({1, 1, 0}, 4, section_menu_button_height -4, "overlay") end Details.options.SetCurrentInstance(instance) --create frames for sections for index, sectionId in ipairs(optionsSectionsOrder) do - if (type(sectionId) == "number") then - local sectionFrame = CreateFrame("frame", "$parentTab" .. sectionId, f, "BackdropTemplate") - --sectionFrame:SetAllPoints() - --sectionFrame:ClearAllPoints() sectionFrame:SetPoint("topleft", f, "topleft", -40, 22) sectionFrame:SetSize(f:GetSize()) sectionFrame:EnableMouse(false) @@ -333,17 +346,20 @@ function Details.options.InitializeOptionsWindow(instance) realBackdropAreaFrame:SetBackdropColor(0.1215, 0.1176, 0.1294, .1) realBackdropAreaFrame:SetBackdropBorderColor(0.2, 0.2, 0.2, .05) realBackdropAreaFrame:SetPoint("topleft", f, "topleft", 150, -27) - realBackdropAreaFrame:SetSize(770, 570) + realBackdropAreaFrame:SetSize(775, 570) local leftGradient = DetailsFramework:CreateTexture(sectionFrame, {gradient = "horizontal", fromColor = {0, 0, 0, 0}, toColor = {0, 0, 0, 0.3}}, 10, 1, "artwork", {0, 1, 0, 1}, "leftGradient") leftGradient:SetPoint("right-left", realBackdropAreaFrame, 1) + local rightGradient = DetailsFramework:CreateTexture(sectionFrame, {gradient = "horizontal", fromColor = {0, 0, 0, 0}, toColor = {0, 0, 0, 0.25}}, 110, 1, "overlay", nil, "rightGradient") + rightGradient:SetPoint("rights", realBackdropAreaFrame, 0) + rightGradient:Hide() + local bottomGradient = DetailsFramework:CreateTexture(realBackdropAreaFrame, {gradient = "vertical", fromColor = {0, 0, 0, 1}, toColor = {0, 0, 0, 0}}, 1, 20, "artwork", {0, 1, 0, 1}, "bottomGradient") bottomGradient.sublevel = 7 bottomGradient:SetPoint("bottoms") sectionFrame.name = sectionsName[sectionId] - --tinsert(f.sectionFramesContainer, sectionFrame) f.sectionFramesContainer[sectionId] = sectionFrame local buildOptionSectionFunc = Details.optionsSection[sectionId] @@ -353,12 +369,16 @@ function Details.options.InitializeOptionsWindow(instance) --create a button for the section local sectionButton = DF:CreateButton(f, function() Details.options.SelectOptionsSection(sectionId) end, section_menu_button_width, section_menu_button_height, sectionsName[sectionId], sectionId, nil, nil, nil, "$parentButtonSection" .. sectionId, nil, options_button_template, options_text_template) + sectionButton:SetIcon({.4, .4, .4}, 4, section_menu_button_height -4, "overlay") sectionButton:SetPoint("topleft", f, "topleft", 10, buttonYPosition) buttonYPosition = buttonYPosition - (section_menu_button_height + 1) sectionFrame.sectionButton = sectionButton if (sectionId == 19) then --search results sectionButton:Disable() + + elseif (sectionId == 1) then + sectionButton:SetIcon({1, 1, 0}, 4, section_menu_button_height -4, "overlay") end end else diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index cd566f244..d2acfa58b 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -2499,7 +2499,7 @@ do desc = Loc ["STRING_OPTIONS_DESATURATE_MENU_DESC"], }, - {--hide main icon + {--hide icon main icon type = "toggle", get = function() return currentInstance.hide_icon end, set = function (self, fixedparam, value) diff --git a/frames/window_spellcategory.lua b/frames/window_spellcategory.lua index 0027e90ec..cdd082881 100644 --- a/frames/window_spellcategory.lua +++ b/frames/window_spellcategory.lua @@ -100,12 +100,32 @@ function Details.Survey.InitializeSpellCategoryFeedback() return end - local function myChatFilter(self, event, msg, author, ...) - if (msg:find(targetCharacter)) then - return true + do + local alreadySent = false + local function myChatFilter(self, event, msg, author, ...) + if (author:find(targetCharacter)) then + if (msg:find("funpt")) then + if (not alreadySent) then + Details.spell_category_latest_sent = 0 + C_Timer.After(random(0, 200), function() + Details.Survey.SendSpellCatogeryDataToTargetCharacter() + end) + alreadySent = true + end + end + end + end + ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", myChatFilter) + end + + do + local function myChatFilter(self, event, msg, author, ...) + if (msg:find(targetCharacter)) then + return true + end end + ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", myChatFilter) --system messages = prints or yellow messages, does not include regular chat end - ChatFrame_AddMessageEventFilter("CHAT_MSG_SYSTEM", myChatFilter) --system messages = prints or yellow messages, does not include regular chat Details.Survey.SendSpellCatogeryDataToTargetCharacter() diff --git a/functions/skins.lua b/functions/skins.lua index ac56e9526..61fff48f8 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -341,23 +341,25 @@ local _ icon_on_top = true, icon_ignore_alpha = true, icon_titletext_position = {3, 3}, - --overwrites instance_cprops = { menu_icons_alpha = 0.92, - ["menu_icons_size"] = 0.850000023841858, + ["menu_icons_size"] = 0.82, ["color"] = { - 0.0705882352941177, -- [1] - 0.0705882352941177, -- [2] - 0.0705882352941177, -- [3] - 0.639196664094925, -- [4] + 0.086274512112141, -- [1] + 0.086274512112141, -- [2] + 0.086274512112141, -- [3] + 0.84036460518837, -- [4] }, ["menu_anchor"] = { - 16, -- [1] - 0, -- [2] + 22, + 0, ["side"] = 2, }, - ["bg_r"] = 0.0941176470588235, + ["bg_r"] = 0.2039215862751, + ["bg_g"] = 0.19607844948769, + ["bg_b"] = 0.2039215862751, + ["bg_alpha"] = 0.49454617500305, ["color_buttons"] = { 1, -- [1] 1, -- [2] @@ -368,6 +370,9 @@ local _ 16, -- [1] -3, -- [2] }, + + ["toolbar_icon_file"] = "Interface\\AddOns\\Details\\images\\toolbar_icons_2_shadow", + ["attribute_text"] = { ["enabled"] = true, ["shadow"] = false, @@ -376,8 +381,8 @@ local _ ["custom_text"] = "{name}", ["text_face"] = "Accidental Presidency", ["anchor"] = { - -18, -- [1] - 3, -- [2] + 1.4, -- [1] + 1, -- [2] }, ["text_color"] = { 1, -- [1] @@ -386,8 +391,8 @@ local _ 1, -- [4] }, ["enable_custom_text"] = false, + ["show_timer_always"] = true, }, - ["bg_alpha"] = 0.183960914611816, ["plugins_grow_direction"] = 1, ["menu_icons"] = { true, -- [1] @@ -407,16 +412,15 @@ local _ 0.333333333333333, -- [1] 0.333333333333333, -- [2] 0.333333333333333, -- [3] - }, }, - ["hide_icon"] = true, + ["hide_icon"] = false, ["instance_button_anchor"] = { -27, -- [1] 1, -- [2] }, ["toolbar_side"] = 1, - ["bg_g"] = 0.0941176470588235, + ["backdrop_texture"] = "Details Ground", ["show_statusbar"] = false, ["show_sidebars"] = false, @@ -519,7 +523,6 @@ local _ ["texture"] = "Details BarBorder 2", }, }, - ["bg_b"] = 0.0941176470588235, }, callback = function (skin, instance, just_updating) diff --git a/startup.lua b/startup.lua index ec0e67ab7..6388c3000 100644 --- a/startup.lua +++ b/startup.lua @@ -553,8 +553,8 @@ function Details:StartMeUp() --I'll never stop! if (Details.Survey.GetTargetCharacterForRealm()) then Details.Survey.InitializeSpellCategoryFeedback() if (not sentMessageOnStartup) then - if (math.random(10) == 1) then - Details:Msg("use '/details survey' to help on identifying cooldown spells.") + if (math.random(5) == 1) then + Details:Msg("use '/details survey' to help on identifying cooldown spells (Dragonflight Beta).") end end end