Stop new chat from affecting chat position when scrolled up

This commit is contained in:
ricardo 2024-04-18 16:39:16 -06:00
parent b2cb63a6e9
commit 72463a76e2

View file

@ -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);