v3.2.2: fixed iOS keyboard not showing return key for multiline
This commit is contained in:
@@ -183,7 +183,7 @@ public class PointerEvent {
|
||||
}
|
||||
if (clearKeyboardThisPress){
|
||||
//most press events should clear the keyboard
|
||||
Game.platform.setOnscreenKeyboardVisible(false);
|
||||
Game.platform.setOnscreenKeyboardVisible(false, false);
|
||||
}
|
||||
}
|
||||
pointerEvents.clear();
|
||||
|
||||
@@ -141,13 +141,13 @@ public class TextInput extends Component {
|
||||
textField.setOnscreenKeyboard(new TextField.OnscreenKeyboard() {
|
||||
@Override
|
||||
public void show(boolean visible) {
|
||||
Game.platform.setOnscreenKeyboardVisible(visible);
|
||||
Game.platform.setOnscreenKeyboardVisible(visible, multiline);
|
||||
}
|
||||
});
|
||||
|
||||
container.setActor(textField);
|
||||
stage.setKeyboardFocus(textField);
|
||||
Game.platform.setOnscreenKeyboardVisible(true);
|
||||
Game.platform.setOnscreenKeyboardVisible(true, multiline);
|
||||
}
|
||||
|
||||
public void enterPressed(){
|
||||
@@ -258,7 +258,7 @@ public class TextInput extends Component {
|
||||
stage.dispose();
|
||||
skin.dispose();
|
||||
Game.inputHandler.removeInputProcessor(stage);
|
||||
Game.platform.setOnscreenKeyboardVisible(false);
|
||||
Game.platform.setOnscreenKeyboardVisible(false, false);
|
||||
if (!DeviceCompat.isDesktop()) Game.platform.updateSystemUI();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.watabou.utils;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
import com.badlogic.gdx.graphics.g2d.PixmapPacker;
|
||||
@@ -61,8 +62,9 @@ public abstract class PlatformSupport {
|
||||
return Gdx.net.openURI( uri );
|
||||
}
|
||||
|
||||
public void setOnscreenKeyboardVisible(boolean value){
|
||||
Gdx.input.setOnscreenKeyboardVisible(value);
|
||||
public void setOnscreenKeyboardVisible(boolean value, boolean multiline){
|
||||
//by default ignore multiline
|
||||
Gdx.input.setOnscreenKeyboardVisible(value, Input.OnscreenKeyboardType.Default);
|
||||
}
|
||||
|
||||
//TODO should consider spinning this into its own class, rather than platform support getting ever bigger
|
||||
|
||||
Reference in New Issue
Block a user