From 8bc548ae84c2057b746412fa69e6bfcd41b4d8d4 Mon Sep 17 00:00:00 2001 From: Willem Date: Sun, 13 Mar 2022 15:39:58 +0100 Subject: [PATCH] Removed 3d input from top menu bar. --- .../vrgem4/view/DeskAppInputProcessor.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java index 408a546a..f5dd84fe 100644 --- a/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java +++ b/gdxapp4d-vrgem4/src/main/java/love/distributedrebirth/gdxapp4d/vrgem4/view/DeskAppInputProcessor.java @@ -22,6 +22,14 @@ public class DeskAppInputProcessor implements InputProcessor { return filtering; } + private boolean isFilterMenu(int screenY) { + // font22 + margin top-bottom = 26px + if (screenY <= 26) { + return true; + } + return false; + } + @Override public boolean keyDown(int keycode) { if (filtering) { @@ -51,6 +59,9 @@ public class DeskAppInputProcessor implements InputProcessor { @Override public boolean touchDown(int screenX, int screenY, int pointer, int button) { + if (isFilterMenu(screenY)) { + return false; + } if (filtering) { return false; } else { @@ -60,6 +71,9 @@ public class DeskAppInputProcessor implements InputProcessor { @Override public boolean touchUp(int screenX, int screenY, int pointer, int button) { + if (isFilterMenu(screenY)) { + return false; + } if (filtering) { return false; } else { @@ -69,6 +83,9 @@ public class DeskAppInputProcessor implements InputProcessor { @Override public boolean touchDragged(int screenX, int screenY, int pointer) { + if (isFilterMenu(screenY)) { + return false; + } if (filtering) { return false; } else { @@ -78,6 +95,9 @@ public class DeskAppInputProcessor implements InputProcessor { @Override public boolean mouseMoved(int screenX, int screenY) { + if (isFilterMenu(screenY)) { + return false; + } if (filtering) { return false; } else {