Some reorganization tests on Display section of the options panel

This commit is contained in:
Tercio Jose
2022-08-19 12:59:51 -03:00
parent 8c44f57d57
commit 64e0f15bbf
6 changed files with 167 additions and 103 deletions
+60 -16
View File
@@ -1,6 +1,6 @@
local dversion = 329
local dversion = 330
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -1671,6 +1671,7 @@ end
colorpick.color_callback = widget_table.set --callback
colorpick:SetTemplate(button_template)
colorpick:SetSize(18, 18)
colorpick.tooltip = widget_table.desc
colorpick._get = widget_table.get
@@ -1694,17 +1695,24 @@ end
end
end
colorpick.hasLabel.text = widget_table.name .. (use_two_points and ": " or "")
colorpick.hasLabel:SetTemplate(widget_table.text_template or text_template)
colorpick:SetPoint ("left", colorpick.hasLabel, "right", 2)
colorpick.hasLabel:SetPoint (cur_x, cur_y)
local label = colorpick.hasLabel
label.text = widget_table.name .. (use_two_points and ": " or "")
label:SetTemplate(widget_table.text_template or text_template)
if (widget_table.boxfirst) then
label:SetPoint("left", colorpick, "right", 2)
colorpick:SetPoint(cur_x, cur_y)
extraPaddingY = 1
else
colorpick:SetPoint("left", label, "right", 2)
label:SetPoint(cur_x, cur_y)
end
if (widget_table.id) then
parent.widgetids [widget_table.id] = colorpick
end
local size = colorpick.hasLabel:GetStringWidth() + 32
local size = label:GetStringWidth() + 32
if (size > max_x) then
max_x = size
end
@@ -1851,6 +1859,21 @@ end
height = abs ((height or parent:GetHeight()) - abs (y_offset) + 20)
height = height*-1
--normalize format types
for index, widgetTable in ipairs(menu) do
if (widgetTable.type == "space") then
widgetTable.type = "blank"
elseif (widgetTable.type == "dropdown") then
widgetTable.type = "select"
elseif (widgetTable.type == "switch") then
widgetTable.type = "toggle"
elseif (widgetTable.type == "slider") then
widgetTable.type = "range"
elseif (widgetTable.type == "button") then
widgetTable.type = "execute"
end
end
for index, widget_table in ipairs (menu) do
if (not widget_table.hidden) then
@@ -1862,7 +1885,9 @@ end
end
end
if (widget_table.type == "blank" or widget_table.type == "space") then
local extraPaddingY = 0
if (widget_table.type == "blank") then
-- do nothing
elseif (widget_table.type == "label" or widget_table.type == "text") then
@@ -1881,7 +1906,7 @@ end
parent.widgetids [widget_table.id] = label
end
elseif (widget_table.type == "select" or widget_table.type == "dropdown") then
elseif (widget_table.type == "select") then
local dropdown = DF:NewDropDown (parent, nil, "$parentWidget" .. index, nil, 140, 18, widget_table.values, widget_table.get(), dropdown_template)
dropdown.tooltip = widget_table.desc
dropdown._get = widget_table.get
@@ -1920,7 +1945,7 @@ end
widget_created = dropdown
line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "toggle" or widget_table.type == "switch") then
elseif (widget_table.type == "toggle") then
local switch = DF:NewSwitch (parent, nil, "$parentWidget" .. index, nil, 60, 20, nil, nil, widget_table.get(), nil, nil, nil, nil, switch_template)
switch.tooltip = widget_table.desc
switch._get = widget_table.get
@@ -1953,6 +1978,13 @@ end
if (widget_table.boxfirst) then
switch:SetPoint (cur_x, cur_y)
label:SetPoint ("left", switch, "right", 2)
local nextWidgetTable = menu[index+1]
if (nextWidgetTable) then
if (nextWidgetTable.type ~= "blank" and nextWidgetTable.type ~= "breakline" and nextWidgetTable.type ~= "toggle" and nextWidgetTable.type ~= "color") then
extraPaddingY = 3
end
end
else
label:SetPoint (cur_x, cur_y)
switch:SetPoint ("left", label, "right", 2)
@@ -1975,7 +2007,7 @@ end
widget_created = switch
line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "range" or widget_table.type == "slider") then
elseif (widget_table.type == "range") then
local is_decimanls = widget_table.usedecimals
local slider = DF:NewSlider (parent, nil, "$parentWidget" .. index, nil, 140, 20, widget_table.min, widget_table.max, widget_table.step, widget_table.get(), is_decimanls, nil, nil, slider_template)
slider.tooltip = widget_table.desc
@@ -2021,11 +2053,12 @@ end
widget_created = slider
line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "color" or widget_table.type == "color") then
elseif (widget_table.type == "color") then
local colorpick = DF:NewColorPickButton (parent, "$parentWidget" .. index, nil, widget_table.set, nil, button_template)
colorpick.tooltip = widget_table.desc
colorpick._get = widget_table.get
colorpick.widget_type = "color"
colorpick:SetSize(18, 18)
local default_value, g, b, a = widget_table.get()
if (type (default_value) == "table") then
@@ -2046,8 +2079,15 @@ end
end
local label = DF:NewLabel (parent, nil, "$parentLabel" .. index, nil, widget_table.name .. (use_two_points and ": " or ""), "GameFontNormal", widget_table.text_template or text_template or 12)
colorpick:SetPoint ("left", label, "right", 2)
label:SetPoint (cur_x, cur_y)
if (widget_table.boxfirst) then
label:SetPoint("left", colorpick, "right", 2)
colorpick:SetPoint(cur_x, cur_y)
extraPaddingY = 1
else
colorpick:SetPoint("left", label, "right", 2)
label:SetPoint(cur_x, cur_y)
end
colorpick.hasLabel = label
if (widget_table.id) then
@@ -2066,7 +2106,7 @@ end
widget_created = colorpick
line_widgets_created = line_widgets_created + 1
elseif (widget_table.type == "execute" or widget_table.type == "button") then
elseif (widget_table.type == "execute") then
local button = DF:NewButton (parent, nil, "$parentWidget" .. index, nil, 120, 18, widget_table.func, widget_table.param1, widget_table.param2, nil, widget_table.name, nil, button_template, text_template)
if (not button_template) then
@@ -2178,6 +2218,10 @@ end
end
end
if (extraPaddingY > 0) then
cur_y = cur_y - extraPaddingY
end
if (widget_table.type == "breakline" or cur_y < height) then
cur_y = y_offset
cur_x = cur_x + max_x + 20
+4 -4
View File
@@ -494,7 +494,7 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_CASTER"], width = 100, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_EVENT"], width = 140, type = "entry", func = no_func},
{name = "Ignore", width = 50, type = "checkbox", func = spell_ignore_spell_func, icon = [[Interface\Glues\LOGIN\Glues-CheckBox-Check]], notext = true, iconalign = "center"},
{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
----{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
@@ -639,7 +639,7 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_CASTER"], width = 80, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_EVENT"], width = 150, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_ENCOUNTERNAME"], width = 95, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_encounter_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
--{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 86, type = "button", func = spell_encounter_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
@@ -858,7 +858,7 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_TIMER"], width = 40, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_ENCOUNTERID"], width = 80, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_ENCOUNTERNAME"], width = 110, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 80, type = "button", func = dbm_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
--{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 80, type = "button", func = dbm_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
@@ -990,7 +990,7 @@ function Details:OpenForge()
{name = L["STRING_FORGE_HEADER_TIMER"], width = 40, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_ENCOUNTERID"], width = 80, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_ENCOUNTERNAME"], width = 120, type = "entry", func = no_func},
{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 120, type = "button", func = bw_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
--{name = L["STRING_FORGE_HEADER_CREATEAURA"], width = 120, type = "button", func = bw_open_aura_creator, icon = [[Interface\AddOns\WeakAuras\Media\Textures\icon]], notext = true, iconalign = "center"},
},
fill_panel = false,
fill_gettotal = function (self) return #self.module.data end,
+1
View File
@@ -126,6 +126,7 @@ function Details.options.InitializeOptionsWindow(instance)
local instanceSelection = DF:NewDropDown (f, _, "$parentInstanceSelectDropdown", "instanceDropdown", 200, 18, buildInstanceMenu) --, nil, options_dropdown_template
instanceSelection:SetPoint("bottomright", f, "bottomright", -7, 09)
instanceSelection:SetTemplate(options_dropdown_template)
instanceSelection:SetHook("OnEnter", function()
GameCooltip:Reset()
GameCooltip:Preset (2)
+81 -60
View File
@@ -248,6 +248,18 @@ do
end,
name = Loc ["STRING_OPTIONS_LOCKSEGMENTS"],
desc = Loc ["STRING_OPTIONS_LOCKSEGMENTS_DESC"],
boxfirst = true,
},
{--animate bars
type = "toggle",
get = function() return _detalhes.use_row_animations end,
set = function (self, fixedparam, value)
_detalhes:SetUseAnimations(value)
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_ANIMATEBARS"],
desc = Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"],
boxfirst = true,
},
{--scroll speed
type = "range",
@@ -291,16 +303,6 @@ do
name = Loc ["STRING_NUMERALSYSTEM"],
desc = Loc ["STRING_NUMERALSYSTEM_DESC"],
},
{--animate bars
type = "toggle",
get = function() return _detalhes.use_row_animations end,
set = function (self, fixedparam, value)
_detalhes:SetUseAnimations(value)
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_ANIMATEBARS"],
desc = Loc ["STRING_OPTIONS_ANIMATEBARS_DESC"],
},
{--update speed
type = "range",
get = function() return _detalhes.update_speed end,
@@ -346,6 +348,7 @@ do
end,
name = Loc ["STRING_OPTIONS_CLEANUP"],
desc = Loc ["STRING_OPTIONS_CLEANUP_DESC"],
boxfirst = true,
},
{--auto erase world segments
type = "toggle",
@@ -356,6 +359,7 @@ do
end,
name = Loc ["STRING_OPTIONS_PERFORMANCE_ERASEWORLD"],
desc = Loc ["STRING_OPTIONS_PERFORMANCE_ERASEWORLD_DESC"],
boxfirst = true,
},
{--erase chart data
type = "toggle",
@@ -366,6 +370,28 @@ do
end,
name = Loc ["STRING_OPTIONS_ERASECHARTDATA"],
desc = Loc ["STRING_OPTIONS_ERASECHARTDATA_DESC"],
boxfirst = true,
},
{--battleground remote parser
type = "toggle",
get = function() return _detalhes.use_battleground_server_parser end,
set = function (self, fixedparam, value)
_detalhes.use_battleground_server_parser = value
end,
name = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT"],
desc = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT_DESC"],
boxfirst = true,
},
{--battleground show enemies
type = "toggle",
get = function() return _detalhes.pvp_as_group end,
set = function (self, fixedparam, value)
_detalhes.pvp_as_group = value
end,
name = Loc ["STRING_OPTIONS_BG_ALL_ALLY"],
desc = Loc ["STRING_OPTIONS_BG_ALL_ALLY_DESC"],
boxfirst = true,
},
{--max segments
@@ -396,25 +422,6 @@ do
desc = Loc ["STRING_OPTIONS_SEGMENTSSAVE_DESC"],
},
{--battleground remote parser
type = "toggle",
get = function() return _detalhes.use_battleground_server_parser end,
set = function (self, fixedparam, value)
_detalhes.use_battleground_server_parser = value
end,
name = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT"],
desc = Loc ["STRING_OPTIONS_BG_UNIQUE_SEGMENT_DESC"],
},
{--battleground show enemies
type = "toggle",
get = function() return _detalhes.pvp_as_group end,
set = function (self, fixedparam, value)
_detalhes.pvp_as_group = value
end,
name = Loc ["STRING_OPTIONS_BG_ALL_ALLY"],
desc = Loc ["STRING_OPTIONS_BG_ALL_ALLY_DESC"],
},
{type = "blank"},
{--pvp frags
@@ -426,6 +433,19 @@ do
end,
name = Loc ["STRING_OPTIONS_PVPFRAGS"],
desc = Loc ["STRING_OPTIONS_PVPFRAGS_DESC"],
boxfirst = true,
},
{--damage taken everything
type = "toggle",
get = function() return _detalhes.damage_taken_everything end,
set = function (self, fixedparam, value)
_detalhes.damage_taken_everything = value
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"],
desc = Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"],
boxfirst = true,
},
{--death log size
@@ -451,17 +471,6 @@ do
desc = Loc ["STRING_OPTIONS_DEATHLOG_MINHEALING_DESC"],
},
{--pvp frags
type = "toggle",
get = function() return _detalhes.damage_taken_everything end,
set = function (self, fixedparam, value)
_detalhes.damage_taken_everything = value
afterUpdate()
end,
name = Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING"],
desc = Loc ["STRING_OPTIONS_DTAKEN_EVERYTHING_DESC"],
},
{type = "breakline"},
{type = "label", get = function() return Loc ["STRING_OPTIONS_OVERALL_ANCHOR"] end, text_template = subSectionTitleTextTemplate},
@@ -474,6 +483,7 @@ do
end,
name = Loc ["STRING_OPTIONS_OVERALL_NEWBOSS"],
desc = Loc ["STRING_OPTIONS_OVERALL_NEWBOSS_DESC"],
boxfirst = true,
},
{--erase overall data on mythic plus
type = "toggle",
@@ -484,6 +494,7 @@ do
end,
name = Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS"],
desc = Loc ["STRING_OPTIONS_OVERALL_MYTHICPLUS_DESC"],
boxfirst = true,
},
{--erase overall data on logout
type = "toggle",
@@ -494,6 +505,7 @@ do
end,
name = "Clear On Start PVP", --localize-me
desc = "When enabled, overall data is automatically wiped when a new arena or battleground starts.", --localize-me
boxfirst = true,
},
{--erase overall data on logout
type = "toggle",
@@ -504,6 +516,7 @@ do
end,
name = Loc ["STRING_OPTIONS_OVERALL_LOGOFF"],
desc = Loc ["STRING_OPTIONS_OVERALL_LOGOFF_DESC"],
boxfirst = true,
},
{type = "blank"},
@@ -582,6 +595,7 @@ do
end,
name = "Click Through",
desc = "Click Through",
boxfirst = true,
},
{--click only in combat
type = "toggle",
@@ -592,6 +606,7 @@ do
end,
name = "Click Through Only in Combat",
desc = "Click Through Only in Combat",
boxfirst = true,
},
{type = "blank"},
@@ -606,6 +621,7 @@ do
end,
name = "Show pets when solo", --localize-me
desc = "Show pets when solo",
boxfirst = true,
},
{--always show players even on stardard mode
@@ -617,6 +633,7 @@ do
end,
name = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS"],
desc = Loc ["STRING_OPTIONS_ALWAYSSHOWPLAYERS_DESC"],
boxfirst = true,
},
@@ -656,6 +673,7 @@ do
end,
name = Loc ["STRING_OPTIONS_IGNORENICKNAME"],
desc = Loc ["STRING_OPTIONS_IGNORENICKNAME_DESC"],
boxfirst = true,
},
{--remove realm name
@@ -667,6 +685,7 @@ do
end,
name = Loc ["STRING_OPTIONS_REALMNAME"],
desc = Loc ["STRING_OPTIONS_REALMNAME_DESC"],
boxfirst = true,
},
{type = "blank"},
@@ -681,6 +700,7 @@ do
end,
name = "Use Different Color for You",
desc = "Use a different color on your own bar",
boxfirst = true,
},
{--player bar color
@@ -697,12 +717,13 @@ do
end,
name = "Your Bar Color",
desc = "Your Bar Color",
boxfirst = true,
},
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection) --optionsSection is declared on boot.lua
@@ -1056,7 +1077,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -1770,7 +1791,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize+20, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -2130,7 +2151,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
local separatorOption = sectionFrame.widget_list[23]
local bracketOption = sectionFrame.widget_list[24]
@@ -2682,7 +2703,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -3065,7 +3086,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -3179,7 +3200,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
do --> micro displays
@@ -3812,7 +3833,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -4052,7 +4073,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -4428,7 +4449,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
refreshToggleAnchor()
end
@@ -4576,7 +4597,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -4995,7 +5016,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
sectionFrame:SetScript("OnShow", function()
sectionFrame:UpdateWallpaperInfo()
@@ -5326,7 +5347,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(autoSwitchFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(autoSwitchFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
--> combat alpha modifier
@@ -5908,7 +5929,7 @@ do --raid tools
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6187,7 +6208,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX + 350, startY - 20, heightSize + 300, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX + 350, startY - 20, heightSize + 300, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6348,7 +6369,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6768,7 +6789,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6854,7 +6875,7 @@ do
}
sectionFrame.sectionOptions = sectionOptions
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6868,7 +6889,7 @@ do
}
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
@@ -6883,7 +6904,7 @@ do
}
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
DF:BuildMenu(sectionFrame, sectionOptions, startX, startY-20, heightSize, false, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
end
tinsert(Details.optionsSection, buildSection)
+20 -22
View File
@@ -2719,10 +2719,10 @@ function gump:CriaJanelaInfo()
--icon - name - applications - refreshes - uptime
--
local wa_button = function (self, mouseButton, spellID, auraType)
local spellName, _, spellIcon = GetSpellInfo (spellID)
_detalhes:OpenAuraPanel (spellID, spellName, spellIcon, nil, auraType == "BUFF" and 4 or 2, 1)
end
--local wa_button = function (self, mouseButton, spellID, auraType)
-- local spellName, _, spellIcon = GetSpellInfo (spellID)
-- _detalhes:OpenAuraPanel (spellID, spellName, spellIcon, nil, auraType == "BUFF" and 4 or 2, 1)
--end
local scroll_createline = function (self, index)
local line = CreateFrame ("button", "$parentLine" .. index, self,"BackdropTemplate")
@@ -2742,8 +2742,8 @@ function gump:CriaJanelaInfo()
local apply = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local refresh = line:CreateFontString ("$parentName", "overlay", "GameFontNormal")
local waButton = DF:CreateButton (line, wa_button, 18, 18)
waButton:SetIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]])
--local waButton = DF:CreateButton (line, wa_button, 18, 18)
--waButton:SetIcon ([[Interface\AddOns\WeakAuras\Media\Textures\icon]])
DF:SetFontSize (name, text_size)
DF:SetFontSize (uptime, text_size)
@@ -2755,14 +2755,14 @@ function gump:CriaJanelaInfo()
uptime:SetPoint ("left", line, "left", 186, 0)
apply:SetPoint ("left", line, "left", 276, 0)
refresh:SetPoint ("left", line, "left", 322, 0)
waButton:SetPoint ("left", line, "left", 372, 0)
--waButton:SetPoint ("left", line, "left", 372, 0)
line.Icon = icon
line.Name = name
line.Uptime = uptime
line.Apply = apply
line.Refresh = refresh
line.WaButton = waButton
--line.WaButton = waButton
name:SetJustifyH ("left")
uptime:SetJustifyH ("left")
@@ -2779,7 +2779,7 @@ function gump:CriaJanelaInfo()
local scroll_buff_refresh = function (self, data, offset, total_lines)
local haveWA = _G.WeakAuras
local haveWA = false --_G.WeakAuras
for i = 1, total_lines do
local index = i + offset
@@ -2797,11 +2797,11 @@ function gump:CriaJanelaInfo()
line.Apply:SetText (aura [4])
line.Refresh:SetText (aura [5])
if (haveWA) then
line.WaButton:SetClickFunction (wa_button, aura.spellID, line.AuraType)
else
line.WaButton:Disable()
end
--if (haveWA) then
-- line.WaButton:SetClickFunction (wa_button, aura.spellID, line.AuraType)
--else
-- line.WaButton:Disable()
--end
if (i%2 == 0) then
line:SetBackdropColor (unpack (line_bg_color [1]))
@@ -2844,9 +2844,9 @@ function gump:CriaJanelaInfo()
refreshedLabel:SetPoint (headerOffsetsBuffs[4], -10)
create_titledesc_frame (refreshedLabel.widget, "refreshes")
local waLabel = DF:CreateLabel (frame, "WA")
waLabel:SetPoint (headerOffsetsBuffs[5], -10)
create_titledesc_frame (waLabel.widget, "create weak aura")
--local waLabel = DF:CreateLabel (frame, "WA")
--waLabel:SetPoint (headerOffsetsBuffs[5], -10)
--create_titledesc_frame (waLabel.widget, "create weak aura")
local buffScroll = DF:CreateScrollBox (frame, "$parentBuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, scrollHeight, scroll_line_amount, scroll_line_height)
buffScroll:SetPoint ("topleft", frame, "topleft", 5, -30)
@@ -2874,12 +2874,10 @@ function gump:CriaJanelaInfo()
refreshedLabel2:SetPoint (headerOffsetsDebuffs[4], -10)
create_titledesc_frame (refreshedLabel2.widget, "refreshes")
local waLabel2 = DF:CreateLabel (frame, "WA")
waLabel2:SetPoint (headerOffsetsDebuffs[5], -10)
create_titledesc_frame (waLabel2.widget, "create weak aura")
--local waLabel2 = DF:CreateLabel (frame, "WA")
--waLabel2:SetPoint (headerOffsetsDebuffs[5], -10)
--create_titledesc_frame (waLabel2.widget, "create weak aura")
local debuffScroll = DF:CreateScrollBox (frame, "$parentDebuffUptimeScroll", scroll_buff_refresh, {}, scroll_width, scrollHeight, scroll_line_amount, scroll_line_height)
debuffScroll:SetPoint ("topleft", frame, "topleft", debuffScrollStartX, -30)
for i = 1, scroll_line_amount do
+1 -1
View File
@@ -1935,7 +1935,7 @@ end
-- icon Interface\Icons\warlock_summon_doomguard
-- text_size 72
function _detalhes:InitializeAuraCreationWindow()
function _detalhes:InitializeAuraCreationWindow() if true then return end
local DetailsAuraPanel = CreateFrame ("frame", "DetailsAuraPanel", UIParent,"BackdropTemplate")
DetailsAuraPanel.Frame = DetailsAuraPanel
DetailsAuraPanel.__name = L["STRING_CREATEAURA"]