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

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

Introduction

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

Prototype

Color DARK_GRAY

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

Click Source Link

Usage

From source file:tilo.modules.graphics.java

License:Open Source License

public Color color(String name) {
    if (name.startsWith("#"))
        return Color.valueOf(name.replace("#", ""));
    if ("clear".equalsIgnoreCase(name))
        return Color.CLEAR;
    else if ("white".equalsIgnoreCase(name))
        return Color.WHITE;
    else if ("black".equalsIgnoreCase(name))
        return Color.BLACK;
    else if ("red".equalsIgnoreCase(name))
        return Color.RED;
    else if ("green".equalsIgnoreCase(name))
        return Color.GREEN;
    else if ("blue".equalsIgnoreCase(name))
        return Color.BLUE;
    else if ("lightgray".equalsIgnoreCase(name))
        return Color.LIGHT_GRAY;
    else if ("gray".equalsIgnoreCase(name))
        return Color.GRAY;
    else if ("darkgray".equalsIgnoreCase(name))
        return Color.DARK_GRAY;
    else if ("pink".equalsIgnoreCase(name))
        return Color.PINK;
    else if ("orange".equalsIgnoreCase(name))
        return Color.ORANGE;
    else if ("yellow".equalsIgnoreCase(name))
        return Color.YELLOW;
    else if ("magenta".equalsIgnoreCase(name))
        return Color.MAGENTA;
    else if ("cyan".equalsIgnoreCase(name))
        return Color.CYAN;
    return Color.CLEAR;
}

From source file:wg.games.warp.systems.spawning.DefaultDataMapper.java

/** All default values for every spawnable entity are inserted here. */
private void initDataMap() {
    entityDataMap.put(EntityType.INTRO_LOADING_BAR_BACK,
            new EntityData(archetypes.coloredHudBackground)
                    .add(new PositionComponent(centered(LOADING_BAR_WIDTH), LOADING_BAR_Y_POSITION))
                    .add(new SizeComponent(LOADING_BAR_WIDTH, LOADING_BAR_HEIGHT))
                    .add(new TextureComponent("blank.png")).add(new ColorComponent(Color.DARK_GRAY)));
    entityDataMap.put(EntityType.INTRO_LOADING_BAR_FRONT,
            new EntityData(archetypes.loadingBar)
                    .add(new PositionComponent(centered(LOADING_BAR_WIDTH) + LOADING_BAR_EDGE,
                            LOADING_BAR_Y_POSITION + LOADING_BAR_EDGE))
                    .add(new SizeComponent(LOADING_BAR_WIDTH - 2 * LOADING_BAR_EDGE,
                            LOADING_BAR_HEIGHT - 2 * LOADING_BAR_EDGE))
                    .add(new TextureComponent("blank.png")));
    entityDataMap.put(EntityType.MENU_BUTTON_TO_LOAD_GAME,
            new EntityData(archetypes.menuButton)
                    .add(new PositionComponent(centered(MENU_BUTTON_WIDTH),
                            MENU_BUTTON_Y_POSITION + 2 * (MENU_BUTTON_Y_GAP + MENU_BUTTON_HEIGHT)))
                    .add(new SizeComponent(MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT))
                    .add(new TextureComponent("menuButtonGame.png")));
    entityDataMap.put(EntityType.MENU_BUTTON_TO_MAP_MAKER,
            new EntityData(archetypes.menuButton)
                    .add(new PositionComponent(centered(MENU_BUTTON_WIDTH),
                            MENU_BUTTON_Y_POSITION + MENU_BUTTON_Y_GAP + MENU_BUTTON_HEIGHT))
                    .add(new SizeComponent(MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT))
                    .add(new TextureComponent("menuButtonLevelSelect.png")));
    entityDataMap.put(EntityType.MENU_BUTTON_EXIT,
            new EntityData(archetypes.menuButton)
                    .add(new PositionComponent(centered(MENU_BUTTON_WIDTH), MENU_BUTTON_Y_POSITION))
                    .add(new SizeComponent(MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT))
                    .add(new TextureComponent("menuButtonExit.png")));
}