mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
add right click control to adventure mode
This commit is contained in:
@@ -26,6 +26,7 @@ public class ForgeInput extends FGestureAdapter {
|
||||
private final ForgeScene forgeScene;
|
||||
//mouseMoved and scrolled events for desktop version
|
||||
private int mouseMovedX, mouseMovedY;
|
||||
private int rightTapCount;
|
||||
|
||||
public ForgeInput(ForgeScene forgeScene) {
|
||||
this.forgeScene=forgeScene;
|
||||
@@ -126,6 +127,19 @@ public class ForgeInput extends FGestureAdapter {
|
||||
forgeScene.buildTouchListeners(x, y, potentialListeners);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchUp(int x, int y, int pointer, int button) {
|
||||
if (button == Input.Buttons.RIGHT) {
|
||||
Forge.magnifyToggle = !Forge.magnifyToggle;
|
||||
if (rightTapCount == 2) {
|
||||
Forge.magnifyShowDetails = !Forge.magnifyShowDetails;
|
||||
rightTapCount = 0;
|
||||
}
|
||||
rightTapCount++;
|
||||
}
|
||||
return super.touchUp(x, y, pointer, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean touchDown(int x, int y, int pointer, int button) {
|
||||
if (pointer == 0) { //don't change listeners when second finger goes down for zoom
|
||||
|
||||
Reference in New Issue
Block a user