diff options
| author | Alezito2008 <92759854+Alezito2008@users.noreply.github.com> | 2026-03-10 00:03:39 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-09 22:03:39 -0500 |
| commit | 5f777a7f45455641b9ff4bb534cadcf0f763b0a3 (patch) | |
| tree | f035a418a1178006b1c567e532a855246df0b37b /Minecraft.Client | |
| parent | 3bcf588fbe041bd9d81f51348c3e98876dc9d4e2 (diff) | |
Fix: Prevent clicking disabled checkboxes (#1075)
Diffstat (limited to 'Minecraft.Client')
| -rw-r--r-- | Minecraft.Client/Common/UI/UIScene.cpp | 9 |
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 { |
