diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4235ef4..02eb239 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,11 +11,11 @@ env: # Which godot version to use for exporting. GODOT_VERSION: 4.5 # Which godot release to use for exporting. (stable/rc/beta/alpha) - GODOT_RELEASE: beta4 + GODOT_RELEASE: beta5 # Used in the editor config file name. Do not change this for patch releases. GODOT_FEATURE_VERSION: 4.5 # Commit hash - GODOT_COMMIT_HASH: 2d113cc22 + GODOT_COMMIT_HASH: c81fd6c PROJECT_NAME: VectorTouch BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes disable_physics_2d=yes disable_navigation_2d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../vectortouch/.github/disabled_classes.build GODOT_REPO: https://github.com/godotengine/godot.git diff --git a/export_presets.cfg b/export_presets.cfg index 59ecf9c..25481df 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -56,12 +56,12 @@ shader_baker/enabled=false xr_features/xr_mode=0 gesture/swipe_to_dismiss=false screen/immersive_mode=false +screen/edge_to_edge=false screen/support_small=true screen/support_normal=true screen/support_large=true screen/support_xlarge=true -screen/edge_to_edge=false -screen/background_color=Color(0, 0, 0, 1) +screen/background_color=Color(0.101960786, 0.101960786, 0.101960786, 1) user_data_backup/allow=false command_line/extra_args="" apk_expansion/enable=false @@ -281,12 +281,12 @@ shader_baker/enabled=false xr_features/xr_mode=0 gesture/swipe_to_dismiss=false screen/immersive_mode=false +screen/edge_to_edge=false screen/support_small=true screen/support_normal=true screen/support_large=true screen/support_xlarge=true -screen/edge_to_edge=false -screen/background_color=Color(0, 0, 0, 1) +screen/background_color=Color(0.101960786, 0.101960786, 0.101960786, 1) user_data_backup/allow=false command_line/extra_args="" apk_expansion/enable=false diff --git a/godot_only/GodotApp.patch b/godot_only/GodotApp.patch index a82cd82..31d13f2 100644 --- a/godot_only/GodotApp.patch +++ b/godot_only/GodotApp.patch @@ -1,5 +1,5 @@ ---- GodotAppOriginal.java 2025-08-02 16:51:43.415399621 +0530 -+++ GodotApp.java 2025-08-02 12:41:12.176163024 +0530 +--- GodotAppOriginal.java 2025-08-07 12:07:46.000000000 +0530 ++++ GodotApp.java 2025-08-07 19:36:45.992086899 +0530 @@ -34,6 +34,8 @@ import org.godotengine.godot.GodotActivity; @@ -17,7 +17,7 @@ static { // .NET libraries. if (BuildConfig.FLAVOR.equals("mono")) { -@@ -66,9 +69,10 @@ +@@ -67,9 +70,10 @@ @Override public void onCreate(Bundle savedInstanceState) { @@ -29,10 +29,10 @@ } @Override -@@ -81,5 +85,8 @@ +@@ -82,5 +86,8 @@ public void onGodotMainLoopStarted() { super.onGodotMainLoopStarted(); - runOnUiThread(updateImmersiveAndEdgeToEdgeModes); + runOnUiThread(updateWindowAppearance); + new Handler(Looper.getMainLooper()).postDelayed(() -> { + isAppReady = true; + }, 300); diff --git a/src/autoload/HandlerGUI.gd b/src/autoload/HandlerGUI.gd index 0542d4f..0cce48c 100644 --- a/src/autoload/HandlerGUI.gd +++ b/src/autoload/HandlerGUI.gd @@ -34,14 +34,12 @@ func set_system_bar_color(color: Color, override_appearance := false) -> void: var decorView: JavaObject = window.getDecorView() decorView.setBackgroundColor(color.to_argb32()) - if (is_light_system_bars != (color.get_luminance() > 0.5)) or override_appearance: - is_light_system_bars = color.get_luminance() > 0.5 - var wic = JavaClassWrapper.wrap("android.view.WindowInsetsController") - var insets_controller = window.getInsetsController() - insets_controller.setSystemBarsAppearance( - wic.APPEARANCE_LIGHT_STATUS_BARS if is_light_system_bars else 0, wic.APPEARANCE_LIGHT_STATUS_BARS) - insets_controller.setSystemBarsAppearance( - wic.APPEARANCE_LIGHT_NAVIGATION_BARS if is_light_system_bars else 0, wic.APPEARANCE_LIGHT_NAVIGATION_BARS) + if (is_light_system_bars != (color.get_luminance() > 0.45)) or override_appearance: + is_light_system_bars = color.get_luminance() > 0.45 + var WindowInsetsControllerCompat = JavaClassWrapper.wrap("androidx.core.view.WindowInsetsControllerCompat") + var controller = WindowInsetsControllerCompat.call("", window, window.getDecorView()) + controller.setAppearanceLightNavigationBars(is_light_system_bars) + controller.setAppearanceLightStatusBars(is_light_system_bars) activity.runOnUiThread(android_runtime.createRunnableFromGodotCallable(callable))