|
@@ -63,6 +63,7 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc
|
|
_get_unique_id = p_env->GetMethodID(cls, "getUniqueID", "()Ljava/lang/String;");
|
|
_get_unique_id = p_env->GetMethodID(cls, "getUniqueID", "()Ljava/lang/String;");
|
|
_show_keyboard = p_env->GetMethodID(cls, "showKeyboard", "(Ljava/lang/String;IIII)V");
|
|
_show_keyboard = p_env->GetMethodID(cls, "showKeyboard", "(Ljava/lang/String;IIII)V");
|
|
_hide_keyboard = p_env->GetMethodID(cls, "hideKeyboard", "()V");
|
|
_hide_keyboard = p_env->GetMethodID(cls, "hideKeyboard", "()V");
|
|
|
|
+ _has_hardware_keyboard = p_env->GetMethodID(cls, "hasHardwareKeyboard", "()Z");
|
|
_set_screen_orientation = p_env->GetMethodID(cls, "setScreenOrientation", "(I)V");
|
|
_set_screen_orientation = p_env->GetMethodID(cls, "setScreenOrientation", "(I)V");
|
|
_get_screen_orientation = p_env->GetMethodID(cls, "getScreenOrientation", "()I");
|
|
_get_screen_orientation = p_env->GetMethodID(cls, "getScreenOrientation", "()I");
|
|
_get_system_dir = p_env->GetMethodID(cls, "getSystemDir", "(IZ)Ljava/lang/String;");
|
|
_get_system_dir = p_env->GetMethodID(cls, "getSystemDir", "(IZ)Ljava/lang/String;");
|
|
@@ -220,6 +221,16 @@ bool GodotIOJavaWrapper::has_vk() {
|
|
return (_show_keyboard != nullptr) && (_hide_keyboard != nullptr);
|
|
return (_show_keyboard != nullptr) && (_hide_keyboard != nullptr);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+bool GodotIOJavaWrapper::has_hardware_keyboard() {
|
|
|
|
+ if (_has_hardware_keyboard) {
|
|
|
|
+ JNIEnv *env = get_jni_env();
|
|
|
|
+ ERR_FAIL_NULL_V(env, false);
|
|
|
|
+ return env->CallBooleanMethod(godot_io_instance, _has_hardware_keyboard);
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
void GodotIOJavaWrapper::show_vk(const String &p_existing, int p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
|
|
void GodotIOJavaWrapper::show_vk(const String &p_existing, int p_type, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
|
|
if (_show_keyboard) {
|
|
if (_show_keyboard) {
|
|
JNIEnv *env = get_jni_env();
|
|
JNIEnv *env = get_jni_env();
|