Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/session/messages.js
Show All 24 Lines | |||||
var g_ChatHistory = []; | var g_ChatHistory = []; | ||||
/** | /** | ||||
* Holds the timer-IDs used for hiding the chat after g_ChatTimeout seconds. | * Holds the timer-IDs used for hiding the chat after g_ChatTimeout seconds. | ||||
*/ | */ | ||||
var g_ChatTimers = []; | var g_ChatTimers = []; | ||||
/** | /** | ||||
* Command to send to the previously selected private chat partner. | |||||
*/ | |||||
var g_LastChatAddressee = ""; | |||||
/** | |||||
* Handle all netmessage types that can occur. | * Handle all netmessage types that can occur. | ||||
*/ | */ | ||||
var g_NetMessageTypes = { | var g_NetMessageTypes = { | ||||
"netstatus": msg => { | "netstatus": msg => { | ||||
handleNetStatusMessage(msg); | handleNetStatusMessage(msg); | ||||
}, | }, | ||||
"netwarn": msg => { | "netwarn": msg => { | ||||
addNetworkWarning(msg); | addNetworkWarning(msg); | ||||
▲ Show 20 Lines • Show All 704 Lines • ▼ Show 20 Lines | function submitChatInput() | ||||
if (executeCheat(text)) | if (executeCheat(text)) | ||||
return; | return; | ||||
let chatAddressee = Engine.GetGUIObjectByName("chatAddressee"); | let chatAddressee = Engine.GetGUIObjectByName("chatAddressee"); | ||||
if (chatAddressee.selected > 0 && (text.indexOf("/") != 0 || text.indexOf("/me ") == 0)) | if (chatAddressee.selected > 0 && (text.indexOf("/") != 0 || text.indexOf("/me ") == 0)) | ||||
text = chatAddressee.list_data[chatAddressee.selected] + " " + text; | text = chatAddressee.list_data[chatAddressee.selected] + " " + text; | ||||
let selectedChat = chatAddressee.list_data[chatAddressee.selected] | |||||
if (selectedChat.startsWith("/msg")) | |||||
g_LastChatAddressee = selectedChat; | |||||
submitChatDirectly(text); | submitChatDirectly(text); | ||||
} | } | ||||
/** | /** | ||||
* Displays the prepared chatmessage. | * Displays the prepared chatmessage. | ||||
* | * | ||||
* @param msg {Object} | * @param msg {Object} | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 365 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator