v1.4.0: several text input improvements for Steam Deck

This commit is contained in:
Evan Debenham
2022-08-12 11:05:28 -04:00
parent dcc84e4e7e
commit 4ae3bf9336
7 changed files with 45 additions and 27 deletions

View File

@@ -1097,8 +1097,8 @@ public class GameScene extends PixelScene {
for (Gizmo g : scene.members){
if (g instanceof Window) offsetToInherit = ((Window) g).getOffset();
}
if (scene.lastOffset != null && offsetToInherit == null) {
offsetToInherit = scene.lastOffset;
if (lastOffset != null) {
offsetToInherit = lastOffset;
}
if (offsetToInherit != null) {
wnd.offset(offsetToInherit);

View File

@@ -49,12 +49,10 @@ public class WndTextInput extends Window {
super();
//need to offset to give space for the soft keyboard
if (!DeviceCompat.isDesktop()) {
if (PixelScene.landscape()) {
offset(0, -45);
} else {
offset(0, multiLine ? -60 : -45);
}
if (PixelScene.landscape()) {
offset(0, -45);
} else {
offset(0, multiLine ? -60 : -45);
}
final int width;