2021-09-19 07:13:46 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Chat : public Component
|
|
|
|
{
|
2021-09-19 09:49:12 -04:00
|
|
|
static constexpr auto FONT_ICON_CHAT_WIDTH_CALCULATION_MULTIPLIER = 2.0f;
|
2021-09-19 07:13:46 -04:00
|
|
|
public:
|
|
|
|
Chat();
|
2022-01-01 08:08:02 -05:00
|
|
|
~Chat();
|
2021-09-19 07:13:46 -04:00
|
|
|
|
|
|
|
private:
|
2021-09-19 09:49:12 -04:00
|
|
|
static Game::dvar_t** cg_chatHeight;
|
|
|
|
static Dvar::Var cg_chatWidth;
|
|
|
|
static Game::dvar_t** cg_chatTime;
|
|
|
|
|
2021-09-19 07:13:46 -04:00
|
|
|
static bool SendChat;
|
|
|
|
|
2022-01-01 08:08:02 -05:00
|
|
|
static std::unordered_set<std::uint64_t> MuteList;
|
|
|
|
|
2021-09-19 07:13:46 -04:00
|
|
|
static const char* EvaluateSay(char* text, Game::gentity_t* player);
|
|
|
|
|
|
|
|
static void PreSayStub();
|
|
|
|
static void PostSayStub();
|
2021-09-19 09:49:12 -04:00
|
|
|
|
|
|
|
static void CheckChatLineEnd(const char*& inputBuffer, char*& lineBuffer, float& len, int chatHeight, float chatWidth, char*& lastSpacePos, char*& lastFontIconPos, int lastColor);
|
|
|
|
static void CG_AddToTeamChat(const char* text);
|
|
|
|
static void CG_AddToTeamChat_Stub();
|
2022-01-01 08:08:02 -05:00
|
|
|
|
|
|
|
static void MuteClient(const Game::client_t* client);
|
|
|
|
static void UnmuteClient(const Game::client_t* client);
|
|
|
|
static void AddChatCommands();
|
2021-09-19 07:13:46 -04:00
|
|
|
};
|
|
|
|
}
|