List of usage examples for com.badlogic.gdx.graphics Color CLEAR
Color CLEAR
To view the source code for com.badlogic.gdx.graphics Color CLEAR.
Click Source Link
From source file:genuini.screens.DeathMenu.java
@Override public void buildStage() { menuButton = new TextButton("Menu", skinManager.createButtonSkin(buttonWidth, buttonHeight)); menuButton.setPosition((V_WIDTH - buttonWidth) / 2 - 40, (V_HEIGHT - buttonHeight) / 2 - 50); stage.addActor(menuButton);/*from w w w. j a va 2s. c om*/ gameOver = new TextField("Game Over", skinManager.textFieldSkin(areaWidth, areaHeight, Color.WHITE, false, Color.CLEAR, Color.CLEAR, Color.DARK_GRAY, 1f)); table = new Table(); table.setSize(V_WIDTH, V_HEIGHT / 8); table.add(gameOver).width(200); table.setPosition(1, V_HEIGHT / 2); table.center(); // table.align(Align.right | Align.bottom); if (debug) { table.debug();// Enables debug lines for tables. } stage.addActor(table); }
From source file:genuini.screens.VictoryMenu.java
@Override public void buildStage() { menuButton = new TextButton("Menu", skinManager.createButtonSkin(buttonWidth, buttonHeight)); menuButton.setPosition((V_WIDTH - buttonWidth) / 2, (V_HEIGHT - buttonHeight) / 2 - 50); stage.addActor(menuButton);/* ww w. ja v a2 s .com*/ gameOver = new TextField("Congratulations, the demonstration is finished !", skinManager.textFieldSkin( buttonWidth, buttonHeight, Color.WHITE, false, Color.CLEAR, Color.CLEAR, Color.DARK_GRAY, 1f)); table = new Table(); table.setSize(V_WIDTH, V_HEIGHT / 8); table.add(gameOver).width(550); table.setPosition(1, V_HEIGHT / 2); table.center(); // table.align(Align.right | Align.bottom); if (debug) { table.debug();// Enables debug lines for tables. } stage.addActor(table); }
From source file:mobi.shad.s3lib.gfx.node.filter.FxTextureGalleryMask.java
License:Apache License
/** * */// ww w .j a v a 2s. com @Override protected void processLocal() { if (formGui != null) { actionTime = formGui.getFloat("actionTime"); pauseTime = formGui.getFloat("pauseTime"); filesList = formGui.getArrayString("imageList"); filesList = formGui.getArrayString("imageList"); maskTextureName = formGui.getString("imageMask"); interpolationMode = formGui.getInt("interpolationMode"); switch (interpolationMode) { default: interpolation = Interpolation.linear; break; case 1: interpolation = Interpolation.bounce; break; case 2: interpolation = Interpolation.pow2; break; case 3: interpolation = Interpolation.pow3; break; case 4: interpolation = Interpolation.elastic; break; case 5: interpolation = Interpolation.swing; break; case 6: interpolation = Interpolation.sine; break; } data.type = Data.Type.EFFECT_2D; maskTexture = S3ResourceManager.getPixmap(maskTextureName, S3Constans.textureImageSizeHight); if (filesList != null) { if (filesList.length > 1) { srcTexture = S3ResourceManager.getPixmap(filesList[0], S3Constans.textureImageSizeHight); src2Texture = S3ResourceManager.getPixmap(filesList[1], S3Constans.textureImageSizeHight); } else { srcTexture = new Pixmap(S3Constans.textureImageSizeLow, S3Constans.textureImageSizeLow, Format.RGBA8888); srcTexture.setColor(Color.CLEAR); srcTexture.fill(); if (filesList.length > 0) { src2Texture = S3ResourceManager.getPixmap(filesList[0], S3Constans.textureImageSizeHight); } else { src2Texture = new Pixmap(S3Constans.textureImageSizeLow, S3Constans.textureImageSizeLow, Format.RGBA8888); src2Texture.setColor(Color.CLEAR); src2Texture.fill(); } } } else { srcTexture = new Pixmap(S3Constans.textureImageSizeLow, S3Constans.textureImageSizeLow, Format.RGBA8888); srcTexture.setColor(Color.CLEAR); srcTexture.fill(); src2Texture = new Pixmap(srcTexture.getWidth(), srcTexture.getHeight(), srcTexture.getFormat()); src2Texture.setColor(Color.CLEAR); src2Texture.fill(); } if (data.pixmap == null) { data.pixmap = new Pixmap(S3Constans.textureImageSizeHight, S3Constans.textureImageSizeHight, Pixmap.Format.RGBA8888); data.pixmap.setColor(Color.CLEAR); data.pixmap.fill(); data.textureChange = true; } clearPixmap = new Pixmap(S3Constans.textureImageSizeLow, S3Constans.textureImageSizeLow, Format.RGBA8888); clearPixmap.setColor(Color.CLEAR); clearPixmap.fill(); pixmapFilter.setPixmap(data.pixmap, srcTexture, src2Texture, maskTexture); } currentActionTime = 0; currentPauseTime = 0; currentImageIdx = 0; }
From source file:net.k3rnel.unsealed.battle.BattleEntity.java
License:Open Source License
/** * @param status the status to set//from w ww.ja v a 2 s . c om */ public void setStatus(int status) { this.status = status; switch (this.status) { case BattleEntity.statusNormal: break; case BattleEntity.statusBurned: actions = sequence(color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), color(Color.RED), delay(0.05f), color(Color.ORANGE), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusStunned: actions = sequence(color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.YELLOW), delay(0.2f), color(Color.ORANGE), delay(0.1f), color(Color.WHITE), delay(0.1f), run(new Runnable() { @Override public void run() { setStatus(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusFrozen: this.status = statusStunned; actions = sequence(color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), color(Color.BLUE), delay(0.05f), color(Color.CLEAR), delay(0.05f), run(new Runnable() { @Override public void run() { setHp(getHp() - 10); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.addAction(actions); break; case BattleEntity.statusPoisoned: actions = sequence(color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.MAGENTA), delay(0.2f), color(Color.GREEN), delay(0.2f), color(Color.WHITE), fadeIn(0.3f), run(new Runnable() { @Override public void run() { setHp(getHp() - 5); } }), color(Color.WHITE), run(new Runnable() { @Override public void run() { setState(BattleEntity.statusNormal); } })); this.getActions().clear(); this.addAction(actions); break; } }
From source file:net.mwplay.cocostudio.ui.particleutil.Particle.java
License:Apache License
@Override public void reset() { this.pos.setZero(); this.startPos.setZero(); this.color.set(Color.CLEAR); this.deltaColor.set(Color.CLEAR); this.size = 0; this.deltaSize = 0; this.deltaRotation = 0; this.timeToLive = 0; modeA.reset();/*from www. ja v a 2s. c o m*/ modeB.reset(); }
From source file:non.plugins.graphics.java
public Color color(String name) { if (name.startsWith("#")) return Color.valueOf(name.replace("#", "")); if ("clear".equalsIgnoreCase(name)) return Color.CLEAR; else if ("white".equalsIgnoreCase(name)) return Color.WHITE; else if ("black".equalsIgnoreCase(name)) return Color.BLACK; else if ("red".equalsIgnoreCase(name)) return Color.RED; else if ("green".equalsIgnoreCase(name)) return Color.GREEN; else if ("blue".equalsIgnoreCase(name)) return Color.BLUE; else if ("lightgray".equalsIgnoreCase(name)) return Color.LIGHT_GRAY; else if ("gray".equalsIgnoreCase(name)) return Color.GRAY; else if ("darkgray".equalsIgnoreCase(name)) return Color.DARK_GRAY; else if ("pink".equalsIgnoreCase(name)) return Color.PINK; else if ("orange".equalsIgnoreCase(name)) return Color.ORANGE; else if ("yellow".equalsIgnoreCase(name)) return Color.YELLOW; else if ("magenta".equalsIgnoreCase(name)) return Color.MAGENTA; else if ("cyan".equalsIgnoreCase(name)) return Color.CYAN; else if ("olive".equalsIgnoreCase(name)) return Color.OLIVE; else if ("purple".equalsIgnoreCase(name)) return Color.PURPLE; else if ("maroon".equalsIgnoreCase(name)) return Color.MAROON; else if ("teal".equalsIgnoreCase(name)) return Color.TEAL; else if ("navy".equalsIgnoreCase(name)) return Color.NAVY; return Color.CLEAR; }
From source file:org.illarion.engine.backend.gdx.GdxCursorManager.java
License:Open Source License
@Nullable @Override//from w w w . jav a 2 s . c om protected MouseCursor loadCursor(@Nonnull String ref, int hotSpotX, int hotSpotY) { try { Pixmap cursorPixels = new Pixmap(files.internal(ref)); int cursorHeight = cursorPixels.getHeight(); int cursorWidth = cursorPixels.getWidth(); int minSize = org.lwjgl.input.Cursor.getMinCursorSize(); int maxSize = org.lwjgl.input.Cursor.getMaxCursorSize(); cursorHeight = FastMath.clamp(cursorHeight, minSize, maxSize); cursorWidth = FastMath.clamp(cursorWidth, minSize, maxSize); cursorHeight = MathUtils.nextPowerOfTwo(cursorHeight); cursorWidth = MathUtils.nextPowerOfTwo(cursorWidth); if ((cursorHeight != cursorPixels.getHeight()) || (cursorWidth != cursorPixels.getWidth()) || (cursorPixels.getFormat() != Format.RGBA8888)) { Pixmap tempPixMap = new Pixmap(cursorWidth, cursorHeight, Format.RGBA8888); tempPixMap.setColor(Color.CLEAR); tempPixMap.fill(); tempPixMap.drawPixmap(cursorPixels, 0, 0); cursorPixels.dispose(); cursorPixels = tempPixMap; } Cursor cursor = graphics.newCursor(cursorPixels, hotSpotX, hotSpotY); if (cursor != null) { return new GdxCursor(cursor); } return null; } catch (@Nonnull GdxRuntimeException e) { return null; } }
From source file:tilo.modules.graphics.java
License:Open Source License
public Color color(String name) { if (name.startsWith("#")) return Color.valueOf(name.replace("#", "")); if ("clear".equalsIgnoreCase(name)) return Color.CLEAR; else if ("white".equalsIgnoreCase(name)) return Color.WHITE; else if ("black".equalsIgnoreCase(name)) return Color.BLACK; else if ("red".equalsIgnoreCase(name)) return Color.RED; else if ("green".equalsIgnoreCase(name)) return Color.GREEN; else if ("blue".equalsIgnoreCase(name)) return Color.BLUE; else if ("lightgray".equalsIgnoreCase(name)) return Color.LIGHT_GRAY; else if ("gray".equalsIgnoreCase(name)) return Color.GRAY; else if ("darkgray".equalsIgnoreCase(name)) return Color.DARK_GRAY; else if ("pink".equalsIgnoreCase(name)) return Color.PINK; else if ("orange".equalsIgnoreCase(name)) return Color.ORANGE; else if ("yellow".equalsIgnoreCase(name)) return Color.YELLOW; else if ("magenta".equalsIgnoreCase(name)) return Color.MAGENTA; else if ("cyan".equalsIgnoreCase(name)) return Color.CYAN; return Color.CLEAR; }