mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Enable granular control of touchscreen related settings
This commit is contained in:
parent
7e79aead99
commit
445053a62d
7 changed files with 64 additions and 14 deletions
|
@ -57,6 +57,10 @@
|
|||
|
||||
#include <android/native_window_jni.h>
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#include "editor/editor_settings.h"
|
||||
#endif
|
||||
|
||||
static JavaClassWrapper *java_class_wrapper = nullptr;
|
||||
static OS_Android *os_android = nullptr;
|
||||
static AndroidInputHandler *input_handler = nullptr;
|
||||
|
@ -427,6 +431,18 @@ JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getGlobal(JNIEnv *
|
|||
return env->NewStringUTF(GLOBAL_GET(js).operator String().utf8().get_data());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_org_godotengine_godot_GodotLib_getEditorSetting(JNIEnv *env, jclass clazz, jstring p_setting_key) {
|
||||
String editor_setting = "";
|
||||
#ifdef TOOLS_ENABLED
|
||||
String godot_setting_key = jstring_to_string(p_setting_key, env);
|
||||
editor_setting = EDITOR_GET(godot_setting_key).operator String();
|
||||
#else
|
||||
WARN_PRINT("Access to the Editor Settings in only available on Editor builds");
|
||||
#endif
|
||||
|
||||
return env->NewStringUTF(editor_setting.utf8().get_data());
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_godotengine_godot_GodotLib_callobject(JNIEnv *env, jclass clazz, jlong ID, jstring method, jobjectArray params) {
|
||||
Object *obj = ObjectDB::get_instance(ObjectID(ID));
|
||||
ERR_FAIL_NULL(obj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue