3#ifndef GAME_CLIENT_COMPONENTS_CHAT_H
4#define GAME_CLIENT_COMPONENTS_CHAT_H
103 CCommand(
const char *pName,
const char *pParams,
const char *pHelpText)
150 int Sizeof()
const override {
return sizeof(*this); }
155 void AddLine(
int ClientId,
int Team,
const char *pLine);
158 void RegisterCommand(
const char *pName,
const char *pParams,
const char *pHelpText);
160 void Echo(
const char *pString);
170 void OnMessage(
int MsgType,
void *pRawMsg)
override;
192 void SendChat(
int Team,
const char *pLine);
void OnRender() override
Definition: chat.cpp:1145
void AddLine(int ClientId, int Team, const char *pLine)
Definition: chat.cpp:639
void Echo(const char *pString)
Definition: chat.cpp:218
int m_PlaceholderOffset
Definition: chat.h:85
void RegisterCommand(const char *pName, const char *pParams, const char *pHelpText)
Definition: chat.cpp:70
CStaticRingBuffer< CHistoryEntry, 64 *1024, CRingBufferBase::FLAG_RECYCLE > m_History
Definition: chat.h:124
int m_CurrentLine
Definition: chat.h:62
int64_t m_LastChatSend
Definition: chat.h:126
CChat()
Definition: chat.cpp:25
float MessageTeeSize() const
Definition: chat.h:183
bool m_PrevShowChat
Definition: chat.h:59
CLineInputBuffered< MAX_LINE_LENGTH > m_Input
Definition: chat.h:30
float MessagePaddingX() const
Definition: chat.h:181
static void ConchainChatWidth(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: chat.cpp:210
@ CHAT_CLIENT
Definition: chat.h:76
@ CHAT_HIGHLIGHT
Definition: chat.h:75
@ SERVER_MSG
Definition: chat.h:68
@ CHAT_NUM
Definition: chat.h:77
@ CHAT_SERVER
Definition: chat.h:74
@ CLIENT_MSG
Definition: chat.h:67
@ MODE_TEAM
Definition: chat.h:72
@ MODE_NONE
Definition: chat.h:70
@ MODE_ALL
Definition: chat.h:71
void EnableMode(int Team)
Definition: chat.cpp:507
void OnPrepareLines(float y)
Definition: chat.cpp:914
CRateablePlayer m_aPlayerCompletionList[MAX_CLIENTS]
Definition: chat.h:93
void SendChat(int Team, const char *pLine)
Definition: chat.cpp:1334
bool m_EditingNewLine
Definition: chat.h:130
CLine m_aLines[MAX_LINES]
Definition: chat.h:61
void OnRefreshSkins() override
Definition: chat.cpp:899
void OnWindowResize() override
Definition: chat.cpp:115
bool m_PrevScoreBoardShowed
Definition: chat.h:58
static constexpr float CHAT_HEIGHT_FULL
Definition: chat.h:20
int m_Mode
Definition: chat.h:80
static void ConchainChatOld(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: chat.cpp:196
char m_aCurrentInputText[MAX_LINE_LENGTH]
Definition: chat.h:129
float MessagePaddingY() const
Definition: chat.h:182
int m_CompletionChosen
Definition: chat.h:83
float FontSize() const
Definition: chat.h:180
bool m_ServerSupportsCommandInfo
Definition: chat.h:132
void Reset()
Definition: chat.cpp:120
int m_PlaceholderLength
Definition: chat.h:86
static char ms_aDisplayText[MAX_LINE_LENGTH]
Definition: chat.h:87
void RebuildChat()
Definition: chat.cpp:86
int Sizeof() const override
Definition: chat.h:150
void UnregisterCommand(const char *pName)
Definition: chat.cpp:81
bool m_Show
Definition: chat.h:81
static constexpr float CHAT_FONTSIZE_WIDTH_RATIO
Definition: chat.h:22
bool OnInput(const IInput::CEvent &Event) override
Definition: chat.cpp:241
static void ConSayTeam(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:162
static void ConSay(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:157
std::vector< CCommand > m_vCommands
Definition: chat.h:115
void OnMessage(int MsgType, void *pRawMsg) override
Definition: chat.cpp:535
bool LineShouldHighlight(const char *pLine, const char *pName)
Definition: chat.cpp:562
void EnsureCoherentFontSize() const
Definition: chat.cpp:1312
char m_aCompletionBuffer[MAX_LINE_LENGTH]
Definition: chat.h:84
void OnStateChange(int NewState, int OldState) override
Definition: chat.cpp:151
static void ConShowChat(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:181
static void ConClearChat(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:191
bool m_CommandsNeedSorting
Definition: chat.h:116
int64_t m_aLastSoundPlayed[CHAT_NUM]
Definition: chat.h:127
void SendChatQueued(const char *pLine)
Definition: chat.cpp:1359
static void ConchainChatFontSize(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: chat.cpp:202
void EnsureCoherentWidth() const
Definition: chat.cpp:1322
bool m_IsInputCensored
Definition: chat.h:128
void OnRelease() override
Definition: chat.cpp:146
int m_PlayerCompletionListLength
Definition: chat.h:94
CHistoryEntry * m_pHistoryEntry
Definition: chat.h:123
bool m_CompletionUsed
Definition: chat.h:82
void StoreSave(const char *pText)
Definition: chat.cpp:587
bool IsActive() const
Definition: chat.h:154
void DisableMode()
Definition: chat.cpp:526
@ MAX_LINES
Definition: chat.h:26
@ MAX_LINE_LENGTH
Definition: chat.h:27
void OnInit() override
Definition: chat.cpp:233
float MessageRounding() const
Definition: chat.h:184
static void ConChat(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:167
static constexpr float MESSAGE_TEE_PADDING_RIGHT
Definition: chat.h:152
static void ConEcho(IConsole::IResult *pResult, void *pUserData)
Definition: chat.cpp:186
int m_PendingChatCounter
Definition: chat.h:125
static constexpr float CHAT_HEIGHT_MIN
Definition: chat.h:21
void ClearLines()
Definition: chat.cpp:98
void OnConsoleInit() override
Definition: chat.cpp:223
Definition: component.h:20
Definition: ringbuffer.h:78
void(* FCommandCallback)(IResult *pResult, void *pUserData)
Definition: console.h:92
@ TEMPCMD_HELP_LENGTH
Definition: console.h:34
@ TEMPCMD_PARAMS_LENGTH
Definition: console.h:35
@ TEMPCMD_NAME_LENGTH
Definition: console.h:33
CConfig g_Config
Definition: config.cpp:12
@ MAX_CLIENTS
Definition: protocol.h:88
int str_comp(const char *a, const char *b)
Definition: system.cpp:2933
int str_copy(char *dst, const char *src, int dst_size)
Definition: system.cpp:2720
char m_aParams[IConsole::TEMPCMD_PARAMS_LENGTH]
Definition: chat.h:99
CCommand(const char *pName, const char *pParams, const char *pHelpText)
Definition: chat.h:103
bool operator==(const CCommand &Other) const
Definition: chat.h:112
bool operator<=(const CCommand &Other) const
Definition: chat.h:111
char m_aHelpText[IConsole::TEMPCMD_HELP_LENGTH]
Definition: chat.h:100
char m_aName[IConsole::TEMPCMD_NAME_LENGTH]
Definition: chat.h:98
bool operator<(const CCommand &Other) const
Definition: chat.h:110
char m_aText[1]
Definition: chat.h:121
int m_Team
Definition: chat.h:120
bool m_Friend
Definition: chat.h:42
int64_t m_Time
Definition: chat.h:33
bool m_Team
Definition: chat.h:37
int m_TeamNumber
Definition: chat.h:36
int m_TimesRepeated
Definition: chat.h:55
float m_aYOffset[2]
Definition: chat.h:34
int m_ClientId
Definition: chat.h:35
int m_QuadContainerIndex
Definition: chat.h:47
bool m_Whisper
Definition: chat.h:38
char m_aName[64]
Definition: chat.h:40
std::optional< ColorRGBA > m_CustomColor
Definition: chat.h:44
bool m_Highlighted
Definition: chat.h:43
int m_NameColor
Definition: chat.h:39
char m_aSkinName[std::size(g_Config.m_ClPlayerSkin)]
Definition: chat.h:49
float m_TextYOffset
Definition: chat.h:53
STextContainerIndex m_TextContainerIndex
Definition: chat.h:46
bool m_HasRenderTee
Definition: chat.h:50
char m_aText[MAX_LINE_LENGTH]
Definition: chat.h:41
CTeeRenderInfo m_TeeRenderInfo
Definition: chat.h:51
int ClientId
Definition: chat.h:90
int Score
Definition: chat.h:91
Definition: textrender.h:293