diff --git a/src/client/component/chat.cpp b/src/client/component/chat.cpp new file mode 100644 index 00000000..07e8f50b --- /dev/null +++ b/src/client/component/chat.cpp @@ -0,0 +1,32 @@ +#include +#include "loader/component_loader.hpp" + +#include "game/game.hpp" + +#include + +namespace chat +{ + namespace + { + game::GfxFont* ui_get_font_handle_stub() + { + const auto font = *reinterpret_cast(0x74CC850_b); // textFont + return font; + } + } + + class component final : public component_interface + { + public: + void post_unpack() override + { + // use better font + utils::hook::call(0x35602C_b, ui_get_font_handle_stub); // con_drawsay + utils::hook::call(0x9A7843_b, ui_get_font_handle_stub); // cl_keys_draw_text_override_field + utils::hook::call(0x77D250_b, ui_get_font_handle_stub); // cg_drawmp_drawchatmessages + } + }; +} + +REGISTER_COMPONENT(chat::component) \ No newline at end of file