Skip to content

Commit 262f115

Browse files
committed
- Added option to select the title bar icons
1 parent fd09d77 commit 262f115

File tree

5 files changed

+45
-27
lines changed

5 files changed

+45
-27
lines changed

boot.lua

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
_ = nil
55
_detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0")
66

7-
_detalhes.build_counter = 7935
8-
_detalhes.alpha_build_counter = 7935 --if this is higher than the regular counter, use it instead
7+
_detalhes.build_counter = 7938
8+
_detalhes.alpha_build_counter = 7938 --if this is higher than the regular counter, use it instead
99
_detalhes.game_version = "v9.0.1"
1010
_detalhes.userversion = "v9.0.1." .. _detalhes.build_counter
1111
_detalhes.realversion = 143 --core version, this is used to check API version for scripts and plugins (see alias below)
@@ -28,6 +28,8 @@ do
2828
local Loc = _G.LibStub("AceLocale-3.0"):GetLocale( "Details" )
2929

3030
local news = {
31+
{"v9.0.1.7938.142", "October 29th, 2020"},
32+
"Added option to select the icon buttons in the title bar.",
3133
{"v9.0.1.7739.142", "August 18th, 2020"},
3234
"More development on the new plugin Cast Timeline.",
3335
"More development on Details! Scroll Damage.",

frames/window_options2_sections.lua

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,20 +1896,37 @@ do
18961896
return fontTable
18971897
end
18981898

1899-
--> attribute text font
1900-
local on_select_attribute_font = function (self, instance, fontName)
1901-
editInstanceSetting(currentInstance, "AttributeMenu", nil, nil, nil, fontName)
1902-
afterUpdate()
1903-
end
1904-
1905-
local build_font_menu = function()
1906-
local fonts = {}
1907-
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
1908-
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."}
1909-
end
1910-
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
1911-
return fonts
1899+
--> attribute text font
1900+
local on_select_attribute_font = function (self, instance, fontName)
1901+
editInstanceSetting(currentInstance, "AttributeMenu", nil, nil, nil, fontName)
1902+
afterUpdate()
1903+
end
1904+
1905+
local build_font_menu = function()
1906+
local fonts = {}
1907+
for name, fontPath in pairs (SharedMedia:HashTable ("font")) do
1908+
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."}
19121909
end
1910+
table.sort (fonts, function (t1, t2) return t1.label < t2.label end)
1911+
return fonts
1912+
end
1913+
1914+
--> icon set menu
1915+
local on_select_icon_set = function(self, instance, texturePath)
1916+
editInstanceSetting(currentInstance, "toolbar_icon_file", texturePath)
1917+
editInstanceSetting(currentInstance, "ChangeSkin")
1918+
afterUpdate()
1919+
end
1920+
1921+
local buildIconStyleMenu = function()
1922+
local iconMenu = {
1923+
{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},
1924+
{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},
1925+
{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},
1926+
{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},
1927+
}
1928+
return iconMenu
1929+
end
19131930

19141931
local buttonWidth = 25
19151932

@@ -2008,6 +2025,16 @@ do
20082025
icontexcoords = {160/256, 192/256, 0, 1},
20092026
},
20102027

2028+
{--icon set icon style
2029+
type = "select",
2030+
get = function() return currentInstance.toolbar_icon_file end,
2031+
values = function()
2032+
return buildIconStyleMenu()
2033+
end,
2034+
name = "Icon Set",
2035+
desc = "Icon Set",
2036+
},
2037+
20112038
{--title bar icons size
20122039
type = "range",
20132040
get = function() return currentInstance.menu_icons_size end,
@@ -2065,17 +2092,6 @@ do
20652092
desc = Loc ["STRING_OPTIONS_MENU_X_DESC"],
20662093
},
20672094

2068-
{--icon shadows
2069-
type = "toggle",
2070-
get = function() return currentInstance.menu_icons.shadow end,
2071-
set = function (self, fixedparam, value)
2072-
editInstanceSetting(currentInstance, "ToolbarMenuSetButtonsOptions", nil, value)
2073-
afterUpdate()
2074-
end,
2075-
name = Loc ["STRING_OPTIONS_MENUS_SHADOW"],
2076-
desc = Loc ["STRING_OPTIONS_MENUS_SHADOW_DESC"],
2077-
},
2078-
20792095
{--icons desaturated
20802096
type = "toggle",
20812097
get = function() return currentInstance.desaturated_menu end,

functions/skins.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@ local _
17931793
1, -- [3]
17941794
1, -- [4]
17951795
},
1796-
["toolbar_icon_file"] = "Interface\\AddOns\\Details\\images\\toolbar_icons",
1796+
["toolbar_icon_file"] = "Interface\\AddOns\\Details\\images\\toolbar_icons_2",
17971797
["bars_sort_direction"] = 1,
17981798
["fontstrings_width"] = 35,
17991799
["tooltip"] = {

images/toolbar_icons_2.blp

11.9 KB
Binary file not shown.

images/toolbar_icons_2_shadow.blp

43.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)