From 508e2ca78bc531ace4e383b8ca501cc9997d4073 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Fri, 24 Jan 2025 13:58:34 +1300 Subject: Fixed framerate bug in animated test, used Ada2022 aggregates in animated/arc tests, other slight test improvements --- test/ask.adb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'test/ask.adb') diff --git a/test/ask.adb b/test/ask.adb index 201d245..cb12fff 100644 --- a/test/ask.adb +++ b/test/ask.adb @@ -91,21 +91,20 @@ is Stop : Boolean := False; procedure Timer_Callback is - Change : Long_Float := 5.0; Message_Icon : BX.Box_Reference := AK.Get_Message_Icon; - My_Color : FLTK.Color; + My_Color : FLTK.Color; begin - Stc.Repeat_Timeout (Change, Timer_Callback'Unrestricted_Access); - if Stop then Message_Icon.Set_Background_Color (FLTK.White_Color); return; end if; + Stc.Repeat_Timeout (5.0, Timer_Callback'Unrestricted_Access); + My_Color := Message_Icon.Get_Background_Color; My_Color := (My_Color + 1) mod 32; if My_Color = Message_Icon.Get_Label_Color then - My_Color := My_Color + 1; + My_Color := (My_Color + 1) mod 32; end if; Message_Icon.Set_Background_Color (My_Color); -- cgit