MCPcopy Create free account
hub / github.com/Card-Forge/forge / axisMoved

Method axisMoved

forge-gui-mobile/src/forge/Forge.java:1541–1551  ·  view source on GitHub ↗
(Controller controller, int axisIndex, float value)

Source from the content-addressed store, hash-verified

1539 }
1540
1541 @Override
1542 public boolean axisMoved(Controller controller, int axisIndex, float value) {
1543 //System.out.println(controller.getName()+"["+controller.getUniqueId()+"]: axis: "+axisIndex+" - "+value);
1544 hasGamepad = true;
1545 // Axis deadzone filters joystick drift from counting
1546 if (Math.abs(value) > 0.25f) {
1547 lastInputWasController = true;
1548 }
1549 translateAxis(controller, axisIndex, value);//prevent multi press axis
1550 return super.axisMoved(controller, axisIndex, value);
1551 }
1552 private void translateAxis(Controller controller, int axisIndex, float value) {
1553 if (!hasGamepad())
1554 return;//adventure only

Callers

nothing calls this directly

Calls 1

translateAxisMethod · 0.95

Tested by

no test coverage detected