forked from AbleOS/ableos
35 lines
784 B
Plaintext
35 lines
784 B
Plaintext
|
stn := @use("../../../libraries/stn/src/lib.hb");
|
||
|
.{string, memory, buffer, random, log} := stn;
|
||
|
.{Vec2} := stn.math
|
||
|
|
||
|
horizon_api := @use("../../../libraries/horizon_api/src/lib.hb")
|
||
|
|
||
|
render := @use("../../../libraries/render/src/lib.hb")
|
||
|
|
||
|
psf := @embed("../../../consolefonts/tamsyn/10x20r.psf")
|
||
|
|
||
|
main := fn(): int {
|
||
|
screen := render.init(true)
|
||
|
|
||
|
// Clear the screen to black.
|
||
|
// render.clear(screen, render.black)
|
||
|
|
||
|
x := 0
|
||
|
|
||
|
mem_buf := memory.request_page(1)
|
||
|
color := random.any(render.Color)
|
||
|
|
||
|
str := "Window Title Bar\0"
|
||
|
font := render.text.font_from_psf2(@bitcast(&psf))
|
||
|
|
||
|
loop {
|
||
|
// Clear the screen
|
||
|
// render.clear(screen, render.black)
|
||
|
|
||
|
render.put_rect(screen, .(0, 0), .(screen.width - 1, 26), render.white)
|
||
|
// Sync the screen
|
||
|
render.sync(screen)
|
||
|
}
|
||
|
|
||
|
return 0
|
||
|
}
|