From c027897c215c90eaa9084183cca905cc62c7913e Mon Sep 17 00:00:00 2001 From: AardCrowley <12467582+AardCrowley@users.noreply.github.com> Date: Tue, 19 Feb 2019 23:56:39 -0500 Subject: [PATCH] Update Aardwolf_Clock.xml --- Aardwolf_Clock V2/Aardwolf_Clock.xml | 35 +++++++++++----------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/Aardwolf_Clock V2/Aardwolf_Clock.xml b/Aardwolf_Clock V2/Aardwolf_Clock.xml index 7f7a8fd..7625862 100644 --- a/Aardwolf_Clock V2/Aardwolf_Clock.xml +++ b/Aardwolf_Clock V2/Aardwolf_Clock.xml @@ -6,7 +6,7 @@ - + @@ -90,7 +90,7 @@ local win = "AardClock_" .. GetPluginID() local font = "f" - windowinfo = movewindow.install(win, 7, miniwin.create_absolute_location, true, nil, {mouseup = MoveMouseUp, mousedown = MoveMouseDown}) + windowinfo = movewindow.install(win, 7, miniwin.create_absolute_location, true, nil) checked_time = false local footer_text = {} @@ -119,7 +119,6 @@ window_width = (20 * font_width) + 11 local cx = math.floor((window_width-5)/2) + 3 local cy = cx + font_height - canRedraw = true bgDay = 'khaki' bgNight = 'navy' @@ -366,17 +365,15 @@ end function onTimer() - if canRedraw then - if checked_time then - last_tick = last_tick or os.clock() - local s = os.clock() - last_tick - updateTime() - drawFace() - drawHand(math.min(30, s), 60, 30) - hourHandTime = hourTime + s/30 - drawHand(hourHandTime, 45, 12) - Redraw() - end + if checked_time then + last_tick = last_tick or os.clock() + local s = os.clock() - last_tick + updateTime() + drawFace() + drawHand(math.min(30, s), 60, 30) + hourHandTime = hourTime + s/30 + drawHand(hourHandTime, 45, 12) + Redraw() end end @@ -407,14 +404,8 @@ movewindow.save_state(win) end - function MoveMouseDown() - canRedraw = false - print("Mousedown!") - end - - function MoveMouseUp() - canRedraw = true - print("Mouseup!") + function OnPluginClose() + OnPluginDisable() end function OnPluginInstall()