From b4b9ae2d3cccbcbb81c454345d515d6f6099b497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 30 Sep 2025 12:38:38 -0500 Subject: [PATCH] Fix the OnClick behavior on checkboxes, oops. Fixes cheats. --- Common/UI/View.cpp | 1 + UI/CwCheatScreen.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 2a732ed66d..7873615367 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -737,6 +737,7 @@ bool CheckBox::Toggled() const { } void CheckBox::ClickInternal() { + Clickable::ClickInternal(); Toggle(); } diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index ef6a6ece9e..8cbeed314f 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -123,7 +123,7 @@ void CwCheatScreen::CreateViews() { rightColumn->Add(new ItemHeader(cw->T("Cheats"))); for (size_t i = 0; i < fileInfo_.size(); ++i) { rightColumn->Add(new CheckBox(&fileInfo_[i].enabled, fileInfo_[i].name))->OnClick.Add([=](UI::EventParams &) { - return OnCheckBox((int)i); + OnCheckBox((int)i); }); }