Package transientlibs.preui.agents.rendering

Source Code of transientlibs.preui.agents.rendering.GDXGeometryAgent

/*
* 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();
    }
}
TOP

Related Classes of transientlibs.preui.agents.rendering.GDXGeometryAgent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.