mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Stop new chat from affecting chat position when scrolled up
This commit is contained in:
parent
b2cb63a6e9
commit
72463a76e2
1 changed files with 3 additions and 0 deletions
|
@ -1073,6 +1073,9 @@ static void ChatScreen_ChatReceived(void* screen, const cc_string* msg, int type
|
|||
s->dirty = true;
|
||||
|
||||
if (type == MSG_TYPE_NORMAL) {
|
||||
/* Check if the chatIndex isn't located at the bottom of the chat log, that means that the user has scrolled. */
|
||||
if (Chat_Log.count - s->chatIndex != Gui.Chatlines + 1) return;
|
||||
|
||||
s->chatIndex++;
|
||||
if (!Gui.Chatlines) return;
|
||||
TextGroupWidget_ShiftUp(&s->chat);
|
||||
|
|
Loading…
Reference in a new issue