RosettaCodeData/Task/Animation/MiniScript/animation-2.mini

18 lines
399 B
Plaintext

clear
txt = "Hello World! "
width = txt.len * 20 + 4
gfx.print txt,0,608,color.white, "large"
toggle = false
while true
img1 = gfx.getImage(toggle, 608, width - 1, 32)
img2 = gfx.getImage((not toggle) * (width - 1), 608, 1, 32)
gfx.drawImage img1, (not toggle), 608
gfx.drawImage img2, toggle * (width - 1), 608
if key.available then
toggle = not toggle
key.clear
end if
yield
end while