Example usage for com.badlogic.gdx.graphics Color PINK

List of usage examples for com.badlogic.gdx.graphics Color PINK

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics Color PINK.

Prototype

Color PINK

To view the source code for com.badlogic.gdx.graphics Color PINK.

Click Source Link

Usage

From source file:vault.q_bounce.controllers.EditorController.java

License:Open Source License

/**
 * Draw the editor elements./* ww  w  .jav  a 2s . c  o m*/
 * @param batch
 */
public void draw(SpriteBatch batch) {
    // draw editor simple shapes
    gizmo.begin(ShapeRenderer.ShapeType.Line);

    // draw-up the editor props
    for (PropSerialized prop : propHolder.props) {
        // draw-up the prop bounds
        prop.draw(gizmo);

        // draw the prop indicator
        if (nearly == prop || selected == prop) {
            gizmo.setColor(Color.RED);
        } else {
            gizmo.setColor(Color.PINK);
        }
        gizmo.circle(prop.position.x, prop.position.y, 16.f);
    }
    gizmo.end();

    // draw-up the props names
    batch.begin();
    font.setColor(Color.WHITE);
    font.setScale(Game.mainCamera.zoom);
    for (PropSerialized prop : propHolder.props) {
        // fetch for prop name
        String name = prop.getClass().getSimpleName() + ": " + prop.id;

        // layer name
        switch (prop.layer) {
        case 1:
            name += " (ACTION_1)";
            break;
        case 2:
            name += " (ACTION_2)";
            break;
        case 3:
            name += " (ACTION_3)";
            break;
        case 4:
            name += " (FOREGROUND)";
            break;
        case 5:
            name += " (GUI)";
            break;
        case 6:
            name += " (DEBUG)";
            break;
        default:
            name += " (BACKGROUND)";
        }

        // text bounds
        BitmapFont.TextBounds bounds = font.getBounds(name);

        // draw-up the prop name
        font.draw(batch, name, prop.position.x - bounds.width / 2, prop.position.y + bounds.height + 24.f);
    }
    font.setScale(1);
    batch.end();
}