Fixed chat system
This commit is contained in:
@@ -49,18 +49,21 @@ function unBindChatBoxKeys() {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function receiveChatBoxMessageFromServer(messageString, colour) {
|
function receiveChatBoxMessageFromServer(messageString, colour) {
|
||||||
logToConsole(LOG_DEBUG, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
|
logToConsole(LOG_INFO, `[VRR.ChatBox]: Received chatbox message from server: ${messageString}`);
|
||||||
|
|
||||||
// Just in case it's hidden by auto hide
|
// Just in case it's hidden by auto hide
|
||||||
setChatWindowEnabled(true);
|
setChatWindowEnabled(true);
|
||||||
|
|
||||||
let colouredString = replaceColoursInMessage(messageString);
|
let colouredString = replaceColoursInMessage(messageString);
|
||||||
|
|
||||||
if(bottomMessageIndex >= chatBoxHistory.length-1) {
|
logToConsole(LOG_INFO, `[VRR.ChatBox]: Changed colours in string: ${colouredString}`);
|
||||||
|
|
||||||
|
//if(bottomMessageIndex >= chatBoxHistory.length-1) {
|
||||||
message(colouredString, colour);
|
message(colouredString, colour);
|
||||||
bottomMessageIndex = chatBoxHistory.length-1;
|
bottomMessageIndex = chatBoxHistory.length-1;
|
||||||
}
|
//}
|
||||||
addToChatBoxHistory(colouredString, colour);
|
addToChatBoxHistory(colouredString, colour);
|
||||||
|
|
||||||
chatLastUse = getCurrentUnixTimestamp();
|
chatLastUse = getCurrentUnixTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -220,18 +220,13 @@ function onFocus(event) {
|
|||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function onLocalPlayerSwitchWeapon(oldWeapon, newWeapon) {
|
function onLocalPlayerSwitchWeapon(oldWeapon, newWeapon) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function onCameraProcess(event) {
|
function onCameraProcess(event) {
|
||||||
}
|
|
||||||
|
|
||||||
// ===========================================================================
|
|
||||||
|
|
||||||
function onChatOutput(event, messageText, colour) {
|
|
||||||
//event.preventDefault();
|
|
||||||
//receiveChatBoxMessageFromServer(messageText, colour);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user