0ad/binaries/data/mods/public/gui/loading/TitleDisplay.js
elexis c16eddaedc Rewrite loading screen to use class semantics, refs #5387.
Add config option to display the loading screen stage description.
Add tip functions for future use, refs D1730.
Harmonize coordinates.

Differential Revision: https://code.wildfiregames.com/D2418
This was SVN commit r23150.
2019-11-12 15:54:09 +00:00

17 lines
489 B
JavaScript

/**
* This class choses the title of the loading screen page.
*/
class TitleDisplay
{
constructor(data)
{
let loadingMapName = Engine.GetGUIObjectByName("loadingMapName");
loadingMapName.caption = sprintf(
data.attribs.mapType == "random" ? this.Generating : this.Loading,
{ "map": translate(data.attribs.settings.Name) });
}
}
TitleDisplay.prototype.Generating = translate("Generating “%(map)s”");
TitleDisplay.prototype.Loading = translate("Loading “%(map)s”");