1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
This commit is contained in:
Esteban I. RM 2017-10-15 20:28:42 -03:00 committed by Loic Blot
parent 46f7fe91a2
commit 0e8ee84d74
No known key found for this signature in database
GPG key ID: EFAA458E8C153987
5 changed files with 24 additions and 0 deletions

View file

@ -369,6 +369,13 @@ s32 ChatBuffer::getBottomScrollPos() const
return formatted_count - rows;
}
void ChatBuffer::resize(u32 scrollback) {
m_scrollback = scrollback;
if (m_unformatted.size() > m_scrollback)
{
deleteOldest(m_unformatted.size() - m_scrollback);
}
}
ChatPrompt::ChatPrompt(const std::wstring &prompt, u32 history_limit):
@ -731,6 +738,11 @@ void ChatBackend::clearRecentChat()
m_recent_buffer.clear();
}
void ChatBackend::applySettings(Settings* settings) {
m_recent_buffer.resize(settings->getU32("recent_chat_size"));
}
void ChatBackend::step(float dtime)
{
m_recent_buffer.step(dtime);