27 ChatLine(
const std::wstring &a_name,
const std::wstring &a_text):
68 void addLine(
const std::wstring &name,
const std::wstring &text);
111 std::vector<ChatFormattedLine>& destination)
const;
113 void resize(u32 scrollback);
150 ChatPrompt(
const std::wstring &prompt, u32 history_limit);
154 void input(
wchar_t ch);
155 void input(
const std::wstring &str);
170 std::wstring
replace(
const std::wstring &line);
178 void nickCompletion(
const std::set<std::string> &names,
bool backwards);
276 void addMessage(
const std::wstring &name, std::wstring text);
296 void step(
float dtime);
static v2f dir(const v2f &pos_dist)
Definition camera.cpp:191
void addMessage(const std::wstring &name, std::wstring text)
Definition chat.cpp:777
ChatBackend()
Definition chat.cpp:770
void applySettings()
Definition chat.cpp:861
ChatPrompt m_prompt
Definition chat.h:309
ChatBuffer m_console_buffer
Definition chat.h:307
EnrichedString getRecentChat() const
Definition chat.cpp:823
ChatBuffer & getConsoleBuffer()
Definition chat.cpp:813
void step(float dtime)
Definition chat.cpp:868
ChatBuffer & getRecentBuffer()
Definition chat.cpp:818
void scrollPageUp()
Definition chat.cpp:886
void scroll(s32 rows)
Definition chat.cpp:876
void clearRecentChat()
Definition chat.cpp:855
void addUnparsedMessage(std::wstring line)
Definition chat.cpp:790
void scrollPageDown()
Definition chat.cpp:881
void reformat(u32 cols, u32 rows)
Definition chat.cpp:845
ChatPrompt & getPrompt()
Definition chat.cpp:840
ChatBuffer m_recent_buffer
Definition chat.h:308
void reformat(u32 cols, u32 rows)
Definition chat.cpp:131
ChatBuffer(u32 scrollback)
Definition chat.cpp:18
s32 getTopScrollPos() const
Definition chat.cpp:416
u32 m_rows
Definition chat.h:128
u32 getLineCount() const
Definition chat.cpp:66
u32 formatChatLine(const ChatLine &line, u32 cols, std::vector< ChatFormattedLine > &destination) const
Definition chat.cpp:218
bool m_cache_clickable_chat_weblinks
Definition chat.h:137
ChatFormattedLine m_empty_formatted_line
Definition chat.h:134
u32 m_cols
Definition chat.h:126
s32 m_scroll
Definition chat.h:130
void scrollAbsolute(s32 scroll)
Definition chat.cpp:201
irr::video::SColor m_cache_chat_weblink_color
Definition chat.h:139
void resize(u32 scrollback)
Definition chat.cpp:439
s32 getBottomScrollPos() const
Definition chat.cpp:429
void deleteOldest(u32 count)
Definition chat.cpp:84
const ChatLine & getLine(u32 index) const
Definition chat.cpp:71
std::vector< ChatLine > m_unformatted
Definition chat.h:123
void clear()
Definition chat.cpp:58
bool getLinesModified() const
Definition chat.h:104
void scrollBottom()
Definition chat.cpp:213
bool m_lines_modified
Definition chat.h:144
void resetLinesModified()
Definition chat.h:105
u32 m_scrollback
Definition chat.h:121
void deleteByAge(f32 maxAge)
Definition chat.cpp:118
void addLine(const std::wstring &name, const std::wstring &text)
Definition chat.cpp:37
u32 getRows() const
Definition chat.cpp:126
std::vector< ChatFormattedLine > m_formatted
Definition chat.h:132
void step(f32 dtime)
Definition chat.cpp:77
const ChatFormattedLine & getFormattedLine(u32 row) const
Definition chat.cpp:187
void scroll(s32 rows)
Definition chat.cpp:196
void input(wchar_t ch)
Definition chat.cpp:480
s32 m_nick_completion_end
Definition chat.h:266
ChatPrompt(const std::wstring &prompt, u32 history_limit)
Definition chat.cpp:447
void historyNext()
Definition chat.cpp:560
void addToHistory(const std::wstring &line)
Definition chat.cpp:498
s32 getCursorLength() const
Definition chat.h:187
std::wstring getLine() const
Definition chat.h:161
s32 getVisibleCursorPosition() const
Definition chat.cpp:676
std::wstring & makeLineRef()
Definition chat.cpp:458
s32 m_nick_completion_start
Definition chat.h:264
std::wstring getSelection() const
Definition chat.h:164
void cursorOperation(CursorOp op, CursorOpDir dir, CursorOpScope scope)
Definition chat.cpp:681
CursorOp
Definition chat.h:190
@ CURSOROP_DELETE
Definition chat.h:193
@ CURSOROP_MOVE
Definition chat.h:191
@ CURSOROP_SELECT
Definition chat.h:192
std::wstring getVisiblePortion() const
Definition chat.cpp:667
void clampView()
Definition chat.cpp:752
s32 m_view
Definition chat.h:257
void clear()
Definition chat.cpp:529
CursorOpDir
Definition chat.h:197
@ CURSOROP_DIR_RIGHT
Definition chat.h:199
@ CURSOROP_DIR_LEFT
Definition chat.h:198
void reformat(u32 cols)
Definition chat.cpp:649
std::wstring replace(const std::wstring &line)
Definition chat.cpp:538
std::wstring m_prompt
Definition chat.h:244
CursorOpScope
Definition chat.h:203
@ CURSOROP_SCOPE_LINE
Definition chat.h:206
@ CURSOROP_SCOPE_SELECTION
Definition chat.h:207
@ CURSOROP_SCOPE_CHARACTER
Definition chat.h:204
@ CURSOROP_SCOPE_WORD
Definition chat.h:205
u32 m_history_index
Definition chat.h:250
std::vector< HistoryEntry > m_history
Definition chat.h:248
s32 m_cols
Definition chat.h:255
s32 m_cursor
Definition chat.h:259
s32 m_cursor_len
Definition chat.h:261
void historyPrev()
Definition chat.cpp:549
std::wstring m_line
Definition chat.h:246
void nickCompletion(const std::set< std::string > &names, bool backwards)
Definition chat.cpp:571
const std::wstring & getLineRef() const
Definition chat.cpp:453
u32 m_history_limit
Definition chat.h:252
Definition enriched_string.h:29
EnrichedString name
Definition chat.h:23
EnrichedString text
Definition chat.h:25
f32 age
Definition chat.h:21
ChatLine(const std::wstring &a_name, const std::wstring &a_text)
Definition chat.h:27
ChatLine(const EnrichedString &a_name, const EnrichedString &a_text)
Definition chat.h:33
bool operator!=(const HistoryEntry &other)
Definition chat.h:240
std::wstring line
Definition chat.h:233
bool operator==(const HistoryEntry &other)
Definition chat.cpp:469
std::optional< std::wstring > saved
Definition chat.h:235
HistoryEntry(const std::wstring &line)
Definition chat.h:237