Add pointer class

This commit is contained in:
Victor 2014-01-14 22:03:03 +02:00
parent 4f7a65a3bd
commit 8e10f4d1de

View File

@ -0,0 +1,28 @@
package com.annimon.influencexxii;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
/**
* Controlling pointer by user
* @author aNNiMON
*/
public class Pointer {
private int screenWidth, screenHeight;
private int x, y;
public Pointer(int width, int height) {
x = width / 2;
y = height / 2;
setScreenParameters(width, height);
}
public void setScreenParameters(int width, int height) {
screenWidth = width;
screenHeight = height;
}
public void draw(ShapeRenderer renderer) {
DrawUtils.drawPointer(renderer, x, y, screenWidth, screenHeight, 1);
}
}