Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/functions_global_object.js
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
let counters = []; | let counters = []; | ||||
if (Engine.ConfigDB_GetValue("user", "overlay.fps") === "true") | if (Engine.ConfigDB_GetValue("user", "overlay.fps") === "true") | ||||
// dennis-ignore: * | // dennis-ignore: * | ||||
counters.push(sprintf(translate("FPS: %(fps)4s"), { "fps": Engine.GetFPS() })); | counters.push(sprintf(translate("FPS: %(fps)4s"), { "fps": Engine.GetFPS() })); | ||||
if (Engine.ConfigDB_GetValue("user", "overlay.realtime") === "true") | if (Engine.ConfigDB_GetValue("user", "overlay.realtime") === "true") | ||||
counters.push((new Date()).toLocaleTimeString()); | counters.push(timeOfDayToString(Date.now())); | ||||
// If game has been started | // If game has been started | ||||
if (typeof appendSessionCounters != "undefined") | if (typeof appendSessionCounters != "undefined") | ||||
appendSessionCounters(counters); | appendSessionCounters(counters); | ||||
let dataCounter = Engine.GetGUIObjectByName("dataCounter"); | let dataCounter = Engine.GetGUIObjectByName("dataCounter"); | ||||
dataCounter.caption = counters.join("\n") + "\n"; | dataCounter.caption = counters.join("\n") + "\n"; | ||||
dataCounter.hidden = !counters.length; | dataCounter.hidden = !counters.length; | ||||
▲ Show 20 Lines • Show All 77 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator