stn := @use("../../../libraries/stn/src/lib.hb"); .{string, memory, buffer} := stn horizon_api := @use("../../../libraries/horizon_api/src/lib.hb") render := @use("../../../libraries/render/src/lib.hb"); .{Vec2} := @use("../../../libraries/stn/src/lib.hb").math Window := struct { // TODO: Replace this with widgets // implicit_framebuffer: width: int, height: int, x: int, y: int, } main := fn(): int { a := buffer.create("XHorizon\0") screen := render.init(true) image := render.new_surface(screen.width / 3, screen.height / 3) pos := Vec2(int).(100, 100) loop { // Clear the screen render.clear(screen, render.black) // TODO: Get windows out of the hashmap render.clear(image, render.white) // Apply the image to the screen render.put_surface(screen, image, pos) // Sync the screen render.sync(screen) } return 0 }