diff --git a/boot.lua b/boot.lua index beee6c177..beaa89fc4 100644 --- a/boot.lua +++ b/boot.lua @@ -4,8 +4,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 7935 - _detalhes.alpha_build_counter = 7935 --if this is higher than the regular counter, use it instead + _detalhes.build_counter = 7938 + _detalhes.alpha_build_counter = 7938 --if this is higher than the regular counter, use it instead _detalhes.game_version = "v9.0.1" _detalhes.userversion = "v9.0.1." .. _detalhes.build_counter _detalhes.realversion = 143 --core version, this is used to check API version for scripts and plugins (see alias below) @@ -28,6 +28,8 @@ do local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" ) local news = { + {"v9.0.1.7938.142", "October 29th, 2020"}, + "Added option to select the icon buttons in the title bar.", {"v9.0.1.7739.142", "August 18th, 2020"}, "More development on the new plugin Cast Timeline.", "More development on Details! Scroll Damage.", diff --git a/frames/window_options2_sections.lua b/frames/window_options2_sections.lua index c67b66c0a..c59d2b768 100644 --- a/frames/window_options2_sections.lua +++ b/frames/window_options2_sections.lua @@ -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, diff --git a/functions/skins.lua b/functions/skins.lua index 3b2e6317c..f88ce94df 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -1793,7 +1793,7 @@ local _ 1, -- [3] 1, -- [4] }, - ["toolbar_icon_file"] = "Interface\\AddOns\\Details\\images\\toolbar_icons", + ["toolbar_icon_file"] = "Interface\\AddOns\\Details\\images\\toolbar_icons_2", ["bars_sort_direction"] = 1, ["fontstrings_width"] = 35, ["tooltip"] = { diff --git a/images/toolbar_icons_2.blp b/images/toolbar_icons_2.blp new file mode 100644 index 000000000..9516e57e6 Binary files /dev/null and b/images/toolbar_icons_2.blp differ diff --git a/images/toolbar_icons_2_shadow.blp b/images/toolbar_icons_2_shadow.blp new file mode 100644 index 000000000..1d0978597 Binary files /dev/null and b/images/toolbar_icons_2_shadow.blp differ