mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-03-22 12:58:13 +05:00
Fix: Prevent clicking disabled checkboxes (#1075)
This commit is contained in:
@@ -578,9 +578,12 @@ bool UIScene::handleMouseClick(F32 x, F32 y)
|
||||
if (bestCtrl->getControlType() == UIControl::eCheckBox)
|
||||
{
|
||||
UIControl_CheckBox *cb = static_cast<UIControl_CheckBox*>(bestCtrl);
|
||||
bool newState = !cb->IsChecked();
|
||||
cb->setChecked(newState);
|
||||
handleCheckboxToggled((F64)bestId, newState);
|
||||
if (cb->IsEnabled())
|
||||
{
|
||||
bool newState = !cb->IsChecked();
|
||||
cb->setChecked(newState);
|
||||
handleCheckboxToggled((F64)bestId, newState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user