Send key events using the super method while in the editor

This avoids the bug where the the numbers are not typeable in the controls editor
This commit is contained in:
artdeell 2022-11-14 20:31:23 +03:00 committed by ArtDev
parent 3328ce1ec9
commit 854792e3c6

View File

@ -437,6 +437,7 @@ public class MainActivity extends BaseActivity {
@Override
public boolean dispatchKeyEvent(KeyEvent event) {
if(isInEditor) return super.dispatchKeyEvent(event);
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && !touchCharInput.isEnabled()) {
if(event.getAction() != KeyEvent.ACTION_UP) return true; // We eat it anyway
sendKeyPress(LwjglGlfwKeycode.GLFW_KEY_ESCAPE);