Differential D2398 Diff 10225 ps/trunk/binaries/data/mods/public/gui/session/developer_overlay/TimeWarp.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/developer_overlay/TimeWarp.js
Show All 17 Lines | class TimeWarp | ||||
setEnabled(enabled) | setEnabled(enabled) | ||||
{ | { | ||||
if (g_IsNetworked) | if (g_IsNetworked) | ||||
return; | return; | ||||
this.enabled = enabled; | this.enabled = enabled; | ||||
if (enabled) | if (enabled) | ||||
messageBox( | (new TimeWarpMessageBox()).display(); | ||||
500, 250, | |||||
translate(this.Description), | |||||
translate(this.Title)); | |||||
Engine.EnableTimeWarpRecording(enabled ? this.NumberTurns : 0); | Engine.EnableTimeWarpRecording(enabled ? this.NumberTurns : 0); | ||||
} | } | ||||
rewind() | rewind() | ||||
{ | { | ||||
if (this.enabled) | if (this.enabled) | ||||
Engine.RewindTimeWarp(); | Engine.RewindTimeWarp(); | ||||
Show All 17 Lines | |||||
*/ | */ | ||||
TimeWarp.prototype.NumberTurns = 10; | TimeWarp.prototype.NumberTurns = 10; | ||||
/** | /** | ||||
* Gamespeed used while pressing the fast forward hotkey. | * Gamespeed used while pressing the fast forward hotkey. | ||||
*/ | */ | ||||
TimeWarp.prototype.FastForwardSpeed = 20; | TimeWarp.prototype.FastForwardSpeed = 20; | ||||
TimeWarp.prototype.Title = markForTranslation("Time warp mode"); | class TimeWarpMessageBox extends SessionMessageBox | ||||
{ | |||||
TimeWarp.prototype.Description = markForTranslation( | } | ||||
TimeWarpMessageBox.prototype.Width = 500; | |||||
TimeWarpMessageBox.prototype.Height = 250; | |||||
TimeWarpMessageBox.prototype.Title = translate("Time warp mode"); | |||||
TimeWarpMessageBox.prototype.Caption = translate( | |||||
"Note: time warp mode is a developer option, and not intended for use over long periods of time. Using it incorrectly may cause the game to run out of memory or crash."); | "Note: time warp mode is a developer option, and not intended for use over long periods of time. Using it incorrectly may cause the game to run out of memory or crash."); |
Wildfire Games · Phabricator