1
0
Fork 0
forked from AbleOS/ableos

mmm paint app

This commit is contained in:
koniifer 2025-02-11 23:42:50 +00:00
parent cb68df6a7f
commit abaac886ef
3 changed files with 6 additions and 4 deletions
sysdata
programs/render_example/src
system_config.toml

View file

@ -18,7 +18,7 @@ example := fn(): void {
} else if mouse.right {
screen.put_filled_circle(@bitcast(mouse_pos), 10, bg_colour)
} else if mouse.middle {
pen_colour = stn.random.any(render.Color)
pen_colour = *screen.indexptr(@bitcast(mouse_pos.x), @bitcast(mouse_pos.y))
}
}
@ -43,6 +43,8 @@ example := fn(): void {
pen_colour = render.MAGENTA
} else if kb.key == intouch.keycodes.NUMBER9 {
pen_colour = render.GRAY
} else if kb.key == intouch.keycodes.NUMBER0 {
pen_colour = stn.random.any(render.Color)
} else {
bg_colour = stn.random.any(render.Color)
screen.clear(bg_colour)

View file

@ -1 +1 @@
.{example: main} := @use("./examples/drag-and-drop.hb")
.{example: main} := @use("./examples/intouch.hb")

View file

@ -29,8 +29,8 @@ path = "boot:///render_example.hbf"
# [boot.limine.ableos.modules.sunset_server]
# path = "boot:///sunset_server.hbf"
[boot.limine.ableos.modules.ps2_mouse_driver]
path = "boot:///ps2_mouse_driver.hbf"
# [boot.limine.ableos.modules.ps2_mouse_driver]
# path = "boot:///ps2_mouse_driver.hbf"
# [boot.limine.ableos.modules.ps2_keyboard_driver]
# path = "boot:///ps2_keyboard_driver.hbf"