mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
add support for gem hunt lbs (seeded and non seeded mixed currently)
This commit is contained in:
parent
42b306dd98
commit
1398da8b2d
2 changed files with 15 additions and 11 deletions
|
|
@ -147,7 +147,8 @@ class LeaderboardsGui extends GuiImage {
|
||||||
var allMissions = MissionList.missionList.get('ultra')
|
var allMissions = MissionList.missionList.get('ultra')
|
||||||
.get('beginner')
|
.get('beginner')
|
||||||
.concat(MissionList.missionList.get('ultra').get('intermediate'))
|
.concat(MissionList.missionList.get('ultra').get('intermediate'))
|
||||||
.concat(MissionList.missionList.get('ultra').get('advanced'));
|
.concat(MissionList.missionList.get('ultra').get('advanced'))
|
||||||
|
.concat(MissionList.missionList.get('ultra').get('multiplayer'));
|
||||||
|
|
||||||
var actualIndex = allMissions.indexOf(MissionList.missionList.get('ultra').get(levelSelectDifficulty)[index]);
|
var actualIndex = allMissions.indexOf(MissionList.missionList.get('ultra').get(levelSelectDifficulty)[index]);
|
||||||
|
|
||||||
|
|
@ -160,6 +161,8 @@ class LeaderboardsGui extends GuiImage {
|
||||||
|
|
||||||
var currentMission = allMissions[actualIndex];
|
var currentMission = allMissions[actualIndex];
|
||||||
|
|
||||||
|
var isHuntScore = currentMission.difficultyIndex == 3;
|
||||||
|
|
||||||
var scoreTok = 0;
|
var scoreTok = 0;
|
||||||
|
|
||||||
function fetchScores() {
|
function fetchScores() {
|
||||||
|
|
@ -173,7 +176,7 @@ class LeaderboardsGui extends GuiImage {
|
||||||
var scoreText = '<offset value="10">${i}. </offset>
|
var scoreText = '<offset value="10">${i}. </offset>
|
||||||
<offset value="50">${score.name}</offset>
|
<offset value="50">${score.name}</offset>
|
||||||
<offset value="475">${score.rewind > 0 ? "<img src='rewind'/>" : ""}</offset>
|
<offset value="475">${score.rewind > 0 ? "<img src='rewind'/>" : ""}</offset>
|
||||||
<offset value="500">${Util.formatTime(score.score)}</offset>
|
<offset value="500">${isHuntScore ? Std.string(1000 - score.score) : Util.formatTime(score.score)}</offset>
|
||||||
<offset value="625"><img src="${platformToString(score.platform)}"/></offset>';
|
<offset value="625"><img src="${platformToString(score.platform)}"/></offset>';
|
||||||
scoreTexts.push(scoreText);
|
scoreTexts.push(scoreText);
|
||||||
i++;
|
i++;
|
||||||
|
|
@ -231,6 +234,7 @@ class LeaderboardsGui extends GuiImage {
|
||||||
changeViewButton.pressedAction = (e) -> {
|
changeViewButton.pressedAction = (e) -> {
|
||||||
scoreView = scoreView == All ? Rewind : (scoreView == Rewind ? NoRewind : All);
|
scoreView = scoreView == All ? Rewind : (scoreView == Rewind ? NoRewind : All);
|
||||||
levelSelectOpts.labelText.text.text = scoreCategories[cast(scoreView, Int)];
|
levelSelectOpts.labelText.text.text = scoreCategories[cast(scoreView, Int)];
|
||||||
|
fetchScores();
|
||||||
}
|
}
|
||||||
bottomBar.addChild(changeViewButton);
|
bottomBar.addChild(changeViewButton);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@ class LevelSelectGui extends GuiImage {
|
||||||
}
|
}
|
||||||
bottomBar.addChild(recordButton);
|
bottomBar.addChild(recordButton);
|
||||||
|
|
||||||
if (currentDifficultyStatic != "multiplayer") {
|
// if (currentDifficultyStatic != "multiplayer") {
|
||||||
var lbButton = new GuiXboxButton("Leaderboard", 220);
|
var lbButton = new GuiXboxButton("Leaderboard", 220);
|
||||||
lbButton.position = new Vector(750, 0);
|
lbButton.position = new Vector(750, 0);
|
||||||
lbButton.vertSizing = Bottom;
|
lbButton.vertSizing = Bottom;
|
||||||
|
|
@ -168,7 +168,7 @@ class LevelSelectGui extends GuiImage {
|
||||||
lbButton.horizSizing = Right;
|
lbButton.horizSizing = Right;
|
||||||
lbButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LeaderboardsGui(currentSelectionStatic, currentDifficultyStatic, true));
|
lbButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LeaderboardsGui(currentSelectionStatic, currentDifficultyStatic, true));
|
||||||
bottomBar.addChild(lbButton);
|
bottomBar.addChild(lbButton);
|
||||||
}
|
// }
|
||||||
|
|
||||||
var nextButton = new GuiXboxButton("Play", 160);
|
var nextButton = new GuiXboxButton("Play", 160);
|
||||||
nextButton.position = new Vector(960, 0);
|
nextButton.position = new Vector(960, 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue