General fixes, framework update
This commit is contained in:
+58
-59
@@ -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("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("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)
|
||||
|
||||
|
||||
+47
-27
@@ -61,14 +61,29 @@ function Details.options.InitializeOptionsWindow(instance)
|
||||
|
||||
f:Hide()
|
||||
|
||||
--select the instance to edit
|
||||
local onSelectInstance = function (_, _, instanceId)
|
||||
local instance = _detalhes.tabela_instancias[instanceId]
|
||||
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 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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user