Reworking game UI startup so that game chat is always loaded after the game message log upon reload
This commit is contained in:
@@ -168,11 +168,6 @@ var ChatBoxUI = Class.extend({
|
|||||||
|
|
||||||
this.div.append(this.chatTalkDiv);
|
this.div.append(this.chatTalkDiv);
|
||||||
|
|
||||||
this.comm.startChat(this.name,
|
|
||||||
function (xml) {
|
|
||||||
that.processMessages(xml, true);
|
|
||||||
}, this.chatErrorMap());
|
|
||||||
|
|
||||||
this.chatTalkDiv.bind("keypress", function (e) {
|
this.chatTalkDiv.bind("keypress", function (e) {
|
||||||
var code = (e.keyCode ? e.keyCode : e.which);
|
var code = (e.keyCode ? e.keyCode : e.which);
|
||||||
if (code == 13) {
|
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) {
|
initPlayerInfo:function (playerInfo) {
|
||||||
this.userInfo = playerInfo;
|
this.userInfo = playerInfo;
|
||||||
this.userName = this.userInfo.name;
|
this.userName = this.userInfo.name;
|
||||||
|
|||||||
@@ -1132,6 +1132,7 @@ var GempLotrGameUI = Class.extend({
|
|||||||
this.communication.startGameSession(
|
this.communication.startGameSession(
|
||||||
function (xml) {
|
function (xml) {
|
||||||
that.processXml(xml, false);
|
that.processXml(xml, false);
|
||||||
|
that.chatBox.beginGameChat();
|
||||||
}, this.gameErrorMap());
|
}, this.gameErrorMap());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user