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
a686be2ffd
commit
c18548122a
2 changed files with 15 additions and 11 deletions
|
|
@ -142,7 +142,8 @@ class LeaderboardsGui extends GuiImage {
|
|||
var allMissions = MissionList.missionList.get('ultra')
|
||||
.get('beginner')
|
||||
.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]);
|
||||
|
||||
|
|
@ -155,6 +156,8 @@ class LeaderboardsGui extends GuiImage {
|
|||
|
||||
var currentMission = allMissions[actualIndex];
|
||||
|
||||
var isHuntScore = currentMission.difficultyIndex == 3;
|
||||
|
||||
var scoreTok = 0;
|
||||
|
||||
function fetchScores() {
|
||||
|
|
@ -168,7 +171,7 @@ class LeaderboardsGui extends GuiImage {
|
|||
var scoreText = '<offset value="10">${i}. </offset>
|
||||
<offset value="50">${score.name}</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>';
|
||||
scoreTexts.push(scoreText);
|
||||
i++;
|
||||
|
|
@ -226,6 +229,7 @@ class LeaderboardsGui extends GuiImage {
|
|||
changeViewButton.pressedAction = (e) -> {
|
||||
scoreView = scoreView == All ? Rewind : (scoreView == Rewind ? NoRewind : All);
|
||||
levelSelectOpts.labelText.text.text = scoreCategories[cast(scoreView, Int)];
|
||||
fetchScores();
|
||||
}
|
||||
bottomBar.addChild(changeViewButton);
|
||||
|
||||
|
|
|
|||
|
|
@ -155,15 +155,15 @@ class LevelSelectGui extends GuiImage {
|
|||
}
|
||||
bottomBar.addChild(recordButton);
|
||||
|
||||
if (currentDifficultyStatic != "multiplayer") {
|
||||
var lbButton = new GuiXboxButton("Leaderboard", 220);
|
||||
lbButton.position = new Vector(750, 0);
|
||||
lbButton.vertSizing = Bottom;
|
||||
lbButton.gamepadAccelerator = ["Y"];
|
||||
lbButton.horizSizing = Right;
|
||||
lbButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LeaderboardsGui(currentSelectionStatic, currentDifficultyStatic, true));
|
||||
bottomBar.addChild(lbButton);
|
||||
}
|
||||
// if (currentDifficultyStatic != "multiplayer") {
|
||||
var lbButton = new GuiXboxButton("Leaderboard", 220);
|
||||
lbButton.position = new Vector(750, 0);
|
||||
lbButton.vertSizing = Bottom;
|
||||
lbButton.gamepadAccelerator = ["Y"];
|
||||
lbButton.horizSizing = Right;
|
||||
lbButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LeaderboardsGui(currentSelectionStatic, currentDifficultyStatic, true));
|
||||
bottomBar.addChild(lbButton);
|
||||
// }
|
||||
|
||||
var nextButton = new GuiXboxButton("Play", 160);
|
||||
nextButton.position = new Vector(960, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue