- Added option to select the title bar icons
This commit is contained in:
@@ -1896,20 +1896,37 @@ do
|
||||
return fontTable
|
||||
end
|
||||
|
||||
--> attribute text font
|
||||
local on_select_attribute_font = function (self, instance, fontName)
|
||||
editInstanceSetting(currentInstance, "AttributeMenu", nil, nil, nil, fontName)
|
||||
afterUpdate()
|
||||
end
|
||||
|
||||
local build_font_menu = function()
|
||||
local fonts = {}
|
||||
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
|
||||
fonts [#fonts+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = on_select_attribute_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
end
|
||||
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
|
||||
return fonts
|
||||
--> attribute text font
|
||||
local on_select_attribute_font = function (self, instance, fontName)
|
||||
editInstanceSetting(currentInstance, "AttributeMenu", nil, nil, nil, fontName)
|
||||
afterUpdate()
|
||||
end
|
||||
|
||||
local build_font_menu = function()
|
||||
local fonts = {}
|
||||
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
|
||||
fonts [#fonts+1] = {value = name, label = name, icon = font_select_icon, texcoord = font_select_texcoord, onclick = on_select_attribute_font, font = fontPath, descfont = name, desc = "Our thoughts strayed constantly\nAnd without boundary\nThe ringing of the division bell had began."}
|
||||
end
|
||||
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
|
||||
return fonts
|
||||
end
|
||||
|
||||
--> icon set menu
|
||||
local on_select_icon_set = function(self, instance, texturePath)
|
||||
editInstanceSetting(currentInstance, "toolbar_icon_file", texturePath)
|
||||
editInstanceSetting(currentInstance, "ChangeSkin")
|
||||
afterUpdate()
|
||||
end
|
||||
|
||||
local buildIconStyleMenu = function()
|
||||
local iconMenu = {
|
||||
{value = "Interface\\AddOns\\Details\\images\\toolbar_icons", label = "Set 1", icon = "Interface\\AddOns\\Details\\images\\toolbar_icons", texcoord = {0, 0.125, 0, 1}, onclick = on_select_icon_set},
|
||||
{value = "Interface\\AddOns\\Details\\images\\toolbar_icons_shadow", label = "Set 2", icon = "Interface\\AddOns\\Details\\images\\toolbar_icons_shadow", texcoord = {0, 0.125, 0, 1}, onclick = on_select_icon_set},
|
||||
{value = "Interface\\AddOns\\Details\\images\\toolbar_icons_2", label = "Set 3", icon = "Interface\\AddOns\\Details\\images\\toolbar_icons_2", texcoord = {0, 0.125, 0, 1}, onclick = on_select_icon_set},
|
||||
{value = "Interface\\AddOns\\Details\\images\\toolbar_icons_2_shadow", label = "Set 4", icon = "Interface\\AddOns\\Details\\images\\toolbar_icons_2_shadow", texcoord = {0, 0.125, 0, 1}, onclick = on_select_icon_set},
|
||||
}
|
||||
return iconMenu
|
||||
end
|
||||
|
||||
local buttonWidth = 25
|
||||
|
||||
@@ -2008,6 +2025,16 @@ do
|
||||
icontexcoords = {160/256, 192/256, 0, 1},
|
||||
},
|
||||
|
||||
{--icon set icon style
|
||||
type = "select",
|
||||
get = function() return currentInstance.toolbar_icon_file end,
|
||||
values = function()
|
||||
return buildIconStyleMenu()
|
||||
end,
|
||||
name = "Icon Set",
|
||||
desc = "Icon Set",
|
||||
},
|
||||
|
||||
{--title bar icons size
|
||||
type = "range",
|
||||
get = function() return currentInstance.menu_icons_size end,
|
||||
@@ -2065,17 +2092,6 @@ do
|
||||
desc = Loc ["STRING_OPTIONS_MENU_X_DESC"],
|
||||
},
|
||||
|
||||
{--icon shadows
|
||||
type = "toggle",
|
||||
get = function() return currentInstance.menu_icons.shadow end,
|
||||
set = function (self, fixedparam, value)
|
||||
editInstanceSetting(currentInstance, "ToolbarMenuSetButtonsOptions", nil, value)
|
||||
afterUpdate()
|
||||
end,
|
||||
name = Loc ["STRING_OPTIONS_MENUS_SHADOW"],
|
||||
desc = Loc ["STRING_OPTIONS_MENUS_SHADOW_DESC"],
|
||||
},
|
||||
|
||||
{--icons desaturated
|
||||
type = "toggle",
|
||||
get = function() return currentInstance.desaturated_menu end,
|
||||
|
||||
Reference in New Issue
Block a user