diff --git a/Source/UI/Buttons/UIRadioBtn.cpp b/Source/UI/Buttons/UIRadioBtn.cpp index 5cee02f9..ec2814d3 100644 --- a/Source/UI/Buttons/UIRadioBtn.cpp +++ b/Source/UI/Buttons/UIRadioBtn.cpp @@ -54,3 +54,14 @@ void UIRadioBtn::Slot25(int, int) { this->parent->SendMsg(this, 6, this->geometry.id, this->value, 0, 0); } } + +// OFFSET: 0x00865180 +// FUNCTION: fn_10919 +int UIRadioBtn::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + if (message == 13) { + this->geometry.unknown_0030 = argument1; + this->Invalidate(); + } + + return 0; +} diff --git a/Source/UI/Buttons/UIRadioBtn.h b/Source/UI/Buttons/UIRadioBtn.h index 746cec38..9783fbc3 100644 --- a/Source/UI/Buttons/UIRadioBtn.h +++ b/Source/UI/Buttons/UIRadioBtn.h @@ -13,6 +13,7 @@ public: ~UIRadioBtn() override; void Paint() override; void Slot25(int x, int y) override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; /* 007C */ std::string text; /* 0094 */ int enabled; diff --git a/Source/UI/Edit/UIEditCtrl.h b/Source/UI/Edit/UIEditCtrl.h index c135d30c..2fc77bc7 100644 --- a/Source/UI/Edit/UIEditCtrl.h +++ b/Source/UI/Edit/UIEditCtrl.h @@ -192,6 +192,7 @@ class UIEditCtrl_OldList : public UIEditCtrl { public: void Paint() override; void Slot35(int value) override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; void RecallHistory(int step); /* 011C */ std::string bitmapName; @@ -203,6 +204,7 @@ class UIEditCtrlVarId : public UIEditCtrl { public: void Slot24(int retained) override; void Slot35(int value) override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; }; #if defined(_WIN32) && !defined(_WIN64) diff --git a/Source/UI/Edit/UIEditVariants.cpp b/Source/UI/Edit/UIEditVariants.cpp index 5fe5bdd0..980d218a 100644 --- a/Source/UI/Edit/UIEditVariants.cpp +++ b/Source/UI/Edit/UIEditVariants.cpp @@ -223,3 +223,32 @@ void UIEditCtrlVarId::Slot35(int value) { this->parent->Slot35(value); } } + +// OFFSET: 0x00864CE0 +// FUNCTION: fn_10915 +int UIEditCtrlVarId::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + if (message != 0) { + return UIEditCtrl::SendMsg(sender, message, argument1, argument2, argument3, argument4); + } + + if (this->parent) { + this->parent->SendMsg(this, 6, this->geometry.id, 0, 0, 0); + } + + return 0; +} + +// OFFSET: 0x00864D20 +// FUNCTION: fn_10916 +int UIEditCtrl_OldList::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + switch (message) { + case 18: + this->RecallHistory(-1); + return 0; + case 19: + this->RecallHistory(1); + return 0; + default: + return UIEditCtrl::SendMsg(sender, message, argument1, argument2, argument3, argument4); + } +} diff --git a/Source/UI/Text/UIBalloonText.cpp b/Source/UI/Text/UIBalloonText.cpp index c0ee132c..20aca141 100644 --- a/Source/UI/Text/UIBalloonText.cpp +++ b/Source/UI/Text/UIBalloonText.cpp @@ -149,3 +149,10 @@ void UINameBalloonText::Slot19() { this->Invalidate(); } } + +// OFFSET: 0x00865CC0 +// FUNCTION: fn_10935 +void UIBalloonText::SetFontHeight(int height) { + this->m_fontHeight = height; + this->FitText(); +} diff --git a/Source/UI/Text/UIBalloonText.h b/Source/UI/Text/UIBalloonText.h index 3a65c3d7..770392b3 100644 --- a/Source/UI/Text/UIBalloonText.h +++ b/Source/UI/Text/UIBalloonText.h @@ -28,6 +28,7 @@ public: void SetText(const char* text, int width); void FitText(); + void SetFontHeight(int height); protected: /* 007C */ unsigned char unknown_007C; diff --git a/Source/UI/Text/UIStaticText.cpp b/Source/UI/Text/UIStaticText.cpp index 73207beb..3b3cabad 100644 --- a/Source/UI/Text/UIStaticText.cpp +++ b/Source/UI/Text/UIStaticText.cpp @@ -201,3 +201,12 @@ void UIStaticText3::Paint() { static_cast(this->red) | (static_cast(this->green) << 8) | (static_cast(this->blue) << 16); this->DrawTextAt(controls.fonts, controls.locale, this->textX + 1, 1, this->text.c_str(), 0, this->fontFamily, this->fontHeight, color, this->bold, this->italic); } + +// OFFSET: 0x00865CE0 +// FUNCTION: fn_10936 +void UIStaticText::SetFont(int family, int height, unsigned char bold, unsigned char italic) { + this->fontFamily = family; + this->fontHeight = height; + this->bold = bold; + this->italic = italic; +} diff --git a/Source/UI/Text/UIStaticText.h b/Source/UI/Text/UIStaticText.h index b42c6bdc..60cb4633 100644 --- a/Source/UI/Text/UIStaticText.h +++ b/Source/UI/Text/UIStaticText.h @@ -25,6 +25,7 @@ public: void SetText(const char* value, int outline); void SetColor(int redValue, int greenValue, int blueValue); void SetTextFitted(const char* value); + void SetFont(int family, int height, unsigned char bold, unsigned char italic); /* 007C */ int red; /* 0080 */ int green; diff --git a/Source/UI/UISlotBitmap.cpp b/Source/UI/UISlotBitmap.cpp index 983fc72c..09c10e3e 100644 --- a/Source/UI/UISlotBitmap.cpp +++ b/Source/UI/UISlotBitmap.cpp @@ -25,3 +25,20 @@ void UISlotBitmap::Slot32(int, int) { this->parent->SendMsg(this, 6, this->geometry.id, 226, 0, 0); } } + +// OFFSET: 0x008651A0 +// FUNCTION: fn_10920 +int UISlotBitmap::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + switch (message) { + case 6: + if (argument1 == 203 && this->parent) { + this->parent->SendMsg(this, 6, 203, this->slot, 0, 0); + } + return 0; + case 13: + this->geometry.unknown_0030 = argument1; + return 0; + default: + return UIStaticBitmap::SendMsg(sender, message, argument1, argument2, argument3, argument4); + } +} diff --git a/Source/UI/UISlotBitmap.h b/Source/UI/UISlotBitmap.h index 97060fbe..85ad3891 100644 --- a/Source/UI/UISlotBitmap.h +++ b/Source/UI/UISlotBitmap.h @@ -8,6 +8,7 @@ public: void Slot25(int x, int y) override; void Slot26(int x, int y) override; void Slot32(int x, int y) override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; /* 00B8 */ unsigned char unknown_00B8; /* 00BC */ int unknown_00BC; diff --git a/Source/UI/Window/UIEmblemWnd.cpp b/Source/UI/Window/UIEmblemWnd.cpp index bec4835a..916789a1 100644 --- a/Source/UI/Window/UIEmblemWnd.cpp +++ b/Source/UI/Window/UIEmblemWnd.cpp @@ -64,3 +64,16 @@ void UIEmblemWnd::Slot19() { this->Invalidate(); } } + +// OFFSET: 0x00864D60 +// FUNCTION: fn_10917 +int UIEmblemWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + if (message == 34) { + this->aid = argument1; + this->guildId = argument2; + } else if (message == 60 && this->guildId == static_cast(argument1)) { + this->Invalidate(); + } + + return 0; +} diff --git a/Source/UI/Window/UIEmblemWnd.h b/Source/UI/Window/UIEmblemWnd.h index 07db05a9..a9f52275 100644 --- a/Source/UI/Window/UIEmblemWnd.h +++ b/Source/UI/Window/UIEmblemWnd.h @@ -9,6 +9,7 @@ class UIEmblemWnd : public UIWindow { public: void Slot19() override; void Paint() override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; /* 007C */ int screenX; /* 0080 */ int screenY; diff --git a/Source/UI/Window/UITab.cpp b/Source/UI/Window/UITab.cpp index 29493a1b..93728612 100644 --- a/Source/UI/Window/UITab.cpp +++ b/Source/UI/Window/UITab.cpp @@ -48,3 +48,14 @@ void UITab::Slot25(int, int y) { this->parent->SendMsg(this, 22, this->geometry.unknown_0030, 0, 0, 0); } } + +// OFFSET: 0x00865200 +// FUNCTION: fn_10921 +int UITab::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + if (message == 13) { + this->geometry.unknown_0030 = argument1; + this->Invalidate(); + } + + return 0; +} diff --git a/Source/UI/Window/UITab.h b/Source/UI/Window/UITab.h index 3d986487..7baa2157 100644 --- a/Source/UI/Window/UITab.h +++ b/Source/UI/Window/UITab.h @@ -7,6 +7,7 @@ class UITab : public UIWindow { public: void Paint() override; void Slot25(int x, int y) override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; /* 007C */ int tabCount; /* 0080 */ int style; diff --git a/Source/UI/Window/UIWordDisplayWnd.cpp b/Source/UI/Window/UIWordDisplayWnd.cpp index 97844948..a4c1be4e 100644 --- a/Source/UI/Window/UIWordDisplayWnd.cpp +++ b/Source/UI/Window/UIWordDisplayWnd.cpp @@ -41,3 +41,13 @@ void UIWordDisplayWnd::Slot19() { const int x = static_cast(screenX - static_cast(g_renderer->viewport.width * 5 / 640) * scale); this->Move(x, y); } + +// OFFSET: 0x00865360 +// FUNCTION: fn_10923 +int UIWordDisplayWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { + if (message == 34) { + this->aid = argument1; + } + + return 0; +} diff --git a/Source/UI/Window/UIWordDisplayWnd.h b/Source/UI/Window/UIWordDisplayWnd.h index 9a6d8cbb..7ec31154 100644 --- a/Source/UI/Window/UIWordDisplayWnd.h +++ b/Source/UI/Window/UIWordDisplayWnd.h @@ -10,6 +10,7 @@ class UIWordDisplayWnd : public UIFrameWnd { public: void Slot19() override; void Paint() override; + int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override; /* 00B4 */ int screenX; /* 00B8 */ int screenY;