Reworking game UI startup so that game chat is always loaded after the game message log upon reload

This commit is contained in:
Christian 'ketura' McCarty
2024-11-24 14:35:53 -06:00
parent 428e324f63
commit 8f8805bb71
2 changed files with 9 additions and 5 deletions

View File

@@ -168,11 +168,6 @@ var ChatBoxUI = Class.extend({
this.div.append(this.chatTalkDiv);
this.comm.startChat(this.name,
function (xml) {
that.processMessages(xml, true);
}, this.chatErrorMap());
this.chatTalkDiv.bind("keypress", function (e) {
var code = (e.keyCode ? e.keyCode : e.which);
if (code == 13) {
@@ -189,6 +184,14 @@ var ChatBoxUI = Class.extend({
}
},
beginGameChat:function() {
var that = this;
this.comm.startChat(this.name,
function (xml) {
that.processMessages(xml, true);
}, this.chatErrorMap());
},
initPlayerInfo:function (playerInfo) {
this.userInfo = playerInfo;
this.userName = this.userInfo.name;

View File

@@ -1132,6 +1132,7 @@ var GempLotrGameUI = Class.extend({
this.communication.startGameSession(
function (xml) {
that.processXml(xml, false);
that.chatBox.beginGameChat();
}, this.gameErrorMap());
},