mirror of
https://github.com/MeexReay/poshlostios.git
synced 2025-06-24 02:22:58 +03:00
add escape button startz
This commit is contained in:
parent
ffbdf89609
commit
cc679a5922
@ -7,7 +7,22 @@ async function main(args) {
|
||||
|
||||
let ctx = getGraphics()
|
||||
|
||||
while (true) {
|
||||
let run = true
|
||||
|
||||
(async () => {
|
||||
while (true) {
|
||||
let event = await pollStdinEvent()
|
||||
|
||||
if (event.type == "key") {
|
||||
if (event.key == "Escape") {
|
||||
run = false
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
})()
|
||||
|
||||
while (run) {
|
||||
ctx.fillStyle = "black"
|
||||
ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user