• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisionfc421a51ef5da0b2baab3e69ef9543fe76f2a029 (tree)
l'heure2021-10-22 22:56:13
AuteurHotshot5000 <sebastian_bugiu@yaho...>
CommiterHotshot5000

Message de Log

Update DefaultIOSInput.java

Added callback for when closing on screen keyboard.

Change Summary

Modification

--- a/backends/gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/DefaultIOSInput.java
+++ b/backends/gdx-backend-robovm/src/com/badlogic/gdx/backends/iosrobovm/DefaultIOSInput.java
@@ -425,13 +425,34 @@ public class DefaultIOSInput extends AbstractInput implements IOSInput {
425425
426426 @Override
427427 public boolean shouldReturn (UITextField textField) {
428- if (keyboardCloseOnReturn) setOnscreenKeyboardVisible(false);
428+ if (keyboardCloseOnReturn) {
429+// setOnscreenKeyboardVisible(false);
430+ if (onScreenKeyboardCloser != null) {
431+ onScreenKeyboardCloser.onShouldReturn();
432+ }
433+ }
429434 inputProcessor.keyDown(Keys.ENTER);
430435 inputProcessor.keyTyped((char)13);
431436 Gdx.graphics.requestRendering();
432437 return false;
433438 }
434439 };
440+ private OnScreenKeyboardCloser onScreenKeyboardCloser;
441+
442+ /**
443+ * Hack to get notified when the keyboard must be hidden.
444+ */
445+ public interface OnScreenKeyboardCloser {
446+ void onShouldReturn();
447+ }
448+
449+ public OnScreenKeyboardCloser getOnScreenKeyboardCloser() {
450+ return onScreenKeyboardCloser;
451+ }
452+
453+ public void setOnScreenKeyboardCloser(OnScreenKeyboardCloser onScreenKeyboardCloser) {
454+ this.onScreenKeyboardCloser = onScreenKeyboardCloser;
455+ }
435456
436457 @Override
437458 public void setOnscreenKeyboardVisible (boolean visible) {