mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-27 13:11:42 +00:00
global player leaderboards and update the rating curves locally
This commit is contained in:
parent
7d0c0ac096
commit
6e461a6125
59 changed files with 265 additions and 97 deletions
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
include = "1";
|
include = "1";
|
||||||
level = "49";
|
level = "49";
|
||||||
difficulty = "9";
|
difficulty = "10";
|
||||||
name = $Text::LevelName79;
|
name = $Text::LevelName79;
|
||||||
};
|
};
|
||||||
new Sky(Sky) {
|
new Sky(Sky) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "9";
|
difficulty = "6";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
time = "120000";
|
time = "120000";
|
||||||
level = "47";
|
level = "47";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "8";
|
difficulty = "10";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
time = "180000";
|
time = "180000";
|
||||||
level = "44";
|
level = "44";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "41";
|
level = "41";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "8";
|
difficulty = "7";
|
||||||
desc = "divergence";
|
desc = "divergence";
|
||||||
name = $Text::LevelName104;
|
name = $Text::LevelName104;
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "50";
|
level = "50";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
name = $Text::LevelName106;
|
name = $Text::LevelName106;
|
||||||
difficulty = "9";
|
difficulty = "7";
|
||||||
time = "70000";
|
time = "70000";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "56";
|
level = "56";
|
||||||
include = "1";
|
include = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
difficulty = "10";
|
difficulty = "9";
|
||||||
name = $Text::LevelName75;
|
name = $Text::LevelName75;
|
||||||
};
|
};
|
||||||
new Sky(Sky) {
|
new Sky(Sky) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
new SimGroup(MissionGroup) {
|
new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
difficulty = "9";
|
difficulty = "7";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
level = "53";
|
level = "53";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
difficulty = "10";
|
difficulty = "11";
|
||||||
level = "58";
|
level = "58";
|
||||||
hasEggIndex = "16";
|
hasEggIndex = "16";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ new SimGroup(MissionGroup) {
|
||||||
name = $Text::LevelName58;
|
name = $Text::LevelName58;
|
||||||
include = "1";
|
include = "1";
|
||||||
time = "75000";
|
time = "75000";
|
||||||
difficulty = "10";
|
difficulty = "9";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
hasEggIndex = "20";
|
hasEggIndex = "20";
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "8";
|
difficulty = "9";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
time = "70000";
|
time = "70000";
|
||||||
level = "43";
|
level = "43";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
new SimGroup(MissionGroup) {
|
new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
difficulty = "8";
|
difficulty = "9";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ new SimGroup(MissionGroup) {
|
||||||
time = "60000";
|
time = "60000";
|
||||||
level = "48";
|
level = "48";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "9";
|
difficulty = "8";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
name = $Text::LevelName83;
|
name = $Text::LevelName83;
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "42";
|
level = "42";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "8";
|
difficulty = "7";
|
||||||
name = $Text::LevelName59;
|
name = $Text::LevelName59;
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "45";
|
level = "45";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "8";
|
difficulty = "7";
|
||||||
name = $Text::LevelName72;
|
name = $Text::LevelName72;
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ new SimGroup(MissionGroup) {
|
||||||
include = "1";
|
include = "1";
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
time = "180000";
|
time = "180000";
|
||||||
difficulty = "9";
|
difficulty = "10";
|
||||||
level = "52";
|
level = "52";
|
||||||
name = $Text::LevelName57;
|
name = $Text::LevelName57;
|
||||||
hasEggIndex = "19";
|
hasEggIndex = "19";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "55";
|
level = "55";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "10";
|
difficulty = "8";
|
||||||
name = $Text::LevelName97;
|
name = $Text::LevelName97;
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
time = "105000";
|
time = "105000";
|
||||||
level = "54";
|
level = "54";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "10";
|
difficulty = "11";
|
||||||
name = $Text::LevelName70;
|
name = $Text::LevelName70;
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
hasEggIndex = "18";
|
hasEggIndex = "18";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "3";
|
difficulty = "6";
|
||||||
time = "30000";
|
time = "30000";
|
||||||
level = "14";
|
level = "14";
|
||||||
name = $Text::LevelName34;
|
name = $Text::LevelName34;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "1";
|
difficulty = "5";
|
||||||
time = "45000";
|
time = "45000";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "4";
|
level = "4";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "12";
|
level = "12";
|
||||||
include = "1";
|
include = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
difficulty = "2";
|
difficulty = "5";
|
||||||
desc = "Change gravity to solve this puzzle.";
|
desc = "Change gravity to solve this puzzle.";
|
||||||
};
|
};
|
||||||
new MissionArea(MissionArea) {
|
new MissionArea(MissionArea) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "2";
|
difficulty = "5";
|
||||||
time = "45000";
|
time = "45000";
|
||||||
level = "9";
|
level = "9";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
difficulty = "4";
|
difficulty = "5";
|
||||||
time = "60000";
|
time = "60000";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "18";
|
level = "18";
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "8";
|
level = "8";
|
||||||
time = "100000";
|
time = "100000";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "3";
|
difficulty = "6";
|
||||||
name = $Text::LevelName9;
|
name = $Text::LevelName9;
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "3";
|
difficulty = "6";
|
||||||
time = "20000";
|
time = "20000";
|
||||||
level = "19";
|
level = "19";
|
||||||
type = "Beginner";
|
type = "Beginner";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "Beginner";
|
type = "Beginner";
|
||||||
name = $Text::LevelName7;
|
name = $Text::LevelName7;
|
||||||
time = "45000";
|
time = "45000";
|
||||||
difficulty = "2";
|
difficulty = "5";
|
||||||
include = "1";
|
include = "1";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "2";
|
difficulty = "4";
|
||||||
time = "45000";
|
time = "45000";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "6";
|
level = "6";
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "1";
|
level = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
name = $Text::LevelName1;
|
name = $Text::LevelName1;
|
||||||
difficulty = "1";
|
difficulty = "4";
|
||||||
hasEggIndex = "1";
|
hasEggIndex = "1";
|
||||||
goldTime = "7000";
|
goldTime = "7000";
|
||||||
proTime = "16000";
|
proTime = "16000";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "1";
|
difficulty = "4";
|
||||||
time = "45000";
|
time = "45000";
|
||||||
isInDemoMode = "1";
|
isInDemoMode = "1";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "1";
|
difficulty = "4";
|
||||||
time = "70000";
|
time = "70000";
|
||||||
isInDemoMode = "1";
|
isInDemoMode = "1";
|
||||||
level = "3";
|
level = "3";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
difficulty = "1";
|
difficulty = "3";
|
||||||
time = "45000";
|
time = "45000";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "2";
|
level = "2";
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
new SimGroup(MissionGroup) {
|
new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
difficulty = "2";
|
difficulty = "5";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "10";
|
level = "10";
|
||||||
isInDemoMode = "1";
|
isInDemoMode = "1";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
desc = "Be careful crossing these bridges.";
|
desc = "Be careful crossing these bridges.";
|
||||||
level = "11";
|
level = "11";
|
||||||
time = "60000";
|
time = "60000";
|
||||||
difficulty = "2";
|
difficulty = "5";
|
||||||
name = $Text::LevelName21;
|
name = $Text::LevelName21;
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
include = true;
|
include = true;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "13";
|
level = "13";
|
||||||
name = $Text::LevelName22;
|
name = $Text::LevelName22;
|
||||||
time = "60000";
|
time = "60000";
|
||||||
difficulty = "3";
|
difficulty = "5";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
desc = "Practice with moving platforms.";
|
desc = "Practice with moving platforms.";
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ new SimGroup(MissionGroup) {
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
name = $Text::LevelName28;
|
name = $Text::LevelName28;
|
||||||
difficulty = "3";
|
difficulty = "6";
|
||||||
hasEggIndex = "4";
|
hasEggIndex = "4";
|
||||||
};
|
};
|
||||||
new MissionArea(MissionArea) {
|
new MissionArea(MissionArea) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "3";
|
difficulty = "6";
|
||||||
artist = "Kevin Ryan & Tim Aste";
|
artist = "Kevin Ryan & Tim Aste";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
time = "90000";
|
time = "90000";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
level = "20";
|
level = "20";
|
||||||
difficulty = "4";
|
difficulty = "6";
|
||||||
name = $Text::LevelName48;
|
name = $Text::LevelName48;
|
||||||
hasEggIndex = "5";
|
hasEggIndex = "5";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "15";
|
level = "15";
|
||||||
name = $Text::LevelName23;
|
name = $Text::LevelName23;
|
||||||
time = "80000";
|
time = "80000";
|
||||||
difficulty = "3";
|
difficulty = "5";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
desc = "Follow the path and fly to the goal.";
|
desc = "Follow the path and fly to the goal.";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "5";
|
difficulty = "7";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
artist = "Kevin Ryan and Tim Aste";
|
artist = "Kevin Ryan and Tim Aste";
|
||||||
time = "30000";
|
time = "30000";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
desc = "Gather all the gems around the globe in less than 30 seconds.";
|
desc = "Gather all the gems around the globe in less than 30 seconds.";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "4";
|
difficulty = "7";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
artist = "Kevin Ryan";
|
artist = "Kevin Ryan";
|
||||||
time = "30000";
|
time = "30000";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
include = "1";
|
include = "1";
|
||||||
level = "35";
|
level = "35";
|
||||||
difficulty = "6";
|
difficulty = "8";
|
||||||
name = $Text::LevelName103;
|
name = $Text::LevelName103;
|
||||||
desc = "Black Diamond";
|
desc = "Black Diamond";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "27";
|
level = "27";
|
||||||
name = $Text::LevelName86;
|
name = $Text::LevelName86;
|
||||||
time = "30000";
|
time = "30000";
|
||||||
difficulty = "4";
|
difficulty = "6";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
type = "intermediate";
|
type = "intermediate";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
time = "120000";
|
time = "120000";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "5";
|
difficulty = "7";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
level = "23";
|
level = "23";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ new SimGroup(MissionGroup) {
|
||||||
include = "1";
|
include = "1";
|
||||||
time = "60000";
|
time = "60000";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
difficulty = "7";
|
difficulty = "6";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
level = "39";
|
level = "39";
|
||||||
name = $Text::LevelName36;
|
name = $Text::LevelName36;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
time = "50000";
|
time = "50000";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "4";
|
difficulty = "7";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
level = "21";
|
level = "21";
|
||||||
isInDemoMode = "1";
|
isInDemoMode = "1";
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ new SimGroup(MissionGroup) {
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
time = "50000";
|
time = "50000";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "5";
|
difficulty = "6";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
};
|
};
|
||||||
new MissionArea(MissionArea) {
|
new MissionArea(MissionArea) {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ new SimGroup(MissionGroup) {
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
include = "1";
|
include = "1";
|
||||||
name = $Text::LevelName101;
|
name = $Text::LevelName101;
|
||||||
difficulty = "5";
|
difficulty = "7";
|
||||||
isInDemoMode = "1";
|
isInDemoMode = "1";
|
||||||
};
|
};
|
||||||
new MissionArea(MissionArea) {
|
new MissionArea(MissionArea) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
new SimGroup(MissionGroup) {
|
new SimGroup(MissionGroup) {
|
||||||
|
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
difficulty = "7";
|
difficulty = "6";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
level = "36";
|
level = "36";
|
||||||
desc = "Careful, its slippery!";
|
desc = "Careful, its slippery!";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "33";
|
level = "33";
|
||||||
name = $Text::LevelName37;
|
name = $Text::LevelName37;
|
||||||
time = "120000";
|
time = "120000";
|
||||||
difficulty = "6";
|
difficulty = "7";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
artist = "Kevin Ryan";
|
artist = "Kevin Ryan";
|
||||||
desc = "Find the gems in the maze of roads!";
|
desc = "Find the gems in the maze of roads!";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ new SimGroup(MissionGroup) {
|
||||||
level = "22";
|
level = "22";
|
||||||
name = $Text::LevelName107;
|
name = $Text::LevelName107;
|
||||||
time = "120000";
|
time = "120000";
|
||||||
difficulty = "4";
|
difficulty = "8";
|
||||||
gameType = "SinglePlayer";
|
gameType = "SinglePlayer";
|
||||||
desc = "Its a jungle out there!";
|
desc = "Its a jungle out there!";
|
||||||
type = "Intermediate";
|
type = "Intermediate";
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ new SimGroup(MissionGroup) {
|
||||||
include = "1";
|
include = "1";
|
||||||
artist = "Alex Swanson";
|
artist = "Alex Swanson";
|
||||||
level = "38";
|
level = "38";
|
||||||
difficulty = "7";
|
difficulty = "6";
|
||||||
startHelpTest = "Climb to the top!";
|
startHelpTest = "Climb to the top!";
|
||||||
desc = "Climb to the top!";
|
desc = "Climb to the top!";
|
||||||
name = $Text::LevelName80;
|
name = $Text::LevelName80;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
type = "intermediate";
|
type = "intermediate";
|
||||||
include = "1";
|
include = "1";
|
||||||
difficulty = "6";
|
difficulty = "8";
|
||||||
level = "37";
|
level = "37";
|
||||||
time = "120000";
|
time = "120000";
|
||||||
name = $Text::LevelName73;
|
name = $Text::LevelName73;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "advanced";
|
type = "advanced";
|
||||||
gameMode = "Scrum";
|
gameMode = "Scrum";
|
||||||
name = $Text::LevelNameMP21;
|
name = $Text::LevelNameMP21;
|
||||||
difficulty = "8";
|
difficulty = "9";
|
||||||
numgems = "1";
|
numgems = "1";
|
||||||
goldTime = "0";
|
goldTime = "0";
|
||||||
guid = "{3DCFC6EE-A2DE-465F-B040-6FC31D5C0B6E}";
|
guid = "{3DCFC6EE-A2DE-465F-B040-6FC31D5C0B6E}";
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ new SimGroup(MissionGroup) {
|
||||||
type = "beginner";
|
type = "beginner";
|
||||||
gameMode = "Scrum";
|
gameMode = "Scrum";
|
||||||
name = $Text::LevelNameMP18;
|
name = $Text::LevelNameMP18;
|
||||||
difficulty = "4";
|
difficulty = "6";
|
||||||
gemGroupRadius = "25";
|
gemGroupRadius = "25";
|
||||||
goldTime = "0";
|
goldTime = "0";
|
||||||
numgems = "1";
|
numgems = "1";
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ new SimGroup(MissionGroup) {
|
||||||
new ScriptObject(MissionInfo) {
|
new ScriptObject(MissionInfo) {
|
||||||
gameMode = "Scrum";
|
gameMode = "Scrum";
|
||||||
level = "84";
|
level = "84";
|
||||||
difficulty = "9";
|
difficulty = "7";
|
||||||
maxGemsPerGroup = "6";
|
maxGemsPerGroup = "6";
|
||||||
time = "300000";
|
time = "300000";
|
||||||
type = "intermediate";
|
type = "intermediate";
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,13 @@ typedef LBScore = {
|
||||||
score:Float,
|
score:Float,
|
||||||
platform:Int,
|
platform:Int,
|
||||||
rewind:Int,
|
rewind:Int,
|
||||||
|
rating:Int,
|
||||||
|
}
|
||||||
|
|
||||||
|
typedef LBPlayer = {
|
||||||
|
uid:String,
|
||||||
|
name:String,
|
||||||
|
rating:Int,
|
||||||
}
|
}
|
||||||
|
|
||||||
enum abstract LeaderboardsKind(Int) {
|
enum abstract LeaderboardsKind(Int) {
|
||||||
|
|
@ -59,6 +66,17 @@ class Leaderboards {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getTopPlayers(kind:LeaderboardsKind, cb:Array<LBPlayer>->Void) {
|
||||||
|
return Http.get('${host}/api/players?&game=${game}&view=${kind}', (b) -> {
|
||||||
|
var s = b.toString();
|
||||||
|
var players:Array<LBPlayer> = Json.parse(s).players;
|
||||||
|
cb(players);
|
||||||
|
}, (e) -> {
|
||||||
|
Console.log("Failed to get players: " + e);
|
||||||
|
cb([]);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static function submitReplay(ref:Int, replay:haxe.io.Bytes) {
|
public static function submitReplay(ref:Int, replay:haxe.io.Bytes) {
|
||||||
return Http.uploadFile('${host}/api/record?ref=${ref}', replay, (b) -> {
|
return Http.uploadFile('${host}/api/record?ref=${ref}', replay, (b) -> {
|
||||||
Console.log("Replay submitted");
|
Console.log("Replay submitted");
|
||||||
|
|
|
||||||
|
|
@ -118,9 +118,9 @@ class EndGameGui extends GuiImage {
|
||||||
var completionBonus = 1000;
|
var completionBonus = 1000;
|
||||||
var timeBonus = 0;
|
var timeBonus = 0;
|
||||||
if (t < parTime)
|
if (t < parTime)
|
||||||
timeBonus = Math.floor(parTime / t) * 1000;
|
timeBonus = Math.floor((parTime / t) * 1000);
|
||||||
else
|
else
|
||||||
timeBonus = Math.floor(parTime / t) * 500;
|
timeBonus = Math.floor((parTime / t) * 500);
|
||||||
return (completionBonus + timeBonus) * difficulty;
|
return (completionBonus + timeBonus) * difficulty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import gui.HtmlText;
|
||||||
class LeaderboardsGui extends GuiImage {
|
class LeaderboardsGui extends GuiImage {
|
||||||
var innerCtrl:GuiControl;
|
var innerCtrl:GuiControl;
|
||||||
|
|
||||||
public function new(index:Int, levelSelectDifficulty:String, levelSelectGui:Bool = false,) {
|
public function new(index:Int, levelSelectDifficulty:String, levelSelectGui:Bool = false) {
|
||||||
var res = ResourceLoader.getImage("data/ui/xbox/BG_fadeOutSoftEdge.png").resource.toTile();
|
var res = ResourceLoader.getImage("data/ui/xbox/BG_fadeOutSoftEdge.png").resource.toTile();
|
||||||
super(res);
|
super(res);
|
||||||
var domcasual32fontdata = ResourceLoader.getFileEntry("data/font/DomCasualD.fnt");
|
var domcasual32fontdata = ResourceLoader.getFileEntry("data/font/DomCasualD.fnt");
|
||||||
|
|
@ -116,7 +116,8 @@ class LeaderboardsGui extends GuiImage {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var headerText = '<font face="arial12">Rank<offset value="50">Name</offset><offset value="500">Score</offset><offset value="600">Platform</offset></font>';
|
var headerText = '<font face="arial12">Rank<offset value="50">Name</offset><offset value="400">Score</offset><offset value="500">Rating</offset><offset value="600">Platform</offset></font>';
|
||||||
|
var playerHeaderText = '<font face="arial12">Rank<offset value="50">Name</offset><offset value="575">Rating</offset></font>';
|
||||||
|
|
||||||
var scores = [
|
var scores = [
|
||||||
'<offset value="10">1. </offset><offset value="50">Nardo Polo</offset><offset value="500">99:59:999</offset><offset value="625"><img src="unknown"/></offset>',
|
'<offset value="10">1. </offset><offset value="50">Nardo Polo</offset><offset value="500">99:59:999</offset><offset value="625"><img src="unknown"/></offset>',
|
||||||
|
|
@ -145,7 +146,7 @@ class LeaderboardsGui extends GuiImage {
|
||||||
.concat(MissionList.missionList.get('ultra').get('advanced'))
|
.concat(MissionList.missionList.get('ultra').get('advanced'))
|
||||||
.concat(MissionList.missionList.get('ultra').get('multiplayer'));
|
.concat(MissionList.missionList.get('ultra').get('multiplayer'));
|
||||||
|
|
||||||
var actualIndex = allMissions.indexOf(MissionList.missionList.get('ultra').get(levelSelectDifficulty)[index]);
|
var actualIndex = levelSelectDifficulty != "players" ? allMissions.indexOf(MissionList.missionList.get('ultra').get(levelSelectDifficulty)[index]) : 0;
|
||||||
|
|
||||||
levelTitle.text.text = 'Level ${actualIndex + 1}';
|
levelTitle.text.text = 'Level ${actualIndex + 1}';
|
||||||
|
|
||||||
|
|
@ -154,6 +155,10 @@ class LeaderboardsGui extends GuiImage {
|
||||||
var scoreCategories = ["Overall", "Rewind", "Non-Rewind"];
|
var scoreCategories = ["Overall", "Rewind", "Non-Rewind"];
|
||||||
var scoreView:LeaderboardsKind = cast Settings.optionsSettings.currentView;
|
var scoreView:LeaderboardsKind = cast Settings.optionsSettings.currentView;
|
||||||
|
|
||||||
|
if (levelSelectDifficulty == "players") {
|
||||||
|
levelTitle.text.text = 'Top Players: ${scoreCategories[cast scoreView]}';
|
||||||
|
}
|
||||||
|
|
||||||
var currentMission = allMissions[actualIndex];
|
var currentMission = allMissions[actualIndex];
|
||||||
|
|
||||||
var scoreTok = 0;
|
var scoreTok = 0;
|
||||||
|
|
@ -171,8 +176,9 @@ class LeaderboardsGui extends GuiImage {
|
||||||
for (score in scoreList) {
|
for (score in scoreList) {
|
||||||
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="375">${score.rewind > 0 ? "<img src='rewind'/>" : ""}</offset>
|
||||||
<offset value="500">${isHuntScore ? Std.string(1000 - score.score) : Util.formatTime(score.score)}</offset>
|
<offset value="400">${isHuntScore ? Std.string(1000 - score.score) : Util.formatTime(score.score)}</offset>
|
||||||
|
<offset value="500">${score.rating}</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++;
|
||||||
|
|
@ -187,6 +193,31 @@ class LeaderboardsGui extends GuiImage {
|
||||||
scoreCtrl.text.text = headerText + "<br/><br/><br/><br/><br/>" + '<p align="center">Loading...</p>';
|
scoreCtrl.text.text = headerText + "<br/><br/><br/><br/><br/>" + '<p align="center">Loading...</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fetchPlayers() {
|
||||||
|
var ourToken = scoreTok++;
|
||||||
|
Leaderboards.getTopPlayers(scoreView, (scoreList) -> {
|
||||||
|
if (ourToken + 1 != scoreTok)
|
||||||
|
return;
|
||||||
|
var scoreTexts = [];
|
||||||
|
var i = 1;
|
||||||
|
|
||||||
|
for (score in scoreList) {
|
||||||
|
var scoreText = '<offset value="10">${i}. </offset>
|
||||||
|
<offset value="50">${score.name}</offset>
|
||||||
|
<offset value="575">${score.rating}</offset>';
|
||||||
|
scoreTexts.push(scoreText);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
while (i <= 10) {
|
||||||
|
var scoreText = '<offset value="10">${i}. </offset><offset value="475">10000</offset>';
|
||||||
|
scoreTexts.push(scoreText);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
scoreCtrl.text.text = playerHeaderText + "<br/>" + scoreTexts.join('<br/>');
|
||||||
|
});
|
||||||
|
scoreCtrl.text.text = playerHeaderText + "<br/><br/><br/><br/><br/>" + '<p align="center">Loading...</p>';
|
||||||
|
}
|
||||||
|
|
||||||
var levelSelectOpts = new GuiXboxOptionsList(2, "Overall", levelNames);
|
var levelSelectOpts = new GuiXboxOptionsList(2, "Overall", levelNames);
|
||||||
levelSelectOpts.position = new Vector(380, 485);
|
levelSelectOpts.position = new Vector(380, 485);
|
||||||
levelSelectOpts.extent = new Vector(815, 94);
|
levelSelectOpts.extent = new Vector(815, 94);
|
||||||
|
|
@ -194,12 +225,19 @@ class LeaderboardsGui extends GuiImage {
|
||||||
levelSelectOpts.horizSizing = Right;
|
levelSelectOpts.horizSizing = Right;
|
||||||
levelSelectOpts.alwaysActive = true;
|
levelSelectOpts.alwaysActive = true;
|
||||||
levelSelectOpts.onChangeFunc = (l) -> {
|
levelSelectOpts.onChangeFunc = (l) -> {
|
||||||
|
if (levelSelectDifficulty == "players") {
|
||||||
|
fetchPlayers();
|
||||||
|
levelTitle.text.text = 'Top Players: ${scoreCategories[cast scoreView]}';
|
||||||
|
return true;
|
||||||
|
}
|
||||||
levelTitle.text.text = 'Level ${l + 1}';
|
levelTitle.text.text = 'Level ${l + 1}';
|
||||||
currentMission = allMissions[l];
|
currentMission = allMissions[l];
|
||||||
fetchScores();
|
fetchScores();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
levelSelectOpts.setCurrentOption(actualIndex);
|
levelSelectOpts.setCurrentOption(actualIndex);
|
||||||
|
|
||||||
|
if (levelSelectDifficulty != "players")
|
||||||
innerCtrl.addChild(levelSelectOpts);
|
innerCtrl.addChild(levelSelectOpts);
|
||||||
|
|
||||||
var bottomBar = new GuiControl();
|
var bottomBar = new GuiControl();
|
||||||
|
|
@ -218,7 +256,7 @@ class LeaderboardsGui extends GuiImage {
|
||||||
if (levelSelectGui)
|
if (levelSelectGui)
|
||||||
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LevelSelectGui(levelSelectDifficulty));
|
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LevelSelectGui(levelSelectDifficulty));
|
||||||
else {
|
else {
|
||||||
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new MainMenuGui());
|
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new LeaderboardsSelectGui());
|
||||||
}
|
}
|
||||||
bottomBar.addChild(backButton);
|
bottomBar.addChild(backButton);
|
||||||
|
|
||||||
|
|
@ -231,10 +269,15 @@ class LeaderboardsGui extends GuiImage {
|
||||||
scoreView = scoreView == All ? Rewind : (scoreView == Rewind ? NoRewind : All);
|
scoreView = scoreView == All ? Rewind : (scoreView == Rewind ? NoRewind : All);
|
||||||
Settings.optionsSettings.currentView = cast scoreView;
|
Settings.optionsSettings.currentView = cast scoreView;
|
||||||
levelSelectOpts.labelText.text.text = scoreCategories[cast(scoreView, Int)];
|
levelSelectOpts.labelText.text.text = scoreCategories[cast(scoreView, Int)];
|
||||||
|
if (levelSelectDifficulty == "players") {
|
||||||
|
levelTitle.text.text = 'Top Players: ${scoreCategories[cast scoreView]}';
|
||||||
|
fetchPlayers();
|
||||||
|
} else
|
||||||
fetchScores();
|
fetchScores();
|
||||||
}
|
}
|
||||||
bottomBar.addChild(changeViewButton);
|
bottomBar.addChild(changeViewButton);
|
||||||
|
|
||||||
|
if (levelSelectDifficulty != "players") {
|
||||||
var replayButton = new GuiXboxButton("Watch Replay", 220);
|
var replayButton = new GuiXboxButton("Watch Replay", 220);
|
||||||
replayButton.position = new Vector(750, 0);
|
replayButton.position = new Vector(750, 0);
|
||||||
replayButton.vertSizing = Bottom;
|
replayButton.vertSizing = Bottom;
|
||||||
|
|
@ -270,7 +313,11 @@ class LeaderboardsGui extends GuiImage {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
bottomBar.addChild(replayButton);
|
bottomBar.addChild(replayButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (levelSelectDifficulty == "players") {
|
||||||
|
fetchPlayers();
|
||||||
|
} else
|
||||||
fetchScores();
|
fetchScores();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
103
src/gui/LeaderboardsSelectGui.hx
Normal file
103
src/gui/LeaderboardsSelectGui.hx
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
package gui;
|
||||||
|
|
||||||
|
import h2d.filter.DropShadow;
|
||||||
|
import src.MarbleGame;
|
||||||
|
import gui.GuiControl.MouseState;
|
||||||
|
import hxd.res.BitmapFont;
|
||||||
|
import h3d.Vector;
|
||||||
|
import src.ResourceLoader;
|
||||||
|
import src.Settings;
|
||||||
|
|
||||||
|
class LeaderboardsSelectGui extends GuiImage {
|
||||||
|
var innerCtrl:GuiControl;
|
||||||
|
var btnList:GuiXboxList;
|
||||||
|
|
||||||
|
public function new() {
|
||||||
|
var res = ResourceLoader.getImage("data/ui/xbox/BG_fadeOutSoftEdge.png").resource.toTile();
|
||||||
|
super(res);
|
||||||
|
var domcasual32fontdata = ResourceLoader.getFileEntry("data/font/DomCasualD.fnt");
|
||||||
|
var domcasual32b = new BitmapFont(domcasual32fontdata.entry);
|
||||||
|
@:privateAccess domcasual32b.loader = ResourceLoader.loader;
|
||||||
|
var domcasual32 = domcasual32b.toSdfFont(cast 42 * Settings.uiScale, MultiChannel);
|
||||||
|
|
||||||
|
this.horizSizing = Width;
|
||||||
|
this.vertSizing = Height;
|
||||||
|
this.position = new Vector();
|
||||||
|
this.extent = new Vector(640, 480);
|
||||||
|
|
||||||
|
#if hl
|
||||||
|
var scene2d = hxd.Window.getInstance();
|
||||||
|
#end
|
||||||
|
#if js
|
||||||
|
var scene2d = MarbleGame.instance.scene2d;
|
||||||
|
#end
|
||||||
|
|
||||||
|
var offsetX = (scene2d.width - 1280) / 2;
|
||||||
|
var offsetY = (scene2d.height - 720) / 2;
|
||||||
|
|
||||||
|
var subX = 640 - (scene2d.width - offsetX) * 640 / scene2d.width;
|
||||||
|
var subY = 480 - (scene2d.height - offsetY) * 480 / scene2d.height;
|
||||||
|
|
||||||
|
innerCtrl = new GuiControl();
|
||||||
|
innerCtrl.position = new Vector(offsetX, offsetY);
|
||||||
|
innerCtrl.extent = new Vector(640 - subX, 480 - subY);
|
||||||
|
innerCtrl.horizSizing = Width;
|
||||||
|
innerCtrl.vertSizing = Height;
|
||||||
|
this.addChild(innerCtrl);
|
||||||
|
|
||||||
|
var coliseumfontdata = ResourceLoader.getFileEntry("data/font/ColiseumRR.fnt");
|
||||||
|
var coliseumb = new BitmapFont(coliseumfontdata.entry);
|
||||||
|
@:privateAccess coliseumb.loader = ResourceLoader.loader;
|
||||||
|
var coliseum = coliseumb.toSdfFont(cast 44 * Settings.uiScale, MultiChannel);
|
||||||
|
|
||||||
|
var rootTitle = new GuiText(coliseum);
|
||||||
|
rootTitle.position = new Vector(100, 30);
|
||||||
|
rootTitle.extent = new Vector(1120, 80);
|
||||||
|
rootTitle.text.textColor = 0xFFFFFF;
|
||||||
|
rootTitle.text.text = "SELECT LEADERBOARDS";
|
||||||
|
rootTitle.text.alpha = 0.5;
|
||||||
|
innerCtrl.addChild(rootTitle);
|
||||||
|
|
||||||
|
btnList = new GuiXboxList();
|
||||||
|
btnList.position = new Vector(70 - offsetX, 165);
|
||||||
|
btnList.horizSizing = Left;
|
||||||
|
btnList.extent = new Vector(502, 500);
|
||||||
|
innerCtrl.addChild(btnList);
|
||||||
|
|
||||||
|
btnList.addButton(0, 'Level Leaderboards', (e) -> {
|
||||||
|
MarbleGame.canvas.setContent(new LeaderboardsGui(0, "beginner", false));
|
||||||
|
});
|
||||||
|
btnList.addButton(0, 'Player Leaderboards', (e) -> {
|
||||||
|
MarbleGame.canvas.setContent(new LeaderboardsGui(0, "players", false));
|
||||||
|
});
|
||||||
|
var bottomBar = new GuiControl();
|
||||||
|
bottomBar.position = new Vector(0, 590);
|
||||||
|
bottomBar.extent = new Vector(640, 200);
|
||||||
|
bottomBar.horizSizing = Width;
|
||||||
|
bottomBar.vertSizing = Bottom;
|
||||||
|
innerCtrl.addChild(bottomBar);
|
||||||
|
|
||||||
|
var backButton = new GuiXboxButton("Back", 160);
|
||||||
|
backButton.position = new Vector(400, 0);
|
||||||
|
backButton.vertSizing = Bottom;
|
||||||
|
backButton.horizSizing = Right;
|
||||||
|
backButton.gamepadAccelerator = [Settings.gamepadSettings.back];
|
||||||
|
backButton.accelerators = [hxd.Key.ESCAPE, hxd.Key.BACKSPACE];
|
||||||
|
backButton.pressedAction = (e) -> MarbleGame.canvas.setContent(new MainMenuGui());
|
||||||
|
|
||||||
|
bottomBar.addChild(backButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
override function onResize(width:Int, height:Int) {
|
||||||
|
var offsetX = (width - 1280) / 2;
|
||||||
|
var offsetY = (height - 720) / 2;
|
||||||
|
|
||||||
|
var subX = 640 - (width - offsetX) * 640 / width;
|
||||||
|
var subY = 480 - (height - offsetY) * 480 / height;
|
||||||
|
innerCtrl.position = new Vector(offsetX, offsetY);
|
||||||
|
innerCtrl.extent = new Vector(640 - subX, 480 - subY);
|
||||||
|
btnList.position = new Vector(70 - offsetX, 165);
|
||||||
|
|
||||||
|
super.onResize(width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -80,7 +80,7 @@ class MainMenuGui extends GuiImage {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
btnList.addButton(2, "Leaderboards", (e) -> {
|
btnList.addButton(2, "Leaderboards", (e) -> {
|
||||||
cast(this.parent, Canvas).setContent(new LeaderboardsGui(0, "beginner", false));
|
cast(this.parent, Canvas).setContent(new LeaderboardsSelectGui());
|
||||||
}, 20);
|
}, 20);
|
||||||
btnList.addButton(2, "Achievements", (e) -> {
|
btnList.addButton(2, "Achievements", (e) -> {
|
||||||
cast(this.parent, Canvas).setContent(new AchievementsGui());
|
cast(this.parent, Canvas).setContent(new AchievementsGui());
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue