Opened 9 years ago
Last modified 4 years ago
#3306 closed enhancement
Display chat scrollback again when returning from gamesetup — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 23 |
Component: | Multiplayer lobby | Keywords: | beta |
Cc: | Patch: |
Description
Currently chat messages are only displayed in the OnTick()
function in lobby.js
, i.e. only once when they were received in javascript. However if you get into the gamesetup and return immediately, the chat will be blank.
This means you will miss messages (imagine someone sending you one while you were just clicking on the host game button and returned, because you noticed that someone wrote your nickname).
The XmppClient.cpp
needs to save the last N messages, since saving values in JS doesn't work (After returning from the gamesetup, the values are overwritten again, see #3287).
There is a setting lobby.history
that already remembers the number of chat messages to scroll back.
A script function must be added to JS_Interface_Lobby.h
, so that one can get the scrollback in the init()
function in lobby.js
.