protected void onShow (Actor selectBoxList, boolean below) { selectBoxList.getColor().a = 0; selectBoxList.addAction(fadeIn(0.3f, Interpolation.fade)); }
protected void onShow (Actor selectBoxList, boolean below) { selectBoxList.getColor().a = 0; selectBoxList.addAction(fadeIn(0.3f, Interpolation.fade)); }
/** Centers the dialog in the stage and calls {@link #show(Stage, Action)} with a {@link Actions#fadeIn(float, Interpolation)} * action. */ public Dialog show (Stage stage) { show(stage, sequence(Actions.alpha(0), Actions.fadeIn(0.4f, Interpolation.fade))); setPosition(Math.round((stage.getWidth() - getWidth()) / 2), Math.round((stage.getHeight() - getHeight()) / 2)); return this; }
/** Centers the dialog in the stage and calls {@link #show(Stage, Action)} with a {@link Actions#fadeIn(float, Interpolation)} * action. */ public Dialog show (Stage stage) { show(stage, sequence(Actions.alpha(0), Actions.fadeIn(0.4f, Interpolation.fade))); setPosition(Math.round((stage.getWidth() - getWidth()) / 2), Math.round((stage.getHeight() - getHeight()) / 2)); return this; }
/** Called when tooltip is shown. Default implementation sets actions to animate showing. */ protected void showAction (Tooltip tooltip) { float actionTime = animations ? (time > 0 ? 0.5f : 0.15f) : 0.1f; tooltip.container.setTransform(true); tooltip.container.getColor().a = 0.2f; tooltip.container.setScale(0.05f); tooltip.container.addAction(parallel(fadeIn(actionTime, fade), scaleTo(1, 1, actionTime, Interpolation.fade))); }
/** Called when tooltip is shown. Default implementation sets actions to animate showing. */ protected void showAction (Tooltip tooltip) { float actionTime = animations ? (time > 0 ? 0.5f : 0.15f) : 0.1f; tooltip.container.setTransform(true); tooltip.container.getColor().a = 0.2f; tooltip.container.setScale(0.05f); tooltip.container.addAction(parallel(fadeIn(actionTime, fade), scaleTo(1, 1, actionTime, Interpolation.fade))); }
@Override public void create () { texture = new Texture(Gdx.files.internal("data/badlogicsmall.jpg")); stage = new Stage(); for (int i = 0; i < 100; i++) { Image img = new Image(new TextureRegion(texture)); img.setX((float)Math.random() * 480); img.setY((float)Math.random() * 320); img.getColor().a = (float)Math.random() * 0.5f + 0.5f; stage.addActor(img); } stage.getRoot().addAction(forever(sequence(fadeOut(3), fadeIn(3)))); }
public void start(String id) { idList.add(id); sprite.clearActions(); sprite.addAction(Actions.fadeIn(.3f)); }
public Table fadeIn () { mainTable.setColor(1, 1, 1, 0); mainTable.addAction(Actions.fadeIn(VisWindow.FADE_TIME, Interpolation.fade)); return mainTable; }
/** @return this window for the purpose of chaining methods eg. stage.addActor(new MyWindow(stage).fadeIn(0.3f)); */ public VisWindow fadeIn (float time) { setColor(1, 1, 1, 0); addAction(Actions.fadeIn(time, Interpolation.fade)); return this; }
public Table fadeIn () { mainTable.setColor(1, 1, 1, 0); mainTable.addAction(Actions.fadeIn(VisWindow.FADE_TIME, Interpolation.fade)); return mainTable; }
@Override public void enter (InputEvent event, float x, float y, int pointer, Actor fromActor) { if (pointer == -1) { clearActions(); addAction(Actions.sequence(Actions.fadeIn(fadeTime, Interpolation.fade))); } }
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; }
/** * Show the profiler window * @param stage stage to add to */ public void show (Stage stage) { stage.addActor(this); setColor(1, 1, 1, 0); addAction(Actions.fadeIn(FADE_TIME, Interpolation.fade)); }
private VisTable fadeIn () { clearActions(); setColor(1, 1, 1, 0); addAction(Actions.sequence(Actions.fadeIn(fadeTime, Interpolation.fade))); return this; }
/** {@link #pack() Packs} the dialog and adds it to the stage, centered with default fadeIn action */ public VisDialog show (Stage stage) { show(stage, sequence(Actions.alpha(0), Actions.fadeIn(0.4f, Interpolation.fade))); setPosition(Math.round((stage.getWidth() - getWidth()) / 2), Math.round((stage.getHeight() - getHeight()) / 2)); return this; }
/** Centers the dialog in the stage and calls {@link #show(Stage, Action)} with a {@link Actions#fadeIn(float, Interpolation)} * action. */ public Dialog show (Stage stage) { show(stage, sequence(Actions.alpha(0), Actions.fadeIn(0.4f, Interpolation.fade))); setPosition(Math.round((stage.getWidth() - getWidth()) / 2), Math.round((stage.getHeight() - getHeight()) / 2)); return this; }
/** Called when tooltip is shown. Default implementation sets actions to animate showing. */ protected void showAction (Tooltip tooltip) { float actionTime = animations ? (time > 0 ? 0.5f : 0.15f) : 0.1f; tooltip.container.setTransform(true); tooltip.container.getColor().a = 0.2f; tooltip.container.setScale(0.05f); tooltip.container.addAction(parallel(fadeIn(actionTime, fade), scaleTo(1, 1, actionTime, Interpolation.fade))); }
public void show(int position, String fgPath, Action withAction) { AsyncLoadImage img = get(position); img.setDrawableAsync(Path.IMAGE_FG + fgPath); img.clearActions(); img.getColor().a = .3f; img.addAction(Actions.fadeIn(.3f)); if(withAction != null) img.addAction(withAction); }
public MainScene() { actor = new AdvanceSpriteImage(new AnimationSprite(0.05f, Engine.resource("Anim", TextureAtlas.class), "fly")); actor.setPosition(200, 100); actor.addAction(Actions.forever( Actions.sequence( Actions.alpha(0.1f, 0.1f), Actions.fadeIn(0.1f) ) )); this.addActor(actor); }