mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
Fix animation for new conquest screen
This commit is contained in:
@@ -73,9 +73,9 @@ public abstract class MultiStepWizardScreen<T> extends FScreen {
|
|||||||
setCurrentStep(newIndex);
|
setCurrentStep(newIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setCurrentStep(int index) {
|
private boolean setCurrentStep(int index) {
|
||||||
if (currentStep != null) {
|
if (currentStep != null) {
|
||||||
if (currentStep.index == index) { return; }
|
if (currentStep.index == index) { return false; }
|
||||||
|
|
||||||
currentStep.setVisible(false);
|
currentStep.setVisible(false);
|
||||||
if (currentStep.index == steps.length - 1) {
|
if (currentStep.index == steps.length - 1) {
|
||||||
@@ -95,6 +95,7 @@ public abstract class MultiStepWizardScreen<T> extends FScreen {
|
|||||||
if (Forge.getCurrentScreen() == this) {
|
if (Forge.getCurrentScreen() == this) {
|
||||||
currentStep.onActivate(model);
|
currentStep.onActivate(model);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -103,7 +104,9 @@ public abstract class MultiStepWizardScreen<T> extends FScreen {
|
|||||||
for (WizardStep<T> step : steps) {
|
for (WizardStep<T> step : steps) {
|
||||||
step.reset();
|
step.reset();
|
||||||
}
|
}
|
||||||
setCurrentStep(0);
|
if (!setCurrentStep(0)) {
|
||||||
|
currentStep.onActivate(model); //ensure first step activated even if already selected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void finish();
|
protected abstract void finish();
|
||||||
|
|||||||
Reference in New Issue
Block a user