Android editor: Enable orientation change in Script Editor

This commit is contained in:
Anish Kumar 2026-01-31 21:12:23 +05:30
parent 634220e9fc
commit 25a203aa34
12 changed files with 97 additions and 1 deletions

View file

@ -1308,6 +1308,11 @@ class Godot private constructor(val context: Context) {
primaryHost?.onEditorWorkspaceSelected(workspace)
}
@Keep
private fun nativeOnDistractionFreeModeChanged(enabled: Boolean) {
primaryHost?.onDistractionFreeModeChanged(enabled)
}
@Keep
private fun nativeBuildEnvConnect(callback: GodotCallable): Boolean {
try {

View file

@ -496,6 +496,13 @@ public class GodotFragment extends Fragment implements IDownloaderClient, GodotH
}
}
@Override
public void onDistractionFreeModeChanged(Boolean enabled) {
if (parentHost != null) {
parentHost.onDistractionFreeModeChanged(enabled);
}
}
@Override
public BuildProvider getBuildProvider() {
if (parentHost != null) {

View file

@ -153,6 +153,11 @@ public interface GodotHost {
*/
default void onEditorWorkspaceSelected(String workspace) {}
/**
* Triggered when the editor's distraction-free mode changes.
*/
default void onDistractionFreeModeChanged(Boolean enabled) {}
/**
* Runs the specified action on a host provided thread.
*/

View file

@ -38,4 +38,7 @@ package org.godotengine.godot.editor.utils
object EditorUtils {
@JvmStatic
external fun runScene(scene: String, sceneArgs: Array<String>)
@JvmStatic
external fun toggleTitleBar(visible: Boolean)
}