當前位置: 首頁>>代碼示例>>Java>>正文


Java Color.DARK_GRAY屬性代碼示例

本文整理匯總了Java中com.badlogic.gdx.graphics.Color.DARK_GRAY屬性的典型用法代碼示例。如果您正苦於以下問題:Java Color.DARK_GRAY屬性的具體用法?Java Color.DARK_GRAY怎麽用?Java Color.DARK_GRAY使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.badlogic.gdx.graphics.Color的用法示例。


在下文中一共展示了Color.DARK_GRAY屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: draw

@Override
public void draw(Batch batch, float parentAlpha) {
    Color color = getColor();
    if (hidden) {
        color = Color.DARK_GRAY;
    } else if (selected) {
        color = Assets.select(color);
    } else if (hovered) {
        color = Assets.highlight(color);
    }

    batch.setColor(color.r, color.g, color.b, color.a * parentAlpha);
    if (hidden) {
        batch.draw(Assets.FOGGY, getX(), getY(), getWidth(), getHeight());
    } else {
        batch.draw(texture, getX(), getY(), getWidth(), getHeight());
    }

    if (city != null) {
        city.draw(batch, parentAlpha);
    }
}
 
開發者ID:conquest,項目名稱:conquest,代碼行數:22,代碼來源:Tile.java

示例2: renderGender

/**
 * Zeigt den Geschlechtsauswahl Bildschirm an
 *
 * @param camera die aktuelle Kamera
 */
public void renderGender(OrthographicCamera camera)
{
    Color maleColor;
    Color femaleColor;

    if (stateSwitch)
    {
        maleColor = Color.GREEN;
        femaleColor = Color.DARK_GRAY;
    } else {
        maleColor = Color.DARK_GRAY;
        femaleColor = Color.GREEN;
    }

    fontLayout.setText(font, localeBundle.get("geschlecht"), Color.WHITE, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 120);

    fontLayout.setText(font, localeBundle.get("frau"), femaleColor, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, 30);

    fontLayout.setText(font, localeBundle.get("mann"), maleColor, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, -30);

    fontLayout.setText(smallFont, localeBundle.get("enter_bestaetigen"), Color.WHITE, camera.viewportWidth, Align.center, false);
    smallFont.draw(batch, fontLayout, -camera.viewportWidth / 2, -camera.viewportHeight / 2 + 70);
}
 
開發者ID:Entwicklerpages,項目名稱:school-game,代碼行數:31,代碼來源:CreateGameSlot.java

示例3: renderTutorial

/**
 * Zeigt den Tutorial-Wahl Bildschirm an
 *
 * @param camera die aktuelle Kamera
 */
public void renderTutorial(OrthographicCamera camera)
{
    Color yesColor;
    Color noColor;

    if (stateSwitch)
    {
        yesColor = Color.GREEN;
        noColor = Color.DARK_GRAY;
    } else {
        yesColor = Color.DARK_GRAY;
        noColor = Color.GREEN;
    }

    fontLayout.setText(font, localeBundle.get("tutorial1"), Color.WHITE, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 120);
    fontLayout.setText(font, localeBundle.get("tutorial2"), Color.WHITE, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, camera.viewportHeight / 2 - 185);

    fontLayout.setText(font, localeBundle.get("ja"), yesColor, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, 30);

    fontLayout.setText(font, localeBundle.get("nein"), noColor, camera.viewportWidth, Align.center, false);
    font.draw(batch, fontLayout, -camera.viewportWidth / 2, -30);

    fontLayout.setText(smallFont, localeBundle.get("enter_bestaetigen"), Color.WHITE, camera.viewportWidth, Align.center, false);
    smallFont.draw(batch, fontLayout, -camera.viewportWidth / 2, -camera.viewportHeight / 2 + 70);
}
 
開發者ID:Entwicklerpages,項目名稱:school-game,代碼行數:33,代碼來源:CreateGameSlot.java

示例4: GameScene

public GameScene(SceneData sceneData) {
    super(SceneNames.GAME_SCENE, Color.DARK_GRAY);
    this.sceneData = sceneData;
    this.data = sceneData.getGameData();

}
 
開發者ID:cpppwner,項目名稱:NoRiskNoFun,代碼行數:6,代碼來源:GameScene.java


注:本文中的com.badlogic.gdx.graphics.Color.DARK_GRAY屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。