You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Fix Android LineEdit editing bugs
This commit is contained in:
@@ -53,7 +53,7 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc
|
||||
_get_model = p_env->GetMethodID(cls, "getModel", "()Ljava/lang/String;");
|
||||
_get_screen_DPI = p_env->GetMethodID(cls, "getScreenDPI", "()I");
|
||||
_get_unique_id = p_env->GetMethodID(cls, "getUniqueID", "()Ljava/lang/String;");
|
||||
_show_keyboard = p_env->GetMethodID(cls, "showKeyboard", "(Ljava/lang/String;I)V");
|
||||
_show_keyboard = p_env->GetMethodID(cls, "showKeyboard", "(Ljava/lang/String;III)V");
|
||||
_hide_keyboard = p_env->GetMethodID(cls, "hideKeyboard", "()V");
|
||||
_set_screen_orientation = p_env->GetMethodID(cls, "setScreenOrientation", "(I)V");
|
||||
_get_screen_orientation = p_env->GetMethodID(cls, "getScreenOrientation", "()I");
|
||||
@@ -132,11 +132,11 @@ bool GodotIOJavaWrapper::has_vk() {
|
||||
return (_show_keyboard != 0) && (_hide_keyboard != 0);
|
||||
}
|
||||
|
||||
void GodotIOJavaWrapper::show_vk(const String &p_existing, int p_max_input_length) {
|
||||
void GodotIOJavaWrapper::show_vk(const String &p_existing, int p_max_input_length, int p_cursor_start, int p_cursor_end) {
|
||||
if (_show_keyboard) {
|
||||
JNIEnv *env = ThreadAndroid::get_env();
|
||||
jstring jStr = env->NewStringUTF(p_existing.utf8().get_data());
|
||||
env->CallVoidMethod(godot_io_instance, _show_keyboard, jStr, p_max_input_length);
|
||||
env->CallVoidMethod(godot_io_instance, _show_keyboard, jStr, p_max_input_length, p_cursor_start, p_cursor_end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user