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)