diff --git a/Source/UI/Buttons/UIBmpRadioBtn.h b/Source/UI/Buttons/UIBmpRadioBtn.h index 4bcf6775..1b8081db 100644 --- a/Source/UI/Buttons/UIBmpRadioBtn.h +++ b/Source/UI/Buttons/UIBmpRadioBtn.h @@ -47,6 +47,7 @@ protected: class UIBmpRadioBtn2 : public UIBmpRadioBtn { public: + void Invalidate() override; void Slot47() override; void Slot48() override; }; diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 910032d6..c7c0ddee 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -350,6 +350,16 @@ void UIBmpRadioBtn::AddText(int id, int height, std::uint32_t color, bool bold, this->m_texts.push_back(text); } +// OFFSET: 0x008816B0 +// FUNCTION: fn_11298 +void UIBmpRadioBtn2::Invalidate() { + UIWindow::Invalidate(); + + if (this->parent != nullptr && !this->parent->IsCached()) { + this->parent->SendMsg(this, 60, 0, 0, 0, 0); + } +} + // OFFSET: 0x007C7CA0 // FUNCTION: fn_09408 void UIBmpRadioBtn2::Slot47() { diff --git a/Source/UI/Window/UIWindow.h b/Source/UI/Window/UIWindow.h index 278967ce..0c7149b4 100644 --- a/Source/UI/Window/UIWindow.h +++ b/Source/UI/Window/UIWindow.h @@ -212,6 +212,10 @@ public: return this->unknown_0048; } + bool IsCached() const { + return this->m_cached != 0; + } + /* 0010 */ UIWindow* parent; /* 0014 */ WindowGeometry geometry;