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


Java Color.BLUE屬性代碼示例

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


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

示例1: convertColor

private Color convertColor(CustomColor color) {
    switch(color) {
        case WHITE:
            return Color.WHITE;
            
        case BLACK:
            return Color.BLACK;
            
        case BLUE:
            return Color.BLUE;
            
        default:
            return Color.RED;
    }
}
 
開發者ID:hogeschool,項目名稱:INFSEN01-2,代碼行數:15,代碼來源:GDXDrawingAdapter.java

示例2: updateButton

@Override
public void updateButton(Button element, Float dt) {
    if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
        if (element.
                contains(new Point(
                        (float) Gdx.input.getX(),
                        (float) Gdx.input.getY()
                ))) {
            element.color = Color.BLUE;
            element.action.run();
        }
    } else {
        element.color = Color.WHITE;
    }
}
 
開發者ID:hogeschool,項目名稱:INFSEN01-2,代碼行數:15,代碼來源:DefaultUpdateVisitor.java

示例3: convertColor

private Color convertColor(CustomColor color) {
    switch (color) {
        case WHITE:
            return Color.WHITE;

        case BLACK:
            return Color.BLACK;

        case BLUE:
            return Color.BLUE;

        default:
            return Color.RED;
    }
}
 
開發者ID:hogeschool,項目名稱:INFSEN01-2,代碼行數:15,代碼來源:GDXDrawingAdapter.java

示例4: detcolor

public Color detcolor(int c){
    switch (c){
        case 1:{
            return Color.RED;
        }
        case 2:{
            return Color.BLUE;
        }
        case 3:{
            return Color.GREEN;
        }
    }
    return Color.BLACK;
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:14,代碼來源:ScreenChat.java

示例5: TutorialDialog

public TutorialDialog(GameManager gMaps){
    super("", new WindowStyle(new BitmapFont(false), Color.BLUE, new BaseDrawable()));
    this.gameManager = gMaps;
}
 
開發者ID:TudorRosca,項目名稱:enklave,代碼行數:4,代碼來源:TutorialDialog.java

示例6: ManaReplenishLabel

public ManaReplenishLabel(String message, GameObject source)
{
	super(message, source, Color.BLUE);
}
 
開發者ID:MMORPG-Prototype,項目名稱:MMORPG_Prototype,代碼行數:4,代碼來源:ManaReplenishLabel.java

示例7: init

private void init() {
	//開始界麵控件初始化
	mAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.START_SETTING);
	mRangeAtlas = MyGdxGame.assetManager.getTextureAtlas(Constant.RANGE_WIDGET);
	mStartBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("startBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("startBtnDown")));

	mSettingBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("settingBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("settingBtnDown")));
	mStartBtn.setSize(280, 100);
	mSettingBtn.setSize(280, 100);
	//輸入姓名對話框
	mInputnameDialog = new InputnameDialog(MyGdxGame.VIEW_WIDTH / 2, MyGdxGame.VIEW_HEIGHT / 2);
	//警告對話框
	mWarningDialog = new NameWarningDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	//開始界麵 - 排行榜
	mRangeBtn = new ImageButton(new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnUp")),
			new TextureRegionDrawable(mRangeAtlas.findRegion("rangeBtnDown")));
	mRangeBtn.setSize(280, 100);
	//初始化排行榜對話框
	mRangeDialog = new RankingDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	mStartBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 20, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 20);
	mRangeBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 100);
	mSettingBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);

	//設置界麵初始化 - 是否打開音效
	Drawable checkOn = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOn"));
	Drawable checkOff = new TextureRegionDrawable(mAtlas.findRegion("musicBtnOff"));
	CheckBox.CheckBoxStyle boxStyle = new CheckBox.CheckBoxStyle(checkOff, checkOn,
			MyGdxGame.assetManager.getFont(), Color.BLUE);
	mCheckBox = new CheckBox("", boxStyle);
	mCheckBox.setSize(255, 100);
	mCheckBox.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 38, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 40);
	if (isPlay) {
		mCheckBox.setChecked(true);
	} else {
		mCheckBox.setChecked(false);
	}

	//設置界麵初始化 - 關於我們
	mAboutBtn = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("aboutBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("aboutBtnDown")));
	mAboutBtn.setSize(280, 100);
	mAboutBtn.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 110);
	mAboutGameDialog = new AboutGameDialog(MyGdxGame.SCREEN_WIDTH / 2, MyGdxGame.SCREEN_HEIGHT / 2);

	//設置界麵初始化 - 返回按鈕
	mBackButton = new ImageButton(new TextureRegionDrawable(mAtlas.findRegion("backStartBtnUp")),
			new TextureRegionDrawable(mAtlas.findRegion("backStartBtnDown")));
	mBackButton.setSize(280, 100);
	mBackButton.setPosition(MyGdxGame.VIEW_WIDTH / 2 + 26, MyGdxGame.VIEW_HEIGHT / 2 - mStartBtn.getHeight() / 2 - 180);

	//背景音樂
	if (isPlay) {
		MyGdxGame.assetManager.getMusic(Constant.START_BGM).play();
	} else {
		MyGdxGame.assetManager.getMusic(Constant.START_BGM).pause();
	}

	//初始化監聽
	initListener();
}
 
開發者ID:heyzqt,項目名稱:libGdx-xiyou,代碼行數:64,代碼來源:Start.java


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