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

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

Introduction

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

Prototype

Color MAGENTA

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

Click Source Link

Usage

From source file:com.thetruthbeyond.botmaker.gui.tabs.teachtab.RandomTab.java

License:Open Source License

@Override
@SuppressWarnings("MethodMayBeStatic")
public Wildcard getWildcard() {
    return new RandomCard("(random)", Color.MAGENTA);
}

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:de.r2soft.empires.client.screens.gameplay.SolMapScreen.java

License:Open Source License

private void initLeftPanel() {
    /** Initialize the solar system info table */
    systemInfo = new Table();
    systemInfo.setFillParent(true);//from w w w .j  av  a2s .  com
    systemInfo.center().right();
    systemInfo.setX(-50);
    systemInfo.setY(175);

    Label tempLabel1, tempLabel2;

    tempLabel1 = new Label("Object Type", Assets.R2_UI_SKIN);
    tempLabel1.setColor(Color.MAGENTA);

    tempLabel2 = new Label("Information", Assets.R2_UI_SKIN);
    tempLabel2.setColor(Color.MAGENTA);

    systemInfo.add(tempLabel1);
    systemInfo.add(tempLabel2);
    systemInfo.row();
    systemInfo.add(new Label("Owner: ", Assets.R2_UI_SKIN));
    systemInfo.add(new Label("KateTheAwesome", Assets.R2_UI_SKIN));
    systemInfo.row();
    systemInfo.add(new Label("Size: ", Assets.R2_UI_SKIN));
    systemInfo.add(new Label("Something", Assets.R2_UI_SKIN));
    systemInfo.row();
    systemInfo.add(new Label("Coordinates: ", Assets.R2_UI_SKIN));
    systemInfo.add(new Label("545-101", Assets.R2_UI_SKIN));
    systemInfo.row();
    systemInfo.add(new Label("Units: ", Assets.R2_UI_SKIN));
    systemInfo.add(new Label("42", Assets.R2_UI_SKIN));
    systemInfo.row();
    systemInfo.add(new Label("Exploration: ", Assets.R2_UI_SKIN));
    systemInfo.add(new Label("100%", Assets.R2_UI_SKIN));
    systemInfo.row();

    stage.addActor(systemInfo);
}

From source file:gameengine.GameEngine.java

private void draw() {

    for (Entity e : world.getEntities(PLAYER, SPELL, ENEMY)) {
        sr.setColor(Color.MAGENTA);
        sr.begin(ShapeType.Line);

        if (e.getType() == SPELL) {
            sr.circle(e.get(Position.class).getX(), e.get(Position.class).getY(),
                    e.get(Body.class).getWidth() / 2);
        } else {/*from ww w.j a  v a  2  s  .c  o m*/
            sr.rect(e.get(Position.class).getX(), e.get(Position.class).getY(), e.get(Body.class).getWidth(),
                    e.get(Body.class).getHeight());

        }
        sr.setProjectionMatrix(camera.combined);
        sr.end();
    }

    healthBarManager.drawHealthBar(sr, world, camera);

    for (Entity e : world.getEntities(PLAYER, ENEMY)) {
        Position p = e.get(Position.class);
        Image image = e.get(Image.class);
        if (assetManager.isLoaded(image.getImageFilePath(), Texture.class)) {

            if (!image.isRepeat()) {
                spriteBatch.setProjectionMatrix(camera.combined);
                spriteBatch.begin();
                spriteBatch.draw(animator.getFrame(e), p.getX(), p.getY());
                spriteBatch.end();
            }
        }
    }
    for (Entity e : world.getEntities(SPELL)) {
        Position p = e.get(Position.class);
        Image image = e.get(Image.class);
        if (assetManager.isLoaded(image.getImageFilePath(), Texture.class)) {

            animator.initializeSpell(assetManager.get(image.getImageFilePath(), Texture.class), e);
            if (image.isRepeat()) {
                spriteBatch.setProjectionMatrix(camera.combined);
                spriteBatch.begin();
                if (e.get(SpellInfos.class).getSpellType() != TELEPORT1
                        && e.get(SpellInfos.class).getSpellType() != TELEPORT2) {
                    spriteBatch.draw(animator.getSpellAnimation(e), p.getX(), p.getY(), 0,
                            animator.getSpellAnimation(e).getRegionHeight() / 2,
                            animator.getSpellAnimation(e).getRegionWidth(),
                            animator.getSpellAnimation(e).getRegionHeight(), 1, 1, e.getAngle());
                } else {
                    spriteBatch.draw(animator.getSpellAnimation(e), p.getX(), p.getY());
                }

                spriteBatch.end();
            }
        }

    }
}

From source file:GameObjects.BossEnemy.java

public void drawWeapon() {
    s.setColor(Color.GREEN);//from w  w  w. j  ava  2 s.co m
    aimedCircleWeapon.draw();
    s.setColor(Color.MAGENTA);
    playerWeapon.draw();
    s.setColor(Color.WHITE);
    for (int i = 0; i < circleWeapon.length; i++) {
        circleWeapon[i].draw();
    }
}

From source file:kyle.game.besiege.Faction.java

License:Open Source License

public static void initializeFactions(Kingdom kingdom) {
    factions = new Array<Faction>();

    factionRelations = new Array<Array<Integer>>();
    //      factionMilitaryAction = new Array<Array<Integer>>();

    // add player faction (index 0) 
    createFaction(PLAYER_FACTION);//from   w  ww. j av a 2s.com

    // add bandits faction (index 1)
    createFaction(BANDITS_FACTION);

    createFaction("Geinever", "crestWhiteLion", Color.DARK_GRAY);
    createFaction("Weyvel", "crestGreenTree", OLIVE);
    createFaction("Rolade", "crestOrangeCross", BROWN);
    createFaction("Myrnfar", "crestYellowStar", TAN);
    createFaction("Corson", "crestRedCross", RED);
    createFaction("Selven", "crestGreenStripe", GREEN);
    createFaction("Halmera", "crestBlueRose", BLUE);

    createFaction("Fernel", "crestBlank", Color.LIGHT_GRAY);
    createFaction("Draekal", "crestBlank", Color.MAGENTA);

    for (Faction f : factions) {
        f.kingdom = kingdom;
    }

    factions.get(2).declareWar(factions.get(3));

    //      factionRelations = new int[factionCount][factionCount];
    for (int i = 0; i < factionCount; i++) {
        for (int j = 0; j < factionCount; j++) {
            //            factionRelations[i][j] = -30;
            factionRelations.get(i).set(j, -30);
            factionRelations.get(j).set(i, -30);
        }
    }
    for (int i = 0; i < factionCount; i++) {
        //         factionRelations[i][i] = 100;
        factionRelations.get(i).set(i, 100);
    }
}

From source file:kyle.game.besiege.panels.BottomPanel.java

License:Open Source License

public static void log(String text, String color) {
    Color fontColor;//from   w  w  w. jav a2s  . c  om
    if (color == "red")
        fontColor = new Color(230 / 255f, 0, 15 / 255f, 1);
    else if (color == "orange")
        fontColor = new Color(1, 60 / 255f, 0, 1);
    else if (color == "yellow")
        fontColor = Color.YELLOW;
    else if (color == "cyan")
        fontColor = Color.CYAN;
    else if (color == "magenta")
        fontColor = Color.MAGENTA;
    else if (color == "white")
        fontColor = Color.WHITE;
    else if (color == "green")
        fontColor = Color.GREEN;
    else if (color == "blue")
        fontColor = new Color(0, 70 / 255f, 1, 1);
    else if (color == "purple")
        fontColor = new Color(168 / 255f, 0, 1, 1);
    else
        fontColor = Color.WHITE;

    LabelStyle lsNew = new LabelStyle(ls);
    lsNew.fontColor = fontColor;
    Label temp = new Label(text, lsNew); // Memory leak, should change to have 4 or 5 fixed colors so new one is not created everytime.
    logTable.row();
    logTable.add(temp);
    logging = 0;
    ls.fontColor = Color.WHITE;
}

From source file:mobi.shad.s3lib.gui.widget.HtmlView.java

License:Apache License

/**
 * @param node/*from  w  w w  . j  av  a  2  s.c  o m*/
 * @return
 */
private CssStyle parseCssStyle(final Element node) {
    final CssStyle style = new CssStyle();

    //
    // Color
    //
    String color = node.getAttribute("color", "");
    if (color.equalsIgnoreCase("yellow")) {
        style.color = Color.YELLOW;
    } else if (color.equalsIgnoreCase("red")) {
        style.color = Color.RED;
    } else if (color.equalsIgnoreCase("green")) {
        style.color = Color.GREEN;
    } else if (color.equalsIgnoreCase("cyan")) {
        style.color = Color.CYAN;
    } else if (color.equalsIgnoreCase("blue")) {
        style.color = Color.BLUE;
    } else if (color.equalsIgnoreCase("gray")) {
        style.color = Color.GRAY;
    } else if (color.equalsIgnoreCase("light_gray")) {
        style.color = Color.LIGHT_GRAY;
    } else if (color.equalsIgnoreCase("dark_gray")) {
        style.color = Color.DARK_GRAY;
    } else if (color.equalsIgnoreCase("orange")) {
        style.color = Color.ORANGE;
    } else if (color.equalsIgnoreCase("magenta")) {
        style.color = Color.MAGENTA;
    } else if (color.equalsIgnoreCase("pink")) {
        style.color = Color.PINK;
    }

    //
    // Align
    //
    String align = node.getAttribute("align", "");
    if (align.equalsIgnoreCase("right")) {
        style.align = Align.right;
    } else if (align.equalsIgnoreCase("left")) {
        style.align = Align.left;
    } else if (align.equalsIgnoreCase("center")) {
        style.align = Align.center;
    } else {
        style.align = Align.left;
    }

    //
    // Font
    //
    String font = node.getAttribute("font", "");
    //      if (font.equalsIgnoreCase("sans12")){
    //         style.font="sans12";
    //      } else if (font.equalsIgnoreCase("sans13")){
    //         style.font="sans13";
    //      } else if (font.equalsIgnoreCase("sans14")){
    //         style.font="sans14";
    //      } else if (font.equalsIgnoreCase("sans15")){
    //         style.font="sans15";
    //      } else if (font.equalsIgnoreCase("droid14")){
    //         style.font="droid14";
    //      } else if (font.equalsIgnoreCase("droid15")){
    //         style.font="droid15";
    //      } else if (font.equalsIgnoreCase("droid16")){
    //         style.font="droid16";
    //      } else if (font.equalsIgnoreCase("droid17")){
    //         style.font="droid17";
    //      } else if (font.equalsIgnoreCase("droid18")){
    //         style.font="droid18";
    //      } else if (font.equalsIgnoreCase("droid22")){
    //         style.font="droid22";
    //      } else if (font.equalsIgnoreCase("droid24")){
    //         style.font="droid24";
    //      }

    //
    // CollSpan
    //
    int collSpan = node.getIntAttribute("collspan", 1);
    if (collSpan > 1) {
        style.collSpan = collSpan;
    }

    return style;
}

From source file:net.k3rnel.unsealed.battle.BattleEntity.java

License:Open Source License

/**
 * @param status the status to set//from   w  w  w  .j  a va2 s  .c o m
 */
public void setStatus(int status) {
    this.status = status;
    switch (this.status) {
    case BattleEntity.statusNormal:
        break;
    case BattleEntity.statusBurned:
        actions =

                sequence(color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED),
                        delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.WHITE), run(new Runnable() {

                            @Override
                            public void run() {
                                setState(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusStunned:
        actions =

                sequence(color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f),
                        color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW),
                        delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f),
                        color(Color.ORANGE), delay(0.1f), color(Color.WHITE), delay(0.1f), run(new Runnable() {

                            @Override
                            public void run() {
                                setStatus(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusFrozen:
        this.status = statusStunned;
        actions =

                sequence(color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE),
                        delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f),
                        color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f),
                        color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() {
                            @Override
                            public void run() {
                                setHp(getHp() - 10);
                            }
                        }), color(Color.WHITE), run(new Runnable() {
                            @Override
                            public void run() {
                                setState(BattleEntity.statusNormal);
                            }
                        }));
        this.addAction(actions);
        break;
    case BattleEntity.statusPoisoned:
        actions = sequence(color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f),
                color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE),
                fadeIn(0.3f), run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }),

                color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA),
                delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f),
                run(new Runnable() {
                    @Override
                    public void run() {
                        setHp(getHp() - 5);
                    }
                }), color(Color.WHITE), run(new Runnable() {

                    @Override
                    public void run() {
                        setState(BattleEntity.statusNormal);
                    }
                }));
        this.getActions().clear();
        this.addAction(actions);
        break;
    }
}

From source file:net.k3rnel.unsealed.battle.magic.PoisonDart.java

License:Open Source License

/**
 * 0 = gray. 1 = blue. 2 = red. 3 = green.
 * @param color/* www  .  j  ava  2 s.c  o  m*/
 */
public PoisonDart(TextureAtlas atlas, int color, float speed, BattleEntity entity) {
    super(speed, 0, entity);
    AtlasRegion atlasRegion = atlas.findRegion("battle/entities/fireball");
    TextureRegion[][] spriteSheet = atlasRegion.split(34, 25);
    TextureRegion[] frames = new TextureRegion[3];
    frames[0] = spriteSheet[color][0];
    frames[1] = spriteSheet[color][1];
    frames[2] = spriteSheet[color][2];
    Animation attacking = new Animation(0.1f, frames);
    attacking.setPlayMode(Animation.LOOP);
    this.animations.put("attacking", attacking);
    this.setState(BattleEntity.stateAttacking);

    this.setHeight(30);
    this.setWidth(30);
    offsetX = (int) entity.getWidth() - 120;
    offsetY = 0;
    this.addAction(color(Color.MAGENTA));
    this.setGrid(entity.getGridXInt() - 1, entity.getGridYInt());
}