(Controller controller, int axisIndex, float value)
| 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 |
| 1555 | FContainer container = FOverlay.getTopOverlay(); |
| 1556 | if (container == null) { |
| 1557 | container = currentScreen; |
| 1558 | } |
| 1559 | if (container != null) { |
| 1560 | if (currentScreen instanceof MatchScreen) { |
| 1561 | if (4 == axisIndex && value == 1f) { //others are L2Button if missing this axis |
| 1562 | container.keyDown(Keys.ENTER); |
| 1563 | } |
| 1564 | if (5 == axisIndex && value == 1f) { //others are R2 Button if missing this axis |
| 1565 | container.keyDown(Keys.ESCAPE); |
| 1566 | } |
| 1567 | if (controller.getMapping().axisLeftY == axisIndex) { |
| 1568 | if (value == 1f) |
| 1569 | container.keyDown(Keys.PAGE_DOWN); |
| 1570 | } |
| 1571 | /*if (controller.getMapping().axisLeftX == axisIndex) { |
| 1572 | if (value == 1f) { |
| 1573 | |
| 1574 | } |
| 1575 | }*/ |
| 1576 | } |
| 1577 | } |
| 1578 | } |
| 1579 | private void translateButtons(Controller controller, int buttonIndex, boolean keyDown) { |
| 1580 | if (!hasGamepad()) |
| 1581 | return; //adventure only |
no test coverage detected