Expand tutorials
This commit is contained in:
1 parent
2da283c600
commit
24bf116b37
8 files changed
+116
-23
No files matched your search
@@ -9,6 +9,7 @@ import { VoucherType, getVoucherTypeIcon } from "../system/voucher";
|
||||
import { getPokemonSpecies } from "../data/pokemon-species";
|
||||
import { Type } from "../data/type";
|
||||
import { addWindow } from "./window";
|
||||
import { Tutorial, handleTutorial } from "../tutorial";
|
||||
|
||||
const defaultText = 'Select a machine.';
|
||||
|
||||
@@ -239,6 +240,8 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
|
||||
this.eggGachaContainer.setVisible(true);
|
||||
|
||||
handleTutorial(this.scene, Tutorial.Egg_Gacha);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -477,6 +480,23 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
||||
});
|
||||
}
|
||||
|
||||
showText(text: string, delay?: number, callback?: Function, callbackDelay?: number, prompt?: boolean, promptDelay?: number): void {
|
||||
if (!text)
|
||||
text = defaultText;
|
||||
|
||||
if (text?.indexOf('\n') === -1) {
|
||||
this.eggGachaMessageBox.setSize(320, 32);
|
||||
this.eggGachaMessageBox.setY(0);
|
||||
this.message.setY(8);
|
||||
} else {
|
||||
this.eggGachaMessageBox.setSize(320, 46);
|
||||
this.eggGachaMessageBox.setY(-14);
|
||||
this.message.setY(-6);
|
||||
}
|
||||
|
||||
super.showText(text, delay, callback, callbackDelay, prompt, promptDelay);
|
||||
}
|
||||
|
||||
showError(text: string): void {
|
||||
this.showText(text, null, () => this.showText(defaultText), Utils.fixedInt(1500));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user