当前位置: 首页>>代码示例>>Java>>正文


Java Color.BLACK属性代码示例

本文整理汇总了Java中com.badlogic.gdx.graphics.Color.BLACK属性的典型用法代码示例。如果您正苦于以下问题:Java Color.BLACK属性的具体用法?Java Color.BLACK怎么用?Java Color.BLACK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.badlogic.gdx.graphics.Color的用法示例。


在下文中一共展示了Color.BLACK属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: MessageWindow

public MessageWindow(String message, BitmapFont font, float width, float height) {
    setTouchable(Touchable.enabled);
    setBounds(width / 2 - width / 4, height / 2 - height / 10, width / 2, height / 5);
    texture = new Texture("theme/basic/ui/Window.png");
    this.message = message;
    table = new Table();
    table.setSize(getWidth(), getHeight());
    table.align(Align.center | Align.top);
    table.setPosition(getX(), getY());
    Label label = new Label(message, new Label.LabelStyle(font, Color.BLACK));
    label.setWrap(true);
    label.setFontScale(0.7f);
    Label label2 = new Label("Tap to continue", new Label.LabelStyle(font, Color.BLACK));
    label2.setFontScale(0.6f);
    table.add(label).width(getWidth());
    table.row();
    table.add(label2).width(getWidth()).expandY();
    table.pad(0, 30, 0, 30);
}
 
开发者ID:justinmarentette11,项目名称:Tower-Defense-Galaxy,代码行数:19,代码来源:MessageWindow.java

示例2: ShopCard

ShopCard(final Klooni game, final GameLayout layout,
         final String itemName, final Color backgroundColor) {
    this.game = game;
    Label.LabelStyle labelStyle = new Label.LabelStyle();
    labelStyle.font = game.skin.getFont("font_small");

    priceLabel = new Label("", labelStyle);
    nameLabel = new Label(itemName, labelStyle);

    Color labelColor = Theme.shouldUseWhite(backgroundColor) ? Color.WHITE : Color.BLACK;
    priceLabel.setColor(labelColor);
    nameLabel.setColor(labelColor);

    priceBounds = new Rectangle();
    nameBounds = new Rectangle();

    layout.update(this);
}
 
开发者ID:LonamiWebs,项目名称:Klooni1010,代码行数:18,代码来源:ShopCard.java

示例3: TextActor

public TextActor(String string,Color color,float targetwidth,TextAlign align,float scaleXY ,float x ,float y) {
	// TODO Auto-generated constructor stub
	font = book.base_font; 
	text_string = string ;
	xpos = x; 
	ypos = y; 
	width = targetwidth ;
	 text_color = (color==null?Color.BLACK:color) ;
	 this.align = align;
	 scale = scaleXY;
	font.getData().setScale(scaleXY);
	//font.setColor(Color.BLUE);
	best_score_text_layout = new GlyphLayout(
			font,
			text_string,
			text_color,
			width,
			this.align == TextAlign.align_cinter?Align.center:(this.align==TextAlign.align_right?Align.right:Align.left),
					true);
	
}
 
开发者ID:omar6597,项目名称:alquran-alkarem,代码行数:21,代码来源:TextActor.java

示例4: getFont

public BitmapFont getFont() {
	if (font == null) {
		FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/VCROSDMono.ttf"));
		FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
		parameter.size = 35;
		parameter.borderWidth = 1;
		parameter.color = Color.BLACK;
		font = generator.generateFont(parameter);
		generator.dispose();
	}
	return font;
}
 
开发者ID:MartensCedric,项目名称:Hexpert,代码行数:12,代码来源:Hexpert.java

示例5: 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

示例6: 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

示例7: LogMenu

public LogMenu() {
  label = new Label("", new LabelStyle(Fonts.smallHUD, Color.BLACK));
  label.setWrap(true);
  Drawable background = new TextureRegionDrawable(Assets.getTextureRegion("core:hud/LogBackground.png"));
  scrollPane = new ScrollPane(label, new ScrollPaneStyle(background, null, null, null, null));
  scrollPane.setScrollingDisabled(true, false);
  back = MenuTools.getBackButton(this);
  
  stage.addActor(scrollPane);
  stage.addActor(back);
  
  refresh();
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:13,代码来源:LogMenu.java

示例8: 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

示例9: main

public static void main (String[] arg) {
	LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
	config.width = DEFAULT_SCREEN_SIZE;
	config.height = DEFAULT_SCREEN_SIZE;
	config.resizable = false;
	config.initialBackgroundColor = Color.BLACK;

       new LwjglApplication(new ParticleGame(), config);
}
 
开发者ID:treeman1111,项目名称:Particles,代码行数:9,代码来源:DesktopLauncher.java

示例10: generateLargeFont

private static void generateLargeFont(FreeTypeFontGenerator generator) {
    FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
    parameter.size = Constants.LARGE_FONT_SIZE;
    parameter.borderColor = Color.BLACK;
    parameter.color = new Color(0xff8a00ff);
    parameter.borderWidth = 3;
    largeFont = generator.generateFont(parameter);
    largeFont.setUseIntegerPositions(false);
}
 
开发者ID:ZephyrVentum,项目名称:FlappySpinner,代码行数:9,代码来源:AssetsManager.java

示例11: getSkyColour

public Color getSkyColour() {
  float light = getWorldSunlight();
  if (light <= 0.3f) return Color.BLACK;
  if (light >= 0.7f) return Color.SKY;
  return Color.BLACK.cpy().lerp(Color.SKY, (light - 0.3f) * 2.5f);
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:6,代码来源:WorldClient.java

示例12: FullScreenFader

public FullScreenFader(float delay, float fadeTime){
    this(delay, fadeTime, Color.BLACK);
}
 
开发者ID:CypherCove,项目名称:gdx-cclibs,代码行数:3,代码来源:FullScreenFader.java

示例13: show

@Override
public void show() {

    // Init the UIScreen

    uiScreen = new UIScreen(0, 0);

    // Create a FTFParameter for the button

    FreeTypeFontGenerator.FreeTypeFontParameter buttonReplayParameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
    buttonReplayParameter.size = 35;
    buttonReplayParameter.color = Color.WHITE;

    // Create a TextComponent for the button

    TextComponent buttonReplayText = new TextComponent (
            "Replay ?",
            "ui/cc_red_alert_inet.ttf",
            buttonReplayParameter
    );

    // Center the button's position

    Vector2 buttonReplayCenterPos = CenteredDrawer.getContained (
            CenteredDrawer.CenteredDrawingType.CENTERED_HORIZONTALLY_IN_CONTAINER,
            0,
            0,
            buttonReplayText.getLayout().width + 250,
            buttonReplayText.getLayout().height + 50,
            Gdx.graphics.getWidth(),
            Gdx.graphics.getHeight()
    );

    // Create the button and add an action to it

    UIButton buttonReplay = new UIButton(buttonReplayCenterPos.x, buttonReplayCenterPos.y - 100, buttonReplayText.getLayout().width + 250, buttonReplayText.getLayout().height + 50, buttonReplayText);
    buttonReplay.addAction("replay", new Runnable() {
        @Override
        public void run() {
            ScreenManager.setCurrentScreen(new GameScreen());
        }
    }, ActionEvent.CLICKED);

    // Add the button to the UIScreen

    uiScreen.add(buttonReplay);

    // Create a FTFParameter for the game over text

    FreeTypeFontGenerator.FreeTypeFontParameter gameOverParameter = new FreeTypeFontGenerator.FreeTypeFontParameter();
    gameOverParameter.size = 35;
    gameOverParameter.color = Color.BLACK;

    // Create a TextComponenet for the game over text

    gameOverText = new TextComponent (
            "Game Over !",
            "ui/cc_red_alert_inet.ttf",
            gameOverParameter
    );
}
 
开发者ID:Benjozork,项目名称:Onyx,代码行数:61,代码来源:GameOverScreen.java

示例14: create_loading_texture

private void create_loading_texture() {
		// TODO Auto-generated method stub
float 
scroll_width = get_size_in_pixle(loading_scroll_max, false) ,
scroll_height=get_size_in_pixle(1, false),
scroll_x = (screen_width - scroll_width)/2 , 
scroll_y = get_size_in_pixle(10, true) ,
logo_width =get_size_in_pixle(loading_scroll_max, false),
logo_height = logo_width , 
logo_x = (screen_width-logo_width)/2,
logo_y = (screen_height-logo_height)/2; 

asset.load("introatlas", TextureAtlas.class);
asset.finishLoading();
loading_texture_atlas = asset.get("introatlas",TextureAtlas.class);
loading_bar = loading_texture_atlas.findRegion("loadingbar");
   loading_actor = new GameActor(
		   loading_bar,
		   scroll_x ,
		   scroll_y,
		   Color.BLACK,
		   scroll_width,
		   scroll_height,true);
   loading_actor.enable_grade(false);
   loading_background_actor=new GameActor(
		   loading_bar,
		   scroll_x ,
		   scroll_y,
		   Color.BLACK,
		   scroll_width,
		   scroll_height,true);
loading_background_actor.update_alpha(.3f);
loading_background_actor.enable_grade(false);
logo_texture  = loading_texture_atlas.findRegion("logo");
logo_actor = new GameActor
		(logo_texture,
				logo_x,
				logo_y,
				null,
				logo_width,
				logo_height);
	logo_actor.update_alpha(1); 
	logo_actor.enable_grade(false);
	}
 
开发者ID:omar6597,项目名称:alquran-alkarem,代码行数:44,代码来源:book.java

示例15: TransitionManager

public TransitionManager() {
	color = Color.BLACK;
	duration = 1f;
	scale = .25f;
	r = null;
}
 
开发者ID:kyperbelt,项目名称:KyperBox,代码行数:6,代码来源:TransitionManager.java


注:本文中的com.badlogic.gdx.graphics.Color.BLACK属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。