v0.8.2: the key binding menu now appears on android with a keyboard

This commit is contained in:
Evan Debenham 2020-07-11 20:41:41 -04:00
parent ebac9d2e97
commit 0865333774
2 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,7 @@ package com.watabou.utils;
import com.badlogic.gdx.Application;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.watabou.noosa.Game;
//TODO migrate to platformSupport class
@ -42,6 +43,10 @@ public class DeviceCompat {
public static boolean isDesktop(){
return Gdx.app.getType() == Application.ApplicationType.Desktop;
}
public static boolean hasHardKeyboard(){
return Gdx.input.isPeripheralAvailable(Input.Peripheral.HardwareKeyboard);
}
public static boolean legacyDevice(){
switch (Gdx.app.getType()){

View File

@ -308,7 +308,7 @@ public class WndSettings extends WndTabbed {
chkFont.checked(SPDSettings.systemFont());
add(chkFont);
if (DeviceCompat.isDesktop()){
if (DeviceCompat.hasHardKeyboard()){
RedButton btnKeyBindings = new RedButton(Messages.get(this, "key_bindings")){
@Override
protected void onClick() {