libGDX 1.9.10, fix #731
This commit is contained in:
@@ -3,7 +3,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.8'
|
||||
classpath 'org.wisepersist:gwt-gradle-plugin:1.0.13'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ public class GwtInput implements Input {
|
||||
boolean[] pressedKeys = new boolean[256];
|
||||
boolean keyJustPressed = false;
|
||||
boolean[] justPressedKeys = new boolean[256];
|
||||
boolean[] justPressedButtons = new boolean[5];
|
||||
InputProcessor processor;
|
||||
char lastKeyCharPressed;
|
||||
float keyRepeatTimer;
|
||||
@@ -58,7 +59,12 @@ public class GwtInput implements Input {
|
||||
}
|
||||
|
||||
void reset() {
|
||||
justTouched = false;
|
||||
if (justTouched) {
|
||||
justTouched = false;
|
||||
for (int i = 0; i < justPressedButtons.length; i++) {
|
||||
justPressedButtons[i] = false;
|
||||
}
|
||||
}
|
||||
if (keyJustPressed) {
|
||||
keyJustPressed = false;
|
||||
for (int i = 0; i < justPressedKeys.length; i++) {
|
||||
@@ -100,6 +106,11 @@ public class GwtInput implements Input {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxPointers() {
|
||||
return MAX_TOUCHES;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getX() {
|
||||
return touchX[0];
|
||||
@@ -175,6 +186,12 @@ public class GwtInput implements Input {
|
||||
return pressedButtons.contains(button) && touched[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isButtonJustPressed(int button) {
|
||||
if (button < 0 || button >= justPressedButtons.length) return false;
|
||||
return justPressedButtons[button];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isKeyPressed(int key) {
|
||||
if (key == Keys.ANY_KEY) {
|
||||
@@ -276,6 +293,15 @@ public class GwtInput implements Input {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCatchKey(int keycode, boolean catchKey) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCatchKey(int keycode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInputProcessor(InputProcessor processor) {
|
||||
this.processor = processor;
|
||||
@@ -542,6 +568,7 @@ public class GwtInput implements Input {
|
||||
this.justTouched = true;
|
||||
this.touched[0] = true;
|
||||
this.pressedButtons.add(getButton(e.getButton()));
|
||||
justPressedButtons[e.getButton()] = true;
|
||||
this.deltaX[0] = 0;
|
||||
this.deltaY[0] = 0;
|
||||
if (isCursorCatched()) {
|
||||
|
||||
Reference in New Issue
Block a user