v0.8.2: the key binding menu now appears on android with a keyboard
This commit is contained in:
parent
ebac9d2e97
commit
0865333774
|
@ -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()){
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user