Toggle Navigation
Hatchery
Eggs
Typing test
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import badge import ugfx badge.init() ugfx.init() x = 4 y = 64 def up(yc): yc=yc+15 ugfx.clear(ugfx.WHITE) ugfx.string(x,y,"up","PermanentMarker22",ugfx.BLACK) ugfx.flush() def down(yc): yc=yc-15 ugfx.clear(ugfx.WHITE) ugfx.string(x,y,"down","PermanentMarker22",ugfx.BLACK) ugfx.flush() def right(pressed): if (pressed): global x x = x + 15 else: ugfx.string(x,y,"test","PermanentMarker22",ugfx.BLACK) ugfx.flush() ugfx.string(x,y,"test","PermanentMarker22",ugfx.BLACK) ugfx.flush() ugfx.input_init() ugfx.input_attach(ugfx.JOY_UP,up(y)) ugfx.input_attach(ugfx.JOY_DOWN,down(x))