@Override public void initialise(GameScreen outScreen, GameScreen inScreen) { this.color = originalColor.cpy(); this.color.a = 1f; }
public void create(float time, Color color, Type type, ActionCallback cb) { this.currentTime = 0f; this.c = color.cpy(); this.type = type; this.time = time; this.cb = cb; }
@Override public void initialise(GameScreen outScreen, GameScreen inScreen) { this.color = originalColor.cpy(); this.color.a = 0f; }
public OwnLabel(CharSequence text, Skin skin, String styleName) { super(text, skin, styleName); this.regularColor = this.getColor().cpy(); }
public OwnLabel(CharSequence text, Skin skin, String fontName, Color color) { super(text, skin, fontName, color); this.regularColor = this.getColor().cpy(); }
public OwnLabel(CharSequence text, Skin skin, String fontName, String colorName) { super(text, skin, fontName, colorName); this.regularColor = this.getColor().cpy(); }
public OwnLabel(CharSequence text, Skin skin) { super(text, skin); this.regularColor = this.getColor().cpy(); }
public OwnLabel(CharSequence text, LabelStyle style) { super(text, style); this.regularColor = this.getColor().cpy(); }
public Color getColorCopy() { return Klooni.theme.getCellColor(colorIndex).cpy(); }
/** * Gets a modified copy of color as if it is lit with a colored light source. * @param color the color to shine the light on * @param light the color of the light source * @return a copy of the Color color that factors in the lighting of the Color light. */ public Color lightWith(Color color, Color light) { return filter(color.cpy().mul(light)); }
/** * 设置加粗(参数0-1为宜) */ public void setBold(float width) { setStroke(getColor().cpy(), width); }
@Override public Color alter(float r, float g, float b, float a) { int diff = 0x7fffffff, temp; int choice = 0; r = SColor.floatGet(r, g, b, a); for (int i = 0; i < colorStore.length; i++) { temp = SColor.difference2(r, colorStore[i]); if(temp < diff) { diff = temp; choice = i; } } if(a >= 1f) return colorStore[choice]; Color ret = colorStore[choice].cpy(); ret.a = a; return ret; } }
/** * 添加点击变色效果 */ public UI<T> addClicAction(final Color color) { final Color pref = t.getColor().cpy(); t.addListener(new InputListener() { public boolean touchDown(InputEvent event, float px, float py, int pointer, int but) { t.setColor(color); return true; } public void touchUp(InputEvent event, float px, float py, int pointer, int but) { t.setColor(pref); } }); return this; }
public static AbstractScreen fadeInScreen(GDXGame game, AbstractScreen screen){ Table table = buildTable(Color.BLACK.cpy()); table.addAction(Actions.fadeOut(FADE_DURATION)); screen.getStage().addActor(table); if(screenFadeTableMap.containsKey(screen)) screenFadeTableMap.get(screen).remove(); screenFadeTableMap.put(screen, table); return screen; }
public static AbstractScreen fadeOutScreen(final GDXGame game, AbstractScreen screen){ Table table = buildTable(Color.CLEAR.cpy()); table.addAction(Actions.fadeIn(FADE_DURATION)); screen.getStage().addActor(table); if(screenFadeTableMap.containsKey(screen)) screenFadeTableMap.get(screen).remove(); screenFadeTableMap.put(screen, table); return screen; }
public void start(SpriteActor target, Type repeatType, int count, Color tColor, float duration, InterpolationMode interpolation, ActionCallback cb) { setTarget(target); if(target.getTint() == null) target.setTint(Color.WHITE.cpy()); startColor = target.getTint().cpy(); targetColor = tColor.cpy(); setDuration(duration); setType(repeatType); setCount(count); setInterpolation(interpolation); if (cb != null) { setCb(cb); } restart(); }
public OwnCheckBox(String text, Skin skin, float space) { super(text, skin); this.regularColor = getLabel().getColor().cpy(); this.getCells().get(0).padRight(space); }
public OwnCheckBox(String text, Skin skin, String styleName, float space) { super(text, skin, styleName); this.regularColor = getLabel().getColor().cpy(); this.getCells().get(0).padRight(space); }
BaseScorer(final Klooni game, GameLayout layout, int highScore) { cupTexture = SkinLoader.loadPng("cup.png"); cupColor = Klooni.theme.currentScore.cpy(); cupArea = new Rectangle(); Label.LabelStyle labelStyle = new Label.LabelStyle(); labelStyle.font = game.skin.getFont("font"); currentScoreLabel = new Label("0", labelStyle); currentScoreLabel.setAlignment(Align.right); highScoreLabel = new Label(Integer.toString(highScore), labelStyle); layout.update(this); }
public void start(SpriteActor target, Type repeatType, int count, float tAlpha, float duration, InterpolationMode interpolation, ActionCallback cb) { setTarget(target); if(target.getTint() == null) target.setTint(Color.WHITE.cpy()); startAlpha = target.getTint().a; targetAlpha = tAlpha; setDuration(duration); setType(repeatType); setCount(count); setInterpolation(interpolation); if (cb != null) { setCb(cb); } restart(); }