/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package transientlibs.preui.agents.rendering;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import transientlibs.preui.objects.gui.interfaces.IColour;
import transientlibs.processors.misc.Detonator;
/**
*
* @author kibertoad
*/
public class GDXGeometryAgent implements GeometryAgent {
public ShapeRenderer shapeRenderer;
@Override
public void init (){
shapeRenderer = new ShapeRenderer();
}
@Override
public void drawRectangle(float x, float y, int width, int height, IColour colour) {
shapeRenderer.begin(ShapeType.Line);
shapeRenderer.setColor(colour.r(), colour.g(), colour.b(), colour.a());
shapeRenderer.rect(x, Detonator.INSTANCE.currentGenericGame.getScreenHeight() - y - height, width, height);
shapeRenderer.end();
}
}