make the cursor more visible
This commit is contained in:
parent
2439722c88
commit
7da32b263f
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue