From 472a771863622a7da8a3d6115a06f3351155d073 Mon Sep 17 00:00:00 2001 From: AardCrowley Date: Wed, 24 Jan 2024 19:45:31 -0800 Subject: [PATCH] Update Aardwolf_Clock.xml --- Aardwolf_Clock V2/Aardwolf_Clock.xml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Aardwolf_Clock V2/Aardwolf_Clock.xml b/Aardwolf_Clock V2/Aardwolf_Clock.xml index 57e48a9..a036db5 100644 --- a/Aardwolf_Clock V2/Aardwolf_Clock.xml +++ b/Aardwolf_Clock V2/Aardwolf_Clock.xml @@ -6,7 +6,7 @@ - + @@ -102,8 +102,8 @@ font = "f" checked_time = false footer_text = {} -font_name = GetAlphaOption("output_font_name") -font_size = GetOption("output_font_height") +font_name = GetVariable("font_name") or GetAlphaOption("output_font_name") +font_size = tonumber(GetVariable("font_size")) or GetOption("output_font_height") if not GetVariable("showTitleBar") then SetVariable("showTitleBar", "true") @@ -167,10 +167,25 @@ function createWindow() fontSize, -- title_font_size true -- defer_showing ) + table.insert(clockWin.menu_table, "Change font") table.insert(clockWin.menu_table, "Show title bar") table.insert(clockWin.menu_table, "Hide title bar") table.insert(clockWin.menu_table, "Compact mode") table.insert(clockWin.menu_table, "Full mode") + table.insert( + clockWin.menu_handlers, + function() + wantedFont = utils.fontpicker() + SetVariable("font_name", wantedFont.name) + font_name = wantedFont.name + SetVariable("font_size", wantedFont.size) + font_size = wantedFont.size + SaveState() + clockWin:hide() + createWindow() + Execute("aardclock time") + end + ) table.insert( clockWin.menu_handlers, function()