#include <chat.h>
Public Member Functions | |
ChatBackend () | |
~ChatBackend ()=default | |
void | addMessage (const std::wstring &name, std::wstring text) |
void | addUnparsedMessage (std::wstring line) |
ChatBuffer & | getConsoleBuffer () |
ChatBuffer & | getRecentBuffer () |
EnrichedString | getRecentChat () const |
ChatPrompt & | getPrompt () |
void | reformat (u32 cols, u32 rows) |
void | clearRecentChat () |
void | step (float dtime) |
void | scroll (s32 rows) |
void | scrollPageDown () |
void | scrollPageUp () |
void | applySettings () |
Private Attributes | |
ChatBuffer | m_console_buffer |
ChatBuffer | m_recent_buffer |
ChatPrompt | m_prompt |
ChatBackend::ChatBackend | ( | ) |
|
default |
void ChatBackend::addMessage | ( | const std::wstring & | name, |
std::wstring | text ) |
References ChatBuffer::addLine(), BasicStrfnd< T >::at_end(), m_console_buffer, m_recent_buffer, BasicStrfnd< T >::next(), and translate_string().
Referenced by addUnparsedMessage(), Game::shutdown(), and Game::updateChat().
void ChatBackend::addUnparsedMessage | ( | std::wstring | line | ) |
References addMessage().
Referenced by Game::updateChat(), and GUIChatConsole::weblinkClick().
void ChatBackend::applySettings | ( | ) |
References g_settings, Settings::getU32(), m_recent_buffer, rangelim, and ChatBuffer::resize().
Referenced by Game::initGui().
void ChatBackend::clearRecentChat | ( | ) |
References ChatBuffer::clear(), and m_recent_buffer.
Referenced by Game::initGui().
ChatBuffer & ChatBackend::getConsoleBuffer | ( | ) |
References m_console_buffer.
Referenced by GUIChatConsole::drawPrompt(), GUIChatConsole::drawText(), and GUIChatConsole::weblinkClick().
ChatPrompt & ChatBackend::getPrompt | ( | ) |
References m_prompt.
Referenced by GUIChatConsole::drawPrompt(), GUIChatConsole::OnEvent(), GUIChatConsole::replaceAndAddToHistory(), and GUIChatConsole::updatePrimarySelection().
ChatBuffer & ChatBackend::getRecentBuffer | ( | ) |
References m_recent_buffer.
Referenced by Game::updateChat().
EnrichedString ChatBackend::getRecentChat | ( | ) | const |
References ChatBuffer::getLine(), ChatBuffer::getLineCount(), and m_recent_buffer.
Referenced by Game::updateChat().
void ChatBackend::reformat | ( | u32 | cols, |
u32 | rows ) |
References m_console_buffer, m_prompt, ChatBuffer::reformat(), and ChatPrompt::reformat().
Referenced by GUIChatConsole::reformatConsole().
void ChatBackend::scroll | ( | s32 | rows | ) |
References m_console_buffer, and ChatBuffer::scroll().
Referenced by GUIChatConsole::OnEvent().
void ChatBackend::scrollPageDown | ( | ) |
References ChatBuffer::getRows(), m_console_buffer, and ChatBuffer::scroll().
Referenced by GUIChatConsole::OnEvent().
void ChatBackend::scrollPageUp | ( | ) |
References ChatBuffer::getRows(), m_console_buffer, and ChatBuffer::scroll().
Referenced by GUIChatConsole::OnEvent().
void ChatBackend::step | ( | float | dtime | ) |
References ChatBuffer::deleteByAge(), m_recent_buffer, and ChatBuffer::step().
Referenced by Game::updateChat().
|
private |
Referenced by addMessage(), getConsoleBuffer(), reformat(), scroll(), scrollPageDown(), and scrollPageUp().
|
private |
Referenced by getPrompt(), and reformat().
|
private |
Referenced by addMessage(), applySettings(), clearRecentChat(), getRecentBuffer(), getRecentChat(), and step().