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.davidykay.shootout.Renderer.java
License:Apache License
private void renderBackground(GL10 gl) { // TODO: Eliminate fixed number ortho projection. //viewMatrix.setToOrtho2D(0, 0, 400, 320); viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin();/*from www .j a va 2 s. co m*/ spriteBatch.disableBlending(); spriteBatch.setColor(Color.WHITE); spriteBatch.draw(backgroundTexture, 0, 0, 480, 320, 0, 0, 512, 512, false, false); spriteBatch.end(); }
From source file:com.davidykay.shootout.Renderer.java
License:Apache License
private void renderEarth(GL10 gl) { // TODO: Eliminate fixed number ortho projection. final int TEXTURE_SIZE = 128; viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin();//from www. ja va 2 s .co m spriteBatch.disableBlending(); spriteBatch.setColor(Color.WHITE); spriteBatch.draw(earthTexture, 288, 48, TEXTURE_SIZE, TEXTURE_SIZE, 0, 0, TEXTURE_SIZE, TEXTURE_SIZE, false, false); spriteBatch.end(); }
From source file:com.davidykay.shootout.screens.GameOver.java
License:Apache License
@Override public void render(Application app) { app.getGraphics().getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT); viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin();// w w w .jav a 2 s . c o m spriteBatch.disableBlending(); spriteBatch.setColor(Color.WHITE); spriteBatch.draw(background, 0, 0, 480, 320, 0, 0, 512, 512, false, false); spriteBatch.enableBlending(); spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 256, 512, 256, false, false); String text = "You have failed Earth.\nTouch to continue."; TextBounds bounds = font.getMultiLineBounds(text); spriteBatch.setBlendFunction(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); font.drawMultiLine(spriteBatch, text, 0, 160 + bounds.height / 2, 480, HAlignment.CENTER); spriteBatch.end(); }
From source file:com.davidykay.shootout.screens.MainMenu.java
License:Apache License
@Override public void render(Application app) { app.getGraphics().getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT); viewMatrix.setToOrtho2D(0, 0, 480, 320); spriteBatch.setProjectionMatrix(viewMatrix); spriteBatch.setTransformMatrix(transformMatrix); spriteBatch.begin();/* w ww . ja v a 2 s.c om*/ spriteBatch.disableBlending(); spriteBatch.setColor(Color.WHITE); spriteBatch.draw(background, 0, 0, 480, 320, 0, 0, 512, 512, false, false); spriteBatch.enableBlending(); spriteBatch.draw(logo, 0, 320 - 128, 480, 128, 0, 0, 512, 256, false, false); spriteBatch.setBlendFunction(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA); String text = "Touch to start!"; float width = font.getBounds(text).width; font.draw(spriteBatch, text, 240 - width / 2, 128); spriteBatch.end(); }
From source file:com.dgzt.core.Map.java
License:Open Source License
/** * The constructor./*from ww w. j a va 2 s . c om*/ * * @param shader - The shader. * @param box2DWorld - The world of the Box2D. * @param box2DX - The x coordinate value in Box2D. * @param box2DY - The y coordinate value in Box2D. */ public Map(final ShaderProgram shader, final World box2DWorld, final float box2DX, final float box2DY) { super(shader, Color.GREEN); this.box2DX = box2DX; this.box2DY = box2DY; this.mapBorder = new RectangleBorderShape(shader, Color.WHITE); this.leftSector16 = new RectangleBorderShape(shader, Color.WHITE); this.rightSector16 = new RectangleBorderShape(shader, Color.WHITE); this.leftSector5 = new RectangleBorderShape(shader, Color.WHITE); this.rightSector5 = new RectangleBorderShape(shader, Color.WHITE); this.centerBigCircle = new CircleBorderShape(shader, Color.WHITE); this.centerLine = new LineShape(shader, Color.WHITE); this.centerSmallCircle = new FilledCircleShape(shader, Color.WHITE); this.leftSmallCircle = new FilledCircleShape(shader, Color.WHITE); this.rightSmallCircle = new FilledCircleShape(shader, Color.WHITE); this.topLeftSmallArc = new ArcShape(shader, 0, 90, Color.WHITE); this.topRightSmallArc = new ArcShape(shader, 270, 90, Color.WHITE); this.bottomRightSmallArc = new ArcShape(shader, 180, 90, Color.WHITE); this.bottomLeftSmallArc = new ArcShape(shader, 90, 90, Color.WHITE); this.leftBigArc = new ArcShape(shader, 37, 109, Color.WHITE); this.rightBigArc = new ArcShape(shader, 217, 109, Color.WHITE); addSensor(box2DWorld); }
From source file:com.dgzt.core.scoreboard.SecondCircles.java
License:Open Source License
/** * The constructor./* w w w. j av a2 s .c o m*/ * * @param shader - The shader. */ public SecondCircles(final ShaderProgram shader) { topCircle = new FilledCircleShape(shader, Color.WHITE); bottomCircle = new FilledCircleShape(shader, Color.WHITE); }
From source file:com.digitale.screens.CharCreator.java
License:Open Source License
@Override public void render(float delta) { Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); int width = Gdx.app.getGraphics().getWidth(); int height = Gdx.app.getGraphics().getHeight(); batch.begin();//from w w w. j a v a 2 s . com batch.setColor(Color.WHITE); batch.draw(background, 0, 0, width, height, 0, 0, 1024, 512, false, false); batch.end(); ((Label) stage.findActor("label-race")).setText(racetext); ((Label) stage.findActor("primary-stat")).setText(PrimaryStat); if (selectedAvatar.equals("avatar00.jpg")) { imageActor = new Image(image0); } if (selectedAvatar.equals("avatar01.jpg")) { imageActor = new Image(image1); } if (selectedAvatar.equals("avatar02.jpg")) { imageActor = new Image(image2); } if (selectedAvatar.equals("avatar03.jpg")) { imageActor = new Image(image3); } if (selectedAvatar.equals("avatar04.jpg")) { imageActor = new Image(image4); } if (selectedAvatar.equals("avatar05.jpg")) { imageActor = new Image(image5); } if (selectedAvatar.equals("avatar06.jpg")) { imageActor = new Image(image6); } if (selectedAvatar.equals("avatar07.jpg")) { imageActor = new Image(image7); } if (selectedAvatar.equals("avatar08.jpg")) { imageActor = new Image(image8); } if (selectedAvatar.equals("avatar09.jpg")) { imageActor = new Image(image9); } imageActor.x = width - 210; imageActor.y = 100; imageActor.scaleX = 3; imageActor.scaleY = 3; stage.addActor(imageActor); stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f)); stage.draw(); if (fadeIn) { batch.enableBlending(); batch.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); batch.begin(); batch.setColor(1, 1, 1, fadeTimer); batch.draw(xfadeTexture, -100, -100, width + 200, height + 200); batch.end(); } if (Stardust3d.DEBUG) Table.drawDebug(stage); }
From source file:com.digitale.screens.CharPicker.java
License:Open Source License
@Override public void render(float delta) { Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); int width = Gdx.app.getGraphics().getWidth(); int height = Gdx.app.getGraphics().getHeight(); batch.begin();/*from www . j a va 2 s . c om*/ batch.setColor(Color.WHITE); batch.draw(background, 0, 0, width, height, 0, 0, 1024, 512, false, false); batch.end(); imageActor.height = 128; stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f)); stage.draw(); if (fadeIn) { batch.enableBlending(); batch.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); batch.begin(); batch.setColor(1, 1, 1, fadeTimer); batch.draw(xfadeTexture, -100, -100, width + 200, height + 200); batch.end(); } if (Stardust3d.DEBUG) Table.drawDebug(stage); }
From source file:com.digitale.screens.Help.java
License:Open Source License
@Override public void render(float delta) { Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); int width = Gdx.app.getGraphics().getWidth(); int height = Gdx.app.getGraphics().getHeight(); batch.begin();//from ww w . j ava 2 s . c o m batch.setColor(Color.WHITE); batch.draw(background, 0, 0, width, height, 0, 0, 1024, 512, false, false); batch.end(); stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f)); stage.draw(); if (fadeIn) { batch.enableBlending(); batch.setBlendFunction(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); batch.begin(); batch.setColor(1, 1, 1, fadeTimer); batch.draw(xfadeTexture, -100, -100, width + 200, height + 200); batch.end(); } if (Stardust3d.DEBUG) Table.drawDebug(stage); }
From source file:com.digitale.screens.Options.java
License:Open Source License
@Override public void render(float delta) { Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1); Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT); batch.begin();/* w ww . ja va2 s . c o m*/ batch.setColor(Color.WHITE); batch.draw(background, 0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), 0, 0, 1024, 512, false, false); batch.end(); ((CheckBox) stage.findActor("checkboxfont")).setChecked(Stardust3d.tinyfont); stage.act(Math.min(Gdx.graphics.getDeltaTime(), 1 / 30f)); stage.draw(); if (Stardust3d.DEBUG) Table.drawDebug(stage); }