From cdf7dc88d839fd8f0f0507324a20f94a2de0812c Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 18 Nov 2025 22:24:34 -0600 Subject: [PATCH] feat(ui): add CSimpleCheckbox::Enable --- src/ui/CSimpleCheckbox.cpp | 5 +++++ src/ui/CSimpleCheckbox.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/src/ui/CSimpleCheckbox.cpp b/src/ui/CSimpleCheckbox.cpp index 160ca41..2dfbde9 100644 --- a/src/ui/CSimpleCheckbox.cpp +++ b/src/ui/CSimpleCheckbox.cpp @@ -39,6 +39,11 @@ bool CSimpleCheckbox::IsA(int32_t type) { || type == CScriptObject::s_objectType; } +void CSimpleCheckbox::Enable(int32_t enabled) { + this->CSimpleButton::Enable(enabled); + this->SetChecked(this->m_checked, 1); +} + int32_t CSimpleCheckbox::GetChecked() { return this->m_checked; } diff --git a/src/ui/CSimpleCheckbox.hpp b/src/ui/CSimpleCheckbox.hpp index 894d5c7..9766ffa 100644 --- a/src/ui/CSimpleCheckbox.hpp +++ b/src/ui/CSimpleCheckbox.hpp @@ -23,6 +23,7 @@ class CSimpleCheckbox : public CSimpleButton { virtual bool IsA(int32_t type); virtual int32_t GetScriptMetaTable(); virtual void LoadXML(XMLNode* node, CStatus* status); + virtual void Enable(int32_t enabled); // Member functions CSimpleCheckbox(CSimpleFrame* parent)