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

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

Introduction

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

Prototype

Color RED

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

Click Source Link

Usage

From source file:com.thetruthbeyond.gui.objects.tabs.overtabs.wildcards.FullWildcardsTab.java

License:Open Source License

@Override
protected void initializeCards() {
    cards = new Wildcard[] { new StarCard("(wildcard)", Color.RED),
            new RecursionCard("(recursion)", Color.RED).setIndex(0), new StarCard("(wildcard)", Color.BLUE),
            new RecursionCard("(recursion)", Color.BLUE).setIndex(1),
            new ConditionCard("(condition)", Color.RED).setIndex(0),
            new RecursionCard("(recursion)", Color.GOLDENROD).setIndex(2),
            new ConditionCard("(condition)", Color.BLUE).setIndex(1),
            new RandomCard("(random)", Color.MAGENTA) };
}

From source file:com.thetruthbeyond.gui.objects.tabs.overtabs.wildcards.StarWildcardsTab.java

License:Open Source License

@Override
protected void initializeCards() {
    cards = new Wildcard[] { new StarCard("(wildcard)", Color.RED), new StarCard("(wildcard)", Color.BLUE), };
}

From source file:com.todoroo.zxzx.general.SimpleButton.java

License:Apache License

public void draw(SpriteBatch spriteBatch) {
    Color oldColor = font.getColor();
    if (down) {/*from   www  .j  a  v a  2 s . com*/
        spriteBatch.setColor(Color.RED);
    } else {
        spriteBatch.setColor(Color.BLUE);
    }
    spriteBatch.setColor(Color.WHITE);
    if (down) {
        font.setColor(oldColor.r / 2, oldColor.g / 2, oldColor.b / 2, oldColor.a);
    }
    float textX = x;
    float textY = y + h;
    textY -= (h - textHeight) / 2;
    font.drawWrapped(spriteBatch, text, textX, textY, w, alignment);
    font.setColor(oldColor);
}

From source file:com.torrosoft.sopistan.SopistanMain.java

License:Open Source License

@Override
public void render() {

    if (istate == 5)
        return;/*from  w ww  .  j a va  2s . c  o  m*/

    batch.begin();

    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
    cam.update();
    batch.setProjectionMatrix(cam.combined);

    Gdx.gl.glEnable(GL20.GL_BLEND);
    Gdx.gl.glBlendFunc(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA);
    tex.bind();

    // the end cap scale
    tris.setEndCap(5F);

    // the thickness of the line
    tris.setThickness(30F);

    // generate the triangle strip from our path
    tris.update(swipe.getPath());

    // the vertex color for tinting, i.e. for opacity
    tris.setColor(Color.RED);

    // render the triangles to the screen
    tris.draw(cam);

    int idx = 0;
    for (int y = 0; y < Position.MAX_Y; y++) {
        for (int x = 0; x < Position.MAX_X; x++) {
            ((Sprite) group_sprites.get(idx)).draw(batch);
            idx++;
        }
    }

    // uncomment to see debug lines
    //drawDebug();
    batch.end();

    istate = 1;
}

From source file:com.torrosoft.sopistan.SopistanMain.java

License:Open Source License

void drawDebug() {
    Array<Vector2> input = swipe.getInput();

    // draw the raw input
    shapes.begin(ShapeType.Line);
    shapes.setColor(Color.GRAY);/* w ww.ja v a2 s.co m*/
    for (int i = 0; i < input.size - 1; i++) {
        Vector2 p = input.get(i);
        Vector2 p2 = input.get(i + 1);
        shapes.line(p.x, p.y, p2.x, p2.y);
    }
    shapes.end();

    // draw the smoothed and simplified path
    shapes.begin(ShapeType.Line);
    shapes.setColor(Color.RED);

    Array<Vector2> out = swipe.getPath();
    for (int i = 0; i < out.size - 1; i++) {
        Vector2 p = out.get(i);
        Vector2 p2 = out.get(i + 1);
        shapes.line(p.x, p.y, p2.x, p2.y);
    }

    shapes.end();

    // render our perpendiculars
    shapes.begin(ShapeType.Line);
    Vector2 perp = new Vector2();

    for (int i = 1; i < input.size - 1; i++) {
        Vector2 p = input.get(i);
        Vector2 p2 = input.get(i + 1);

        shapes.setColor(Color.LIGHT_GRAY);
        perp.set(p).sub(p2).nor();
        perp.set(perp.y, -perp.x);
        perp.scl(10f);
        shapes.line(p.x, p.y, p.x + perp.x, p.y + perp.y);
        perp.scl(-1f);
        shapes.setColor(Color.BLUE);
        shapes.line(p.x, p.y, p.x + perp.x, p.y + perp.y);
    }

    shapes.end();
}

From source file:com.trgk.touchwave.menuscene.RankingLoadScene.java

License:Open Source License

public void postErrorMsg(String string, int line) {
    TGText fbErrorMsg = new TGText(string, 2.8f, 0, 0, Color.RED);
    fbErrorMsg.setOrigin(Align.topLeft);
    fbErrorMsg.setPosition(1, 61 - 3 * line, Align.topLeft);
    parent.rankingWindow.addActor(fbErrorMsg);
}

From source file:com.trueMagic.textureGeneration.TextureGenerator.java

public static Texture projectile(int x, int y) {
    Pixmap pixmap = new Pixmap(x, y, Pixmap.Format.RGBA8888);
    pixmap.setColor(Color.RED);
    pixmap.fill();//from w w  w. ja  v a  2s . c o m
    return new Texture(pixmap);
}

From source file:com.trueMagic.world.TrueMagicWorld.java

public void draw(Batch batch, ShapeRenderer shapeRenderer) {
    shapeRenderer.begin(ShapeRenderer.ShapeType.Filled);
    shapeRenderer.setColor(Color.RED);
    int xMax = enviromentPoints.xBound();
    int yMax = enviromentPoints.yBound();
    for (int x = 0; x < xMax; x++) {
        for (int y = 0; y < yMax; y++) {
            EnviromentPoint point = (EnviromentPoint) enviromentPoints.getIndex(x, y);
            if (point != null) {
                float centerX = point.x * 64;
                float centerY = point.y * 64;
                //shapeRenderer.rect(centerX - 1, centerY - 1, 2, 2);
                //shapeRenderer.circle(centerX, centerY, 1);
            }/*w w w  . j a  v  a 2s  .  co  m*/
        }
    }
    shapeRenderer.end();

    Body body = physicsWorld.getBodyList();
    do {
        ((GameObject) body.getUserData()).draw(batch, shapeRenderer);
    } while ((body = body.getNext()) != null);
}

From source file:com.xemplar.games.android.nerdshooter.screens.DownloadScreen.java

License:Open Source License

public void render(float delta) {
    Gdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1);
    Gdx.gl.glClear(GL_COLOR_BUFFER_BIT);

    if (ready) {// w w w  .j  av a  2 s . c o m
        System.out.println("Levels Creation Started");
        Array<String> down = StartScreen.getPackList();

        int length = dat.length();

        worlds = new Button[length];
        for (int i = 0; i < dat.length(); i++) {
            JSONObject current = null;
            String name = null;

            try {
                current = dat.getJSONObject(i);
                name = current.getString("name");
            } catch (Exception e) {
                e.printStackTrace();
            }

            boolean downd = false;
            for (String s : down) {
                downd |= s.equals(name);
            }

            float w = (buttonWidth * 2F) / 3F - spacer;
            float x = lbl.x + (i / 3) * (w + spacer);
            float y = lbl.y - ((i % 3) + 1) * (buttonHeight + spacer);
            worlds[i] = new Button(NerdShooter.label_small, NerdShooter.button, name, x, y, w, buttonHeight);
            worlds[i].setActionNumber(100000 + current.getInt("id"));
            worlds[i].setPressedColor(downd ? Color.RED : Color.BLUE);
            worlds[i].setNotPressedColor(downd ? Color.GREEN : Color.GRAY);
            views.add(worlds[i]);
        }
        ready = false;
    }

    buttonRenderer.begin();
    {
        for (View view : views) {
            view.render(buttonRenderer);
        }
    }
    buttonRenderer.end();
}

From source file:com.ygames.game.Level.java

public Level(final GameScreen g, Game ga) {
    game = g;/*from  w w w .ja v  a 2 s  .  co  m*/
    gam = ga;
    player = new Player(game, ga);
    Lines = new ArrayList();
    TileMap = new ArrayList();
    Hopper = new ArrayList();
    Follower = new ArrayList();
    Coins = new ArrayList();
    Flyers = new ArrayList();
    rock = new Animation();
    tile_1 = new Animation();
    Enemies = new ArrayList();
    Boss = new ArrayList();
    Projectiles = new ArrayList();

    Invisible = new Animation();
    player_idle = new Animation();
    player_idle2 = new Animation();
    walk = new Animation();
    enemy = new Animation();
    exitTile = new Animation();
    hopper = new Animation();
    follower = new Animation();
    coin = new Animation();
    flyer = new Animation();
    Heal = new Animation();
    jump = new Animation();
    jump1 = new Animation();
    walkL = new Animation();
    Cement = new Animation();
    tile_2 = new Animation();
    boss1 = new Animation();
    boss2 = new Animation();
    Mud = new Animation();
    Spike = new Animation();
    Grass = new Animation();
    Crystal = new Animation();
    Tile6 = new Animation();
    Ladder = new Animation();
    Climb = new Animation();
    Fboss1 = new Animation();
    Fboss2 = new Animation();
    Projectile = new Animation();
    Health = new Animation();
    score = gam.getScore();

    coins = 0;
    gam.font.setColor(Color.RED);
}