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:ateamproject.kezuino.com.github.render.screens.LobbyListScreen.java

public void fillHostTable() {
    this.scrollTable.clear();

    // table headers
    TextField lb1 = new TextField("Lobby naam", skin);
    lb1.setDisabled(true);//www. j  av  a  2s . co  m
    TextField lb2 = new TextField("Host", skin);
    lb2.setDisabled(true);
    TextField lb3 = new TextField("Deelnemers", skin);
    lb3.setDisabled(true);

    lb3.setStyle(new TextField.TextFieldStyle(lb3.getStyle().font, Color.PINK, lb3.getStyle().cursor,
            lb3.getStyle().selection, lb3.getStyle().background));

    // add headers to table
    scrollTable.add(lb1);
    scrollTable.columnDefaults(0);
    scrollTable.add(lb2);
    scrollTable.columnDefaults(1);
    scrollTable.add(lb3);
    scrollTable.columnDefaults(2);
    scrollTable.row();

    List<PacketGetLobbies.GetLobbiesData> hostList;

    Client client = Client.getInstance();
    PacketGetLobbies packet = new PacketGetLobbies(this.clanGame, client.getId());
    client.send(packet);
    hostList = packet.getResult();

    if (hostList != null && !hostList.isEmpty()) {
        for (PacketGetLobbies.GetLobbiesData game : hostList) {
            TextField lbName = new TextField(game.name, skin);
            lbName.setDisabled(true);
            TextField lbNameHost = new TextField(game.hostName, skin);
            lbNameHost.setDisabled(true);
            TextField lbAmountMembers = new TextField(Integer.toString(game.membersCount), skin);
            lbAmountMembers.setDisabled(true);
            TextButton btnJoin = new TextButton("Join", skin);
            btnJoin.addListener(new ClickListener() {
                @Override
                public void clicked(InputEvent event, float x, float y) {
                    LobbyListScreen.this.game
                            .setScreen(new LobbyScreen(LobbyListScreen.this.game, game.lobbyId));
                }
            });

            btnJoin.setDisabled(true);

            scrollTable.add(lbName);
            scrollTable.columnDefaults(0);
            scrollTable.add(lbNameHost);
            scrollTable.columnDefaults(1);
            scrollTable.add(lbAmountMembers);
            scrollTable.columnDefaults(2);
            scrollTable.add(btnJoin);
            scrollTable.columnDefaults(3);

            scrollTable.row();
        }
    }
}

From source file:CB_UI.RouteOverlay.java

License:Open Source License

private static void initialColorField() {
    ColorField[0] = Color.RED;/*from www  .  j a  v a  2  s . co m*/
    ColorField[1] = Color.YELLOW;
    ColorField[2] = Color.BLACK;
    ColorField[3] = Color.LIGHT_GRAY;
    ColorField[4] = Color.GREEN;
    ColorField[5] = Color.BLUE;
    ColorField[6] = Color.CYAN;
    ColorField[7] = Color.GRAY;
    ColorField[8] = Color.MAGENTA;
    ColorField[9] = Color.ORANGE;
    ColorField[10] = Color.DARK_GRAY;
    ColorField[11] = Color.PINK;
    ColorField[12] = Color.WHITE;
}

From source file:com.github.ykrasik.jerminal.libgdx.impl.LibGdxTerminal.java

License:Apache License

private Color translateColor(TerminalColor color) {
    switch (color) {
    case BLACK:/*from  w  ww.  jav a 2  s . c o  m*/
        return Color.BLACK;
    case WHITE:
        return Color.WHITE;
    case GRAY:
        return Color.DARK_GRAY;
    case RED:
        return Color.PINK;
    case ORANGE:
        return Color.ORANGE;
    case YELLOW:
        return Color.YELLOW;
    case GREEN:
        return Color.GREEN;
    case BLUE:
        return BLUE;
    case VIOLET:
        return Color.MAGENTA;
    default:
        throw new IllegalArgumentException("Invalid color: " + color);
    }
}

From source file:de.r2soft.empires.client.screens.gameplay.HexMapScreen.java

License:Open Source License

private void selectionBox() {
    Table table = new Table(Assets.R2_UI_SKIN);
    table.setPosition(Values.HEX_MAP_BASE_OFFSET.x + Values.HEX_MAP_BASE_SIZE.x + Values.R2_UI_PIXEL_PAD_SMALL,
            Values.HEX_MAP_BASE_OFFSET.y);
    table.setSize(300f, 200f);//  www  . j a  v a  2s.  com
    table.setBackground("default-window");

    table.add(new Label("Owner: ", Assets.R2_UI_SKIN)).left().padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.add(systemOwner = new Label("Null", Assets.R2_UI_SKIN)).prefWidth(999)
            .padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.row();
    table.add(new Label("Size: ", Assets.R2_UI_SKIN)).expandX().left().padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.add(systemSize = new Label("Null", Assets.R2_UI_SKIN)).prefWidth(999)
            .padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.row();
    table.add(new Label("Coordinates: ", Assets.R2_UI_SKIN)).left().padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.add(systemPos = new Label("NaN - NaN", Assets.R2_UI_SKIN)).prefWidth(999)
            .padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.row();
    table.add(new Label("Units: ", Assets.R2_UI_SKIN)).left().padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.add(systemPopulation = new Label("NaN", Assets.R2_UI_SKIN)).prefWidth(999)
            .padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.row();
    table.add(new Label("Exploration: ", Assets.R2_UI_SKIN)).left().padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.add(systemExploration = new Label("NaN", Assets.R2_UI_SKIN)).prefWidth(999)
            .padLeft(Values.R2_UI_PIXEL_PAD_TINY);
    table.row();
    table.add(enterSystem).width(Values.SIZE_UI_FIELD_CONTENT).colspan(2);

    Label title = new Label("Currently selected Solarsystem", Assets.R2_UI_SKIN);
    title.setColor(Color.PINK);
    Table nested = new Table(Assets.R2_UI_SKIN);
    nested.align(Align.center);
    nested.setPosition(Values.HEX_MAP_BASE_OFFSET.x + Values.HEX_MAP_BASE_SIZE.x + Values.R2_UI_PIXEL_PAD_SMALL,
            Values.HEX_MAP_BASE_OFFSET.y + (table.getHeight() / 2) - (title.getHeight() / 2) + 3f);
    nested.setSize(300f, 200f);
    nested.add(title).top();

    stage.addActor(table);
    stage.addActor(nested);
}

From source file:es.eucm.ead.editor.view.ui.effects.GoSceneWidget.java

License:Open Source License

@Override
protected Color getBackgroundColor() {
    return Color.PINK;
}

From source file:es.eucm.ead.engine.components.renderers.shape.ShapeToPixmap.java

License:Open Source License

/**
 * Reads the paint and sets the proper values before the fill phase
 * /*from  w  ww .j a  va  2 s. c  o m*/
 * @param paint
 *            the string representing the paint. <a href=
 *            "https://github.com/e-ucm/ead/wiki/Renderers#shapes">More info
 *            about paint format</a>
 */
private void readPaint(String paint) {
    try {
        String parts[] = paint.split(borderSeparator);
        // Fill
        useGradient = parts[0].contains(gradientSeparator);
        if (useGradient) {
            String gradientParts[] = parts[0].split(gradientSeparator);
            color1 = Color.valueOf(gradientParts[0]);
            color2 = Color.valueOf(gradientParts[1]);
            x0 = Float.parseFloat(gradientParts[2]);
            y0 = Float.parseFloat(gradientParts[3]);
            float x1 = Float.parseFloat(gradientParts[4]);
            float y1 = Float.parseFloat(gradientParts[5]);
            gradientVector = new Vector2(x1 - x0, y1 - y0);
            gradientLength = gradientVector.len();
        } else {
            color1 = Color.valueOf(parts[0]);
        }

        // Border
        hasBorder = parts.length > 1;
        if (hasBorder) {
            borderColor = Color.valueOf(parts[1]);
        }
    } catch (Exception e) {
        hasBorder = false;
        useGradient = false;
        color1 = Color.PINK;
        Gdx.app.error("ShapeFactory", "Invalid paint " + paint + ". Paint set to pink.", e);
    }
}

From source file:logic.genetics.GeneticFitness.java

public static Weapon selectDad(ArrayList<Weapon> candidates) {
    try {/*from  w  w  w . jav a 2 s .  c om*/
        if (!candidates.isEmpty()) {

            Random random = new Random();
            Weapon weapon = candidates.get(Math.abs((random.nextInt())) % (candidates.size()));
            int position;
            for (int chances = 0; chances < PICK_CHANCES; chances++) {
                position = Math.abs((random.nextInt())) % (candidates.size());
                if (weapon.getLaneRange() < candidates.get(position).getLaneRange())
                    weapon = candidates.get(position);
            }
            return weapon;

        }
        System.out.println("Lista vacia, se evito divicion por 0 y se retorno nueva arma");
        return Weapon.randomWeapon(); //Esto en teoria nunca va a pasar. Pero en tal caso esta protegido.

    } catch (Exception e) {
        System.out.println(e.toString());
        return new Weapon(Color.PINK, Math.abs(new Random().nextLong()));
    }
}

From source file:logic.genetics.WeaponLogic.java

public Weapon newWeapon(Weapon pLastWeapon) { //Se llama esta funcion unicamente cuando agarra una nueva arma,
                                              //Aqui e agrega una nueva arma a la lista y luego de la lista se escoge
                                              //el padre con el cual cruar el arma actual.
    try {/*from  w  w  w. ja  va2 s.  com*/
        addWeaponToList();
        Weapon dadWeapon = GeneticFitness.selectDad(_LastWeapons);
        long sonGenetics = GeneticOperator.crossGenetics(dadWeapon.getBinaryIdentifier(),
                pLastWeapon.getBinaryIdentifier());
        Weapon sonWeapon = longToWeapon(sonGenetics);

        return sonWeapon;
    } catch (Exception e) {
        System.out.println(e.toString());
        return new Weapon(Color.PINK, Math.abs(new Random().nextLong()));
    }
}

From source file:logic.genetics.WeaponLogic.java

public static Weapon longToWeapon(long binary) {
    try {// w w  w.  ja  v a 2  s  .  com
        long copy = binary;

        int rango = number(binary, 2);
        binary = binary >>> 2;
        int vertices = number(binary, 2);
        binary = binary >>> 2;
        int x1 = number(binary, 3);
        binary = binary >>> 3;
        int y1 = number(binary, 3);
        binary = binary >>> 3;
        int x2 = number(binary, 3);
        binary = binary >>> 3;
        int y2 = number(binary, 3);
        binary = binary >>> 3;
        int x3 = number(binary, 3);
        binary = binary >>> 3;
        int y3 = number(binary, 3);
        binary = binary >>> 3;
        int x4 = number(binary, 3);
        binary = binary >>> 3;
        int y4 = number(binary, 3);
        binary = binary >>> 3;
        int x5 = number(binary, 3);
        binary = binary >>> 3;
        int y5 = number(binary, 3);
        binary = binary >>> 3;
        int ancho = number(binary, 4);
        binary = binary >>> 4;
        int numColor = number(binary, 24);

        Polygon polygon = new Polygon();
        Color color = new Color(numColor);

        Weapon weapon = new Weapon();
        weapon.setLaneRange(rango);
        weapon.setShootingShape(null);
        weapon.setBeamThickness(ancho);
        weapon.setColor(color);
        weapon.setBinaryIdentifier(copy);

        return weapon;
    } catch (Exception e) {
        System.out.println(e.toString());
        return new Weapon(Color.PINK, Math.abs(new Random().nextLong()));
    }
}

From source file:mobi.shad.s3lib.gfx.pixmap.filter.Gradient.java

License:Apache License

/**
 * @param pixmap//from  w  w w .ja  v  a  2  s .  com
 */
@Override
public void generate(final Pixmap pixmap) {
    generate(pixmap, Color.RED, Color.YELLOW, Color.BLUE, Color.PINK, 1.0f);
}