List of usage examples for com.badlogic.gdx.graphics Color WHITE
Color WHITE
To view the source code for com.badlogic.gdx.graphics Color WHITE.
Click Source Link
From source file:com.thetruthbeyond.gui.objects.tabs.overtabs.OperationTab.java
License:Open Source License
@Override public void draw(SmartSpriteBatch batch) { if (showTime > 0.0f) { // Calculating whole currTab alpha. float alpha = showTime / SHOW_TIME; // Drawing black background. batch.setColor(1.0f, 1.0f, 1.0f, alpha * BLACKNESS_ALPHA); batch.draw(darkness, parent.getX(), parent.getY(), parent.getW(), parent.getH()); batch.end();/*w w w . j av a 2 s .c om*/ drawToBuffer(batch); batch.begin(); drawBuffer(batch, alpha); batch.setColor(Color.WHITE); } }
From source file:com.thetruthbeyond.gui.objects.tabs.overtabs.WildcardsTab.java
License:Open Source License
@Override public void draw(SmartSpriteBatch batch) { super.draw(batch); if (isVisible()) { batch.end();//from w ww . ja v a 2 s .co m drawToBuffer(batch); batch.begin(); drawBuffer(batch, buffer, getVisibilityAlpha()); batch.setColor(Color.WHITE); } }
From source file:com.todoroo.zxzx.general.SimpleButton.java
License:Apache License
public void draw(SpriteBatch spriteBatch) { Color oldColor = font.getColor(); if (down) {// ww w . j a v a 2 s. c o m spriteBatch.setColor(Color.RED); } else { spriteBatch.setColor(Color.BLUE); } spriteBatch.setColor(Color.WHITE); if (down) { font.setColor(oldColor.r / 2, oldColor.g / 2, oldColor.b / 2, oldColor.a); } float textX = x; float textY = y + h; textY -= (h - textHeight) / 2; font.drawWrapped(spriteBatch, text, textX, textY, w, alignment); font.setColor(oldColor); }
From source file:com.todoroo.zxzx.ParticleAdapter.java
License:Apache License
public void onPlayerHit() { Player player = world.getPlayer();/*from ww w . ja v a2s.c o m*/ float x = player.x + player.width / 2; float y = player.y + player.height / 2; particleManager.add(x, y, 2 * PARTICLES, Color.WHITE); }
From source file:com.todoroo.zxzx.WorldView.java
License:Apache License
private void drawText(CharSequence string) { BitmapFont font = Assets.textFont;/*ww w.j a v a 2s . c o m*/ spriteBatch.begin(); spriteBatch.setColor(Color.WHITE); font.drawWrapped(spriteBatch, string, worldCam.viewportWidth * 0.1f, worldCam.viewportHeight / 2, worldCam.viewportWidth * 0.8f, HAlignment.CENTER); spriteBatch.end(); }
From source file:com.todoroo.zxzx.WorldView.java
License:Apache License
private void drawMobiles() { spriteBatch.setProjectionMatrix(worldCam.combined); spriteBatch.begin();//www . j a v a 2s.c o m spriteBatch.setColor(Color.WHITE); drawPlayersShots(); drawBullets(); drawBoss(); drawPlayer(); drawParticles(); spriteBatch.end(); }
From source file:com.tumblr.oddlydrawn.stupidworm.Renderer.java
License:Apache License
public Renderer(OrthographicCamera cam, Worm worm, Food food, Level level) { font = new BitmapFont(Gdx.files.internal(FONT_LOC)); this.cam = cam; this.worm = worm; wholeWorm = worm.getAllBody();//from w ww .j a v a2 s.c om this.food = food; levelArray = level.getLevelArray(); shapeRenderer = new ShapeRenderer(); random = new Random(); color = new Color(); color.r = Color.WHITE.r; color.g = Color.WHITE.g; color.b = Color.WHITE.b; color.a = Color.WHITE.a; rect = new Rectangle(); batch = new SpriteBatch(); }
From source file:com.tumblr.oddlydrawn.stupidworm.Renderer.java
License:Apache License
private void renderFood() { // food/* w w w . j ava 2s . c o m*/ shapeRenderer.setColor(Color.WHITE); for (int i = 0; i < food.getRectangles().size(); i++) { oneFood = food.getRectangles().get(i); shapeRenderer.rect(oneFood.x, oneFood.y, oneFood.width, oneFood.height); } }
From source file:com.uwsoft.editor.renderer.factory.component.ColorPrimitiveComponentFactory.java
License:Apache License
protected TextureRegionComponent createTextureRegionComponent(Entity entity, MainItemVO vo) { TextureRegionComponent component = new TextureRegionComponent(); Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888); pixmap.setColor(Color.WHITE); pixmap.fill();//from w w w. j a va2 s . c om Texture texture = new Texture(pixmap); texture.setFilter(Texture.TextureFilter.Nearest, Texture.TextureFilter.Nearest); TextureRegion textureRegion = new TextureRegion(texture); component.region = textureRegion; component.isRepeat = false; component.isPolygon = true; entity.add(component); return component; }
From source file:com.uwsoft.editor.renderer.factory.component.LightComponentFactory.java
License:Apache License
protected LightObjectComponent createLightObjectComponent(Entity entity, LightVO vo) { if (vo.softnessLength == -1f) { vo.softnessLength = vo.distance * 0.1f * PhysicsBodyLoader.getScale(); }/* w ww.j ava2s . c o m*/ LightObjectComponent component = new LightObjectComponent(vo.type); component.coneDegree = vo.coneDegree; component.directionDegree = vo.directionDegree; component.distance = vo.distance; component.softnessLength = vo.softnessLength; component.isStatic = vo.isStatic; component.isXRay = vo.isXRay; component.rays = vo.rays; if (component.getType() == LightVO.LightType.POINT) { component.lightObject = new PointLight(rayHandler, component.rays); } else { component.lightObject = new ConeLight(rayHandler, component.rays, Color.WHITE, 1, 0, 0, 0, 0); } component.lightObject.setSoftnessLength(component.softnessLength); entity.add(component); return component; }