feat(ui): add CSimpleCheckbox::Enable

This commit is contained in:
fallenoak 2025-11-18 22:24:34 -06:00
parent 0a2c95cda1
commit cdf7dc88d8
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 6 additions and 0 deletions

View File

@ -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;
}

View File

@ -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)