Add the end-screen for beating The Final Challenge to make the mission text true
TODO: record real voice for congrats.wav
This commit is contained in:
parent
d80a53951f
commit
d1c43b6583
|
@ -83,12 +83,14 @@ function initClient()
|
||||||
exec("./ui/loadingGui.gui");
|
exec("./ui/loadingGui.gui");
|
||||||
exec("./ui/optionsDlg.gui");
|
exec("./ui/optionsDlg.gui");
|
||||||
exec("./ui/remapDlg.gui");
|
exec("./ui/remapDlg.gui");
|
||||||
exec("./ui/MOTDGui.gui");
|
//exec("./ui/MOTDGui.gui");
|
||||||
exec("./ui/EnterNameDlg.gui");
|
exec("./ui/EnterNameDlg.gui");
|
||||||
EnterNameDlg.preload();
|
EnterNameDlg.preload();
|
||||||
exec("./ui/HelpCreditsGui.gui");
|
exec("./ui/HelpCreditsGui.gui");
|
||||||
exec("./ui/ExitGameDlg.gui");
|
exec("./ui/ExitGameDlg.gui");
|
||||||
exec("./ui/MiniShotGui.gui");
|
exec("./ui/MiniShotGui.gui");
|
||||||
|
// custom gui files
|
||||||
|
exec("./ui/congratsGui.gui");
|
||||||
|
|
||||||
// Client scripts
|
// Client scripts
|
||||||
exec("./scripts/client.cs");
|
exec("./scripts/client.cs");
|
||||||
|
@ -104,7 +106,7 @@ function initClient()
|
||||||
exec("./scripts/centerPrint.cs");
|
exec("./scripts/centerPrint.cs");
|
||||||
exec("./scripts/game.cs");
|
exec("./scripts/game.cs");
|
||||||
exec("./scripts/version.cs");
|
exec("./scripts/version.cs");
|
||||||
// custom guis
|
// custom gui scripts
|
||||||
exec("./scripts/MarbleSkinSelectionDlg.cs");
|
exec("./scripts/MarbleSkinSelectionDlg.cs");
|
||||||
|
|
||||||
// Default player key bindings
|
// Default player key bindings
|
||||||
|
|
|
@ -33,6 +33,11 @@ function clientCmdGameEnd()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
getBestTimes($Server::MissionFile);
|
getBestTimes($Server::MissionFile);
|
||||||
|
if($Server::MissionFile $= "marble/data/missions/expert/timmysfork.mis") {
|
||||||
|
// if we've beaten The Final Challenge show the epic finale
|
||||||
|
gameIsCompleteSignalForEndGameGui(1);
|
||||||
|
Canvas.pushDialog(congratsGui);
|
||||||
|
}
|
||||||
$highScoreIndex = "";
|
$highScoreIndex = "";
|
||||||
for(%i = 0; %i < 3; %i++)
|
for(%i = 0; %i < 3; %i++)
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
|
@ -0,0 +1,38 @@
|
||||||
|
new GuiChunkedBitmapCtrl(congratsGui) {
|
||||||
|
profile = "GuiContentProfile";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "640 480";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
helpTag = "0";
|
||||||
|
bitmap = "./congrats.jpg";
|
||||||
|
useVariable = "0";
|
||||||
|
tile = "0";
|
||||||
|
|
||||||
|
new GuiBitmapButtonCtrl() {
|
||||||
|
profile = "GuiButtonProfile";
|
||||||
|
horizSizing = "center";
|
||||||
|
vertSizing = "top";
|
||||||
|
position = "280 415";
|
||||||
|
extent = "111 59";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
command = "setPlayMissionGui();gameIsCompleteSignalForEndGameGui(0);";
|
||||||
|
accelerator = "escape";
|
||||||
|
helpTag = "0";
|
||||||
|
text = "play";
|
||||||
|
groupNum = "-1";
|
||||||
|
buttonType = "PushButton";
|
||||||
|
bitmap = "./play/play";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
function congratsGui::onWake() {
|
||||||
|
if (!alxIsPlaying($WinSoundHandle))
|
||||||
|
{
|
||||||
|
$WinSoundHandle = alxCreateSource("AudioChannel0", expandFilename("~/data/sound/congrats.wav"));
|
||||||
|
alxPlay($WinSoundHandle);
|
||||||
|
}
|
||||||
|
}
|
|
@ -36,7 +36,7 @@ new GuiControl(EndGameGui) {
|
||||||
allowColorChars = "0";
|
allowColorChars = "0";
|
||||||
maxChars = "-1";
|
maxChars = "-1";
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl(EndGameContinueButton) {
|
||||||
profile = "GuiButtonProfile";
|
profile = "GuiButtonProfile";
|
||||||
horizSizing = "right";
|
horizSizing = "right";
|
||||||
vertSizing = "bottom";
|
vertSizing = "bottom";
|
||||||
|
@ -70,3 +70,11 @@ new GuiControl(EndGameGui) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
//--- OBJECT WRITE END ---
|
//--- OBJECT WRITE END ---
|
||||||
|
|
||||||
|
function gameIsCompleteSignalForEndGameGui(%probably) {
|
||||||
|
if(%probably) {
|
||||||
|
EndGameContinueButton.command = "Canvas.popDialog(EndGameGui);";
|
||||||
|
} else {
|
||||||
|
EndGameContinueButton.command = "setPlayMissionGui();";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue