Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("apis/qmain")
- os.loadAPI("apis/qformat")
- mon = qmain.setDefaultScreen("top")
- mon.setTextScale(0.5)
- image = {} --möglichst kompakte Speicherung -> keine ansprechende Formattierung
- image[0] = {{" ggg","g g","g g","g g","g g","g g"," ggg"}} --nur Hintergrundfarbe gesetzt
- image[1] = {{" g"," gg","g g"," g"," g"," g"," ggg"}}
- image[2] = {{" ggg","g g"," g"," gg"," g","g","ggggg"}}
- image[3] = {{" ggg","g g"," g"," gg"," g","g g"," ggg"}}
- function startCountdown()
- for remaining_time = 3, 0, -1 do
- mon.setBackgroundColor(qmain.convertColor("c")) --Grauer Hintergrund
- mon.clear()
- local number = image[remaining_time] --Zahl als Bild
- local number_loaded = qformat.loadImage(number)
- qformat.drawImage(number_loaded, {16, 9}) --Diese 3 Zeilen kann man auch in Eine schachteln
- sleep(1)
- end
- end
- startCountdown()
- qmain.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement