diff --git a/Source/UI/Chat/UINewChatWnd.h b/Source/UI/Chat/UINewChatWnd.h index 92996a7..502c13d 100644 --- a/Source/UI/Chat/UINewChatWnd.h +++ b/Source/UI/Chat/UINewChatWnd.h @@ -3,16 +3,21 @@ #include "UI/Window/UIFrameWnd.h" +#include + class UINewChatWnd : public UIFrameWnd { public: void Move(int x, int y) override; + void Show(int visible) override; private: /* 00BC */ int unknown_00BC; /* 00C0 */ int unknown_00C0; /* 00C4 */ int m_inputX; /* 00C8 */ int m_inputY; - /* 00CC */ unsigned char unknown_00CC[0x50]; + /* 00CC */ unsigned char unknown_00CC[0x28]; + /* 00F4 */ std::vector m_tabs; + /* 0100 */ unsigned char unknown_0100[0x1C]; /* 011C */ int m_inputOffsetY; }; diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index 5117473..be6093f 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -441,6 +441,26 @@ void UINewChatWnd::Move(int x, int y) { } } +// OFFSET: 0x0093D090 +// FUNCTION: fn_12765 +void UINewChatWnd::Show(int visible) { + this->geometry.visible = visible; + + if (visible != 0) { + this->Invalidate(); + this->m_frameContext->snapping.Store(this); + } else if (this->m_frameContext->snapping.enabled) { + this->m_frameContext->snapping.rectangles.erase(this); + } + + for (UIWindow* tab : this->m_tabs) { + tab->Show(this->geometry.visible); + } + + for (unsigned int i = 0; i < g_windowMgr.retainedWindows.size(); ++i) { + g_windowMgr.retainedWindows[i]->Show(this->geometry.visible); + } +} // OFFSET: 0x0091E960 // FUNCTION: fn_12630 void UIMemorialDunWnd::Move(int x, int y) {