diff --git a/Source/UI/Buttons/UIDescriptRace.cpp b/Source/UI/Buttons/UIDescriptRace.cpp index 4df45104..d663ec4b 100644 --- a/Source/UI/Buttons/UIDescriptRace.cpp +++ b/Source/UI/Buttons/UIDescriptRace.cpp @@ -13,6 +13,12 @@ UIDescriptRace::UIDescriptRace(int race) : m_race(race), unknown_0284(0) { this->m_noRace = race == 0; } +// OFFSET: 0x008861C0 +// FUNCTION: fn_11323 +void UIDescriptRace::Slot15(int, int) { + this->SendMsg(nullptr, 13, this->m_noRace, 0, 0, 0); +} + // OFFSET: 0x008985D0 // FUNCTION: fn_11548 int UIDescriptRace::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) { diff --git a/Source/UI/Buttons/UIDescriptRace.h b/Source/UI/Buttons/UIDescriptRace.h index ff3a820b..c1be02eb 100644 --- a/Source/UI/Buttons/UIDescriptRace.h +++ b/Source/UI/Buttons/UIDescriptRace.h @@ -22,6 +22,7 @@ struct UIDescriptRaceText { class UIDescriptRace : public UIBitmapButton { public: explicit UIDescriptRace(int race); + void Slot15(int width, int height) 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; diff --git a/Source/UI/Edit/UIItemTagCtrl.h b/Source/UI/Edit/UIItemTagCtrl.h index 05a22e74..2c035f8e 100644 --- a/Source/UI/Edit/UIItemTagCtrl.h +++ b/Source/UI/Edit/UIItemTagCtrl.h @@ -13,6 +13,7 @@ struct ITEM_INFO; class UIItemTagCtrl : public UIEditCtrl { public: virtual bool CanInsertTag(const std::string& name, int width); + virtual void AddTagButton(UIWindow* button); std::string AppendTag(const std::string& name); int MeasureText(const std::string& text, const unsigned& bytes); @@ -37,9 +38,15 @@ public: class UIItemTagOnMail : public UIItemTagCtrl { public: bool CanInsertTag(const std::string& name, int width) override; + void AddTagButton(UIWindow* button) override; void SetLines(const std::vector& lines); /* 015C */ std::vector m_lines; }; +class UIItemTagOnMegaPhone : public UIItemTagCtrl { +public: + void AddTagButton(UIWindow* button) override; +}; + #endif diff --git a/Source/UI/Text/UITextViewer.cpp b/Source/UI/Text/UITextViewer.cpp index 0361e372..69356ff7 100644 --- a/Source/UI/Text/UITextViewer.cpp +++ b/Source/UI/Text/UITextViewer.cpp @@ -5,6 +5,7 @@ #include "UI/Text/ColoredText.h" #include "UI/Text/ItemLinkDisplay.h" #include "UI/Text/TextMarkup.h" +#include "UI/Edit/UIItemTagCtrl.h" #include "UI/Lists/UIScrollBar.h" #include "UI/Buttons/UITextButton.h" #include "UI/Text/UITextViewer.h" @@ -275,3 +276,28 @@ void UITextViewEX::Refresh() { this->verticalBar->Invalidate(); } + +// OFFSET: 0x00874DF0 +// FUNCTION: fn_11194 +void UIItemTagCtrl::AddTagButton(UIWindow* button) { + UIWindow* window = g_windowMgr.GetHoverWindow(); + if (window) { + window->AddChild(button); + } +} + +// OFFSET: 0x00874E10 +// FUNCTION: fn_11195 +void UIItemTagOnMail::AddTagButton(UIWindow* button) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0458)) { + window->AddChild(button); + } +} + +// OFFSET: 0x00874E30 +// FUNCTION: fn_11196 +void UIItemTagOnMegaPhone::AddTagButton(UIWindow* button) { + if (UIWindow* window = reinterpret_cast(g_windowMgr.unknown_0318)) { + window->AddChild(button); + } +} diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index a6f48e64..868bb28e 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -1120,6 +1120,8 @@ void UIMessageBoxAutoreturn::Slot19() { this->gauge->SetValue(static_cast(progress)); } +// OFFSET: 0x008AA9D0 + // OFFSET: 0x008AAA10 // FUNCTION: fn_11724 void UIMonsterInfoWnd::DrawResistance(int x, int y, const char* label, int value, std::uint32_t border, std::uint32_t fill) { diff --git a/Source/UI/Window/UIMonsterInfoWnd.h b/Source/UI/Window/UIMonsterInfoWnd.h index da0d710e..fa3bea98 100644 --- a/Source/UI/Window/UIMonsterInfoWnd.h +++ b/Source/UI/Window/UIMonsterInfoWnd.h @@ -27,6 +27,7 @@ public: void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; void DrawResistance(int x, int y, const char* label, int value, std::uint32_t border, std::uint32_t fill); + void DrawNewItemIcon(int x, int y); /* 00B4 */ MonsterInfo info; /* 00D4 */ int unknown_00D4;