Fixed bug in component/button example: (#1107)

- The '-1' and '+1' buttons now correctly increment and decrement.
 - Previously it was vice versa.s
This commit is contained in:
Samuel Bridgham
2025-09-01 04:02:21 -04:00
committed by GitHub
parent 853d87e917
commit f5785fd3b4

View File

@@ -34,8 +34,8 @@ int main() {
int value = 50;
// clang-format off
auto btn_dec_01 = Button("-1", [&] { value += 1; }, Style());
auto btn_inc_01 = Button("+1", [&] { value -= 1; }, Style());
auto btn_dec_01 = Button("-1", [&] { value -= 1; }, Style());
auto btn_inc_01 = Button("+1", [&] { value += 1; }, Style());
auto btn_dec_10 = Button("-10", [&] { value -= 10; }, Style());
auto btn_inc_10 = Button("+10", [&] { value += 10; }, Style());
// clang-format on