1
0
Fork 0
forked from AbleOS/ableos

make the cursor more visible

This commit is contained in:
koniifer 2024-11-10 11:58:42 +00:00
parent 2439722c88
commit 7da32b263f

View file

@ -133,7 +133,12 @@ main := fn(): int {
render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white) render.put_rect(screen, .(0, 0), .(screen.width - 1, screen.height - 1), render.white)
// render mouse // render mouse
lum := render.indexptr(screen, mouse_x, mouse_y)
if lum.r / 3 + lum.g / 3 + lum.b / 3 < 128 {
render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white) render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.white)
} else {
render.put_rect(screen, .(mouse_x, mouse_y), .(20, 20), render.black)
}
// Send events to focused window // Send events to focused window
} }