mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
handle not downloaded level list
This commit is contained in:
parent
3416445a73
commit
21c5ecfeb9
1 changed files with 21 additions and 9 deletions
|
|
@ -600,9 +600,13 @@ class PlayMissionGui extends GuiImage {
|
||||||
pmDifficultyGoldCustom.setExtent(new Vector(120, 31));
|
pmDifficultyGoldCustom.setExtent(new Vector(120, 31));
|
||||||
pmDifficultyGoldCustom.txtCtrl.text.text = " Gold";
|
pmDifficultyGoldCustom.txtCtrl.text.text = " Gold";
|
||||||
pmDifficultyGoldCustom.pressedAction = (e) -> {
|
pmDifficultyGoldCustom.pressedAction = (e) -> {
|
||||||
currentList = Marbleland.goldMissions;
|
if (Marbleland.goldMissions.length == 0) {
|
||||||
currentCategory = "custom";
|
var mbo = new MessageBoxOkDlg("Level list has not been downloaded yet. Please try again later");
|
||||||
setCategoryFunc("gold", "custom");
|
MarbleGame.canvas.pushDialog(mbo);
|
||||||
|
} else {
|
||||||
|
currentCategory = "custom";
|
||||||
|
setCategoryFunc("gold", "custom");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pmDifficultyCtrl.addChild(pmDifficultyGoldCustom);
|
pmDifficultyCtrl.addChild(pmDifficultyGoldCustom);
|
||||||
|
|
||||||
|
|
@ -612,9 +616,13 @@ class PlayMissionGui extends GuiImage {
|
||||||
pmDifficultyPlatinumCustom.setExtent(new Vector(120, 31));
|
pmDifficultyPlatinumCustom.setExtent(new Vector(120, 31));
|
||||||
pmDifficultyPlatinumCustom.txtCtrl.text.text = " Platinum";
|
pmDifficultyPlatinumCustom.txtCtrl.text.text = " Platinum";
|
||||||
pmDifficultyPlatinumCustom.pressedAction = (e) -> {
|
pmDifficultyPlatinumCustom.pressedAction = (e) -> {
|
||||||
currentList = Marbleland.goldMissions;
|
if (Marbleland.platinumMissions.length == 0) {
|
||||||
currentCategory = "custom";
|
var mbo = new MessageBoxOkDlg("Level list has not been downloaded yet. Please try again later");
|
||||||
setCategoryFunc("platinum", "custom");
|
MarbleGame.canvas.pushDialog(mbo);
|
||||||
|
} else {
|
||||||
|
currentCategory = "custom";
|
||||||
|
setCategoryFunc("platinum", "custom");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pmDifficultyCtrl.addChild(pmDifficultyPlatinumCustom);
|
pmDifficultyCtrl.addChild(pmDifficultyPlatinumCustom);
|
||||||
|
|
||||||
|
|
@ -624,9 +632,13 @@ class PlayMissionGui extends GuiImage {
|
||||||
pmDifficultyUltraCustom.setExtent(new Vector(120, 31));
|
pmDifficultyUltraCustom.setExtent(new Vector(120, 31));
|
||||||
pmDifficultyUltraCustom.txtCtrl.text.text = " Ultra";
|
pmDifficultyUltraCustom.txtCtrl.text.text = " Ultra";
|
||||||
pmDifficultyUltraCustom.pressedAction = (e) -> {
|
pmDifficultyUltraCustom.pressedAction = (e) -> {
|
||||||
currentList = Marbleland.goldMissions;
|
if (Marbleland.ultraMissions.length == 0) {
|
||||||
currentCategory = "custom";
|
var mbo = new MessageBoxOkDlg("Level list has not been downloaded yet. Please try again later");
|
||||||
setCategoryFunc("ultra", "custom");
|
MarbleGame.canvas.pushDialog(mbo);
|
||||||
|
} else {
|
||||||
|
currentCategory = "custom";
|
||||||
|
setCategoryFunc("ultra", "custom");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pmDifficultyCtrl.addChild(pmDifficultyUltraCustom);
|
pmDifficultyCtrl.addChild(pmDifficultyUltraCustom);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue