Window size handling cleanup

This commit is contained in:
luboslenco
2023-02-26 16:55:47 +01:00
parent 02f01badff
commit f9fe4768aa
4 changed files with 8 additions and 12 deletions
+4 -4
View File
@@ -66,9 +66,11 @@ class App {
lastWindowWidth = System.windowWidth();
lastWindowHeight = System.windowHeight();
#if arm_resizable
iron.App.onResize = onResize;
#end
iron.App.w = w;
iron.App.h = h;
iron.App.x = x;
iron.App.y = y;
System.notifyOnDropFiles(function(dropPath: String) {
#if krom_linux
@@ -233,7 +235,6 @@ class App {
return appy;
}
#if arm_resizable
static function onResize() {
if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
@@ -250,7 +251,6 @@ class App {
saveWindowRect();
#end
}
#end
static function saveWindowRect() {
#if (krom_windows || krom_linux || krom_darwin)
-2
View File
@@ -38,9 +38,7 @@ project.addDefine("kha_no_ogg");
project.addDefine("zui_translate");
project.addDefine("arm_data_dir");
project.addDefine("arm_ltc");
project.addDefine("arm_appwh");
project.addDefine("arm_skip_envmap");
project.addDefine("arm_resizable");
project.addDefine("arm_taa");
project.addDefine("arm_veloc");
project.addDefine("arm_particles");
+4 -4
View File
@@ -76,9 +76,11 @@ class App {
lastWindowWidth = System.windowWidth();
lastWindowHeight = System.windowHeight();
#if arm_resizable
iron.App.onResize = onResize;
#end
iron.App.w = w;
iron.App.h = h;
iron.App.x = x;
iron.App.y = y;
System.notifyOnDropFiles(function(dropPath: String) {
#if krom_linux
@@ -268,7 +270,6 @@ class App {
return appy;
}
#if arm_resizable
static function onResize() {
if (System.windowWidth() == 0 || System.windowHeight() == 0) return;
@@ -287,7 +288,6 @@ class App {
saveWindowRect();
#end
}
#end
static function saveWindowRect() {
#if (krom_windows || krom_linux || krom_darwin)
-2
View File
@@ -45,9 +45,7 @@ project.addDefine("kha_no_ogg");
project.addDefine("zui_translate");
project.addDefine("arm_data_dir");
project.addDefine("arm_ltc");
project.addDefine("arm_appwh");
project.addDefine("arm_skip_envmap");
project.addDefine("arm_resizable");
project.addDefine("arm_taa");
project.addDefine("arm_veloc");
project.addDefine("arm_particles");