local Window = require("window") local win local Mono = text.loadfont("5x8mono.8.gif") -- load font function _init() win = Window:new("Hello World!", 200, 50, 148, 45) -- set the window's size and title win.resizable = true -- the window can be resized view.active(win.mainvp) -- set the viewport win.onclose = function() sys.exit() end end function _step(t) win:step(t) gfx.cls() local winxsize, winysize = view.size(win.mainvp) -- get the window's size text.draw(winxsize, Mono, 2, 2) -- print the x size of the window text.draw(winysize, Mono, 2, 12) -- print the y size of the window text.draw("Hello World", Mono, winxsize - 60, winysize - 10) -- print "Hello World" in the corner end