0ad/binaries/data/mods/public/gui/loading/QuoteDisplay.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

14 lines
329 B
JavaScript

/**
* This class is concerned with chosing and displaying quotes from historical figures.
*/
class QuoteDisplay
{
constructor()
{
Engine.GetGUIObjectByName("quoteText").caption =
translate(pickRandom(
Engine.ReadFileLines(this.File).filter(line => line)));
}
}
QuoteDisplay.prototype.File = "gui/text/quotes.txt";