-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtimer.py
27 lines (22 loc) · 802 Bytes
/
timer.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from pyres.environment import intfile, chabitica, time_text_font, timeout_text_font
from pyres.genmonscripting import settxt, setspan, setfont, writeclick
from pyres.timefuncs import writetime, set_time, readint
def writeout_timer():
chabitica()
if readint(intfile):
print(settxt(
setspan(
f"Tempo rimanente: {set_time()}"
, setfont(*time_text_font)
)
))
else:
print(settxt(
setspan(
"Tempo esaurito"
, setfont(*timeout_text_font)
)
))
writetime(readint(intfile))
writeclick("timerclick.py")
writeout_timer()