1
0
forked from mirrors/0ad
Files
0ad/binaries/data/mods/public/gui/loading/loading.js
T
ramtzok1 1b797ce0a0 Add specific tips for multiplayer sessions
A multi player loading screen will have possibility of showing single
and multi player tips while multi player tips are in favor.

Tips are now separated by categories. During loading those category
have an occurrence probability, where we are choosing a random category
based on chance and not by complete randomness. From there we just
picking a random tip from that category.
2025-04-12 10:38:57 +02:00

25 lines
600 B
JavaScript

var g_LoadingPage;
function init(data)
{
g_LoadingPage = {
"initData": data,
"progressBar": new ProgressBar(),
"quoteDisplay": new QuoteDisplay(),
"tipDisplay": new TipDisplay({ "tipScrolling": false, "isOnLoadingScreen": true }),
"titleDisplay": new TitleDisplay(data)
};
Engine.SetCursor("cursor-wait");
}
/**
* This is a reserved function name that is executed by the engine when it is ready
* to start the game (i.e. loading progress has reached 100%).
*/
function reallyStartGame()
{
Engine.SwitchGuiPage("page_session.xml", g_LoadingPage.initData);
Engine.ResetCursor();
}