3
0
Fork 0
mirror of https://github.com/JulianGro/overte.git synced 2025-08-20 23:44:58 +02:00
overte-JulianGro/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);