diff --git a/Source/UI/Chat/UIChatRoomTitle.cpp b/Source/UI/Chat/UIChatRoomTitle.cpp index 54dc71f9..7c3d7152 100644 --- a/Source/UI/Chat/UIChatRoomTitle.cpp +++ b/Source/UI/Chat/UIChatRoomTitle.cpp @@ -1,9 +1,11 @@ #include "Client/Mode/ModeCursor.h" +#include "Client/Mode/ModeMgr.h" #include "Resource/Bitmap/BitmapResource.h" #include "Resource/ResourceMgr.h" #include "Resource/TextureNames.h" #include "UI/Chat/UIChatRoomTitle.h" #include "UI/Text/UIStaticText.h" +#include "UI/Window/UIWindowMgr.h" // OFFSET: 0x0084EF70 // FUNCTION: fn_10655 @@ -24,6 +26,17 @@ void UIChatRoomTitle::Slot15(int, int) { this->AddChild(this->label); } +// OFFSET: 0x0085E8C0 +// FUNCTION: fn_10831 +void UIChatRoomTitle::Slot26(int, int) { + CMode* mode = g_modeMgr.GetGameMode(); + if (this->roomType == 0) { + g_windowMgr.EnsureWindow(29)->SendMsg(nullptr, 47, this->roomId, 0, 0, 0); + } else if (this->roomType != 3) { + mode->SendMsg(45, this->roomId, 0, 0, 0); + } +} + // OFFSET: 0x0085C690 // FUNCTION: fn_10802 void UIChatRoomTitle::Paint() { diff --git a/Source/UI/Chat/UIChatRoomTitle.h b/Source/UI/Chat/UIChatRoomTitle.h index 96c9fd47..f02d8d14 100644 --- a/Source/UI/Chat/UIChatRoomTitle.h +++ b/Source/UI/Chat/UIChatRoomTitle.h @@ -12,6 +12,7 @@ class UIChatRoomTitle : public UIWindow { public: explicit UIChatRoomTitle(UIWindowContext& context); void Slot15(int width, int height) override; + void Slot26(int x, int y) override; void Paint() override; void ResetCursor(int x, int y) override; @@ -22,6 +23,8 @@ public: protected: UIButtonContext* m_controls; + /* 00B8 */ unsigned char unknown_00B8[4]; + /* 00BC */ int roomId; }; #endif