Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/loading/loading.js
var g_Data; | var g_Data; | ||||
var g_EndPieceWidth = 16; | var g_EndPieceWidth = 16; | ||||
function init(data) | function init(data) | ||||
{ | { | ||||
g_Data = data; | g_Data = data; | ||||
Engine.SetCursor("cursor-wait"); | Engine.SetCursor("cursor-wait"); | ||||
// Get tip image and corresponding tip text | // Get tip image and corresponding tip text | ||||
let tipTextLoadingArray = Engine.BuildDirEntList("gui/text/tips/", "*.txt", false); | let tipTextLoadingArray = Engine.ListDirectoryFiles("gui/text/tips/", "*.txt", false); | ||||
if (tipTextLoadingArray.length > 0) | if (tipTextLoadingArray.length > 0) | ||||
{ | { | ||||
// Set tip text | // Set tip text | ||||
let tipTextFilePath = pickRandom(tipTextLoadingArray); | let tipTextFilePath = pickRandom(tipTextLoadingArray); | ||||
let tipText = Engine.TranslateLines(Engine.ReadFile(tipTextFilePath)); | let tipText = Engine.TranslateLines(Engine.ReadFile(tipTextFilePath)); | ||||
if (tipText) | if (tipText) | ||||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator