quarantine window
parent
c3c339a084
commit
5ac2096303
|
|
@ -1,33 +0,0 @@
|
||||||
// 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
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue