3
0
Fork 0
mirror of https://thingvellir.net/git/overte synced 2025-03-27 23:52:03 +01:00
overte-thingvellir/script-archive/example/ui/windowExample.js
2016-04-26 11:18:22 -07:00

12 lines
306 B
JavaScript

var width = 0,
height = 0;
function onUpdate(dt) {
if (width != Window.innerWidth || height != Window.innerHeight) {
width = Window.innerWidth;
height = Window.innerHeight;
print("New window dimensions: " + width + ", " + height);
}
}
Script.update.connect(onUpdate);