I'm having trouble figuring out this issue. The on-screen time is not matching the actual time.
Code: Select all
init:
python:
def countdown(st, at, length=0.0):
remaining = length - st
if remaining > 1.7:
return Text("%.1f" % remaining, color="#fff", size=60), .1
elif remaining > 0.0:
return Text("%.1f" % remaining, color="#f00", size=60), .1
else:
return anim.Blink(Text("0", color="#f00", size=60)), NoneSo this has the proper on-screen time and the proper actual time.
Code: Select all
$ countdownbase = 3
$ countdowntotal = countdownbase + countdownplayer
image countdown = DynamicDisplayable(countdown, length=countdowntotal)
show countdown at Position(xalign=.24, yalign=.5)
$ ui.timer(countdowntotal, ui.jumps("Fail"))
menu:
"Test":
"Test"Code: Select all
$ countdownbase = 0
$ countdowntotal = countdownbase + countdownplayer
image countdown = DynamicDisplayable(countdown, length=countdowntotal)
show countdown at Position(xalign=.24, yalign=.5)
$ ui.timer(countdowntotal, ui.jumps("Fail"))
menu:
"Test 2":
"Test 2"Thank you for your time and help!
Best Regards.