This repository has been archived on 2023-11-14. You can view files and clone it, but cannot push or open issues/pull-requests.
vogue/testinglib/window.v

33 lines
488 B
V

namespace SDL;
keepalive;
import sdl from '@kmamal/sdl';
import util from 'util';
runtime member window;
async restore {
// console.log('he...hello?')
window = sdl.video.createWindow({
// borderless: true,
height: 200,
width: 300,
resizable: true
});
main_loop:
for (;;) {
let event
while ((event = sdl.events.poll())) {
console.log(event);
if (event.type === 'quit') {
window.destroy()
break main_loop
}
}
}
}