v1.2.0: added custom button names for playstation controllers

This commit is contained in:
Evan Debenham
2022-02-18 15:43:35 -05:00
parent e688979dac
commit 0d3d8d9c34
3 changed files with 67 additions and 20 deletions

View File

@@ -22,6 +22,7 @@
package com.watabou.input;
import com.badlogic.gdx.Input;
import com.watabou.noosa.Game;
import com.watabou.utils.PointF;
import com.watabou.utils.Signal;
@@ -106,6 +107,10 @@ public class PointerEvent {
private static PointF lastHoverPos = new PointF();
public static PointF currentHoverPos(){
if (lastHoverPos.x == 0 && lastHoverPos.y == 0){
lastHoverPos.x = Game.width/2;
lastHoverPos.y = Game.height/2;
}
return lastHoverPos.clone();
}