|
@@ -37,7 +37,11 @@ import android.content.ComponentName
|
|
|
import android.content.Context
|
|
|
import android.content.Intent
|
|
|
import android.content.pm.PackageManager
|
|
|
-import android.os.*
|
|
|
+import android.os.Build
|
|
|
+import android.os.Bundle
|
|
|
+import android.os.Debug
|
|
|
+import android.os.Environment
|
|
|
+import android.os.Process
|
|
|
import android.preference.PreferenceManager
|
|
|
import android.util.Log
|
|
|
import android.view.View
|
|
@@ -138,6 +142,7 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
|
|
|
internal const val GAME_MENU_ACTION_RESET_CAMERA_2D_POSITION = "resetCamera2DPosition"
|
|
|
internal const val GAME_MENU_ACTION_RESET_CAMERA_3D_POSITION = "resetCamera3DPosition"
|
|
|
internal const val GAME_MENU_ACTION_EMBED_GAME_ON_PLAY = "embedGameOnPlay"
|
|
|
+ internal const val GAME_MENU_ACTION_SET_DEBUG_MUTE_AUDIO = "setDebugMuteAudio"
|
|
|
|
|
|
private const val GAME_WORKSPACE = "Game"
|
|
|
|
|
@@ -753,6 +758,10 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
|
|
|
val embedded = actionData.getBoolean(KEY_GAME_MENU_ACTION_PARAM1)
|
|
|
embedGameOnPlay(embedded)
|
|
|
}
|
|
|
+ GAME_MENU_ACTION_SET_DEBUG_MUTE_AUDIO -> {
|
|
|
+ val enabled = actionData.getBoolean(KEY_GAME_MENU_ACTION_PARAM1)
|
|
|
+ muteAudio(enabled)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -816,6 +825,13 @@ abstract class BaseGodotEditor : GodotActivity(), GameMenuFragment.GameMenuListe
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ override fun muteAudio(enabled: Boolean) {
|
|
|
+ gameMenuState.putBoolean(GAME_MENU_ACTION_SET_DEBUG_MUTE_AUDIO, enabled)
|
|
|
+ godot?.runOnRenderThread {
|
|
|
+ GameMenuUtils.setDebugMuteAudio(enabled)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
override fun embedGameOnPlay(embedded: Boolean) {
|
|
|
gameMenuState.putBoolean(GAME_MENU_ACTION_EMBED_GAME_ON_PLAY, embedded)
|
|
|
godot?.runOnRenderThread {
|