use of com.badlogic.gdx.scenes.scene2d.actions.SequenceAction in project skin-composer by raeleus.
the class DialogLoading method show.
@Override
public Dialog show(Stage stage) {
Dialog dialog = super.show(stage);
RunnableAction runnableAction = new RunnableAction();
runnableAction.setRunnable(() -> {
if (runnable != null) {
runnable.run();
}
hide();
});
Action action = new SequenceAction(new DelayAction(.5f), runnableAction);
addAction(action);
return dialog;
}
use of com.badlogic.gdx.scenes.scene2d.actions.SequenceAction in project skin-composer by raeleus.
the class MenuList method hide.
public void hide() {
// fade out and then remove
clearActions();
AlphaAction alphaAction = new AlphaAction();
alphaAction.setAlpha(0.0f);
alphaAction.setDuration(.3f);
alphaAction.setInterpolation(Interpolation.fade);
RemoveActorAction removeAction = new RemoveActorAction();
removeAction.setActor(this);
SequenceAction sequenceAction = new SequenceAction(alphaAction, removeAction);
addAction(sequenceAction);
}
use of com.badlogic.gdx.scenes.scene2d.actions.SequenceAction in project skin-composer by raeleus.
the class RootTable method refreshStyleProperties.
public void refreshStyleProperties(boolean preserveScroll) {
if (stylePropertiesTable != null && stylePropertiesScrollPane != null) {
float scrollY;
if (preserveScroll) {
scrollY = stylePropertiesScrollPane.getScrollY();
} else {
scrollY = 0;
}
stylePropertiesTable.clearChildren();
addStyleProperties(stylePropertiesTable);
if (preserveScroll) {
validate();
stylePropertiesScrollPane.setSmoothScrolling(false);
stylePropertiesScrollPane.setScrollY(scrollY);
stylePropertiesScrollPane.addAction(new SequenceAction(new DelayAction(.1f), new Action() {
@Override
public boolean act(float delta) {
stylePropertiesScrollPane.setSmoothScrolling(true);
return true;
}
}));
}
}
}
use of com.badlogic.gdx.scenes.scene2d.actions.SequenceAction in project ultimate-java by pantinor.
the class ShrineScreen method meditationCycle.
private void meditationCycle() {
party.getSaveGame().lastmeditation = (party.getSaveGame().moves / SHRINE_MEDITATION_INTERVAL) & 0xffff;
SequenceAction seq = Actions.action(SequenceAction.class);
for (int i = 0; i < MEDITATION_MANTRAS_PER_CYCLE; i++) {
seq.addAction(Actions.run(new LogAction()));
seq.addAction(Actions.delay(1f));
}
seq.addAction(Actions.run(new MeditateAction()));
stage.addAction(seq);
}
use of com.badlogic.gdx.scenes.scene2d.actions.SequenceAction in project ultimate-java by pantinor.
the class CodexScreen method keyUp.
@Override
public boolean keyUp(int keycode) {
if (state == State.endText) {
state = State.done;
SequenceAction seq = Actions.action(SequenceAction.class);
for (final String s : text1) {
seq.addAction(Actions.delay(5f));
seq.addAction(Actions.run(new Runnable() {
public void run() {
logs.add(s);
}
}));
}
seq.addAction(Actions.run(new Runnable() {
public void run() {
mainGame.setScreen(Ultima4.startScreen);
}
}));
stage.addAction(seq);
}
return false;
}
Aggregations