aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Minecraft.Client/Common/UI/UIScene.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene.cpp b/Minecraft.Client/Common/UI/UIScene.cpp
index 5630e972..0088f43d 100644
--- a/Minecraft.Client/Common/UI/UIScene.cpp
+++ b/Minecraft.Client/Common/UI/UIScene.cpp
@@ -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
{