Differential D2409 Diff 10281 binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlay.js
Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/session/developer_overlay/DeveloperOverlay.js
Show All 40 Lines | class DeveloperOverlay | ||||
{ | { | ||||
let message = this.devCommandsOverlay.hidden ? this.CloseNotification : this.OpenNotification; | let message = this.devCommandsOverlay.hidden ? this.CloseNotification : this.OpenNotification; | ||||
// Only players can send the simulation chat command | // Only players can send the simulation chat command | ||||
if (Engine.GetPlayerID() == -1) | if (Engine.GetPlayerID() == -1) | ||||
g_Chat.submitChat(message); | g_Chat.submitChat(message); | ||||
else | else | ||||
Engine.PostNetworkCommand({ | Engine.PostNetworkCommand({ | ||||
"type": "aichat", | "type": "chat", | ||||
"message": message, | "message": message | ||||
"translateMessage": true, | |||||
"translateParameters": [], | |||||
"parameters": {} | |||||
}); | }); | ||||
} | } | ||||
resize() | resize() | ||||
{ | { | ||||
let size = this.devCommandsOverlay.size; | let size = this.devCommandsOverlay.size; | ||||
size.bottom = | size.bottom = | ||||
size.top + | size.top + | ||||
this.checkBoxes.reduce((height, checkbox) => height + checkbox.getHeight(), 0); | this.checkBoxes.reduce((height, checkbox) => height + checkbox.getHeight(), 0); | ||||
this.devCommandsOverlay.size = size; | this.devCommandsOverlay.size = size; | ||||
} | } | ||||
} | } | ||||
DeveloperOverlay.prototype.OpenNotification = markForTranslation("The Developer Overlay was opened."); | DeveloperOverlay.prototype.OpenNotification = markForTranslation("The Developer Overlay was opened."); | ||||
DeveloperOverlay.prototype.CloseNotification = markForTranslation("The Developer Overlay was closed."); | DeveloperOverlay.prototype.CloseNotification = markForTranslation("The Developer Overlay was closed."); |
Wildfire Games · Phabricator