From 1c76e406ca40dfa1c91e8f33c7e8163c45c35c1d Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Fri, 6 Oct 2023 15:39:50 +0200 Subject: [PATCH] - [NEW] Spin control --- source/jui.cpp | 27 +++++++++++++++++++++++++++ source/jui.h | 1 + 2 files changed, 28 insertions(+) diff --git a/source/jui.cpp b/source/jui.cpp index 2445f70..8296d9e 100644 --- a/source/jui.cpp +++ b/source/jui.cpp @@ -56,6 +56,33 @@ namespace ui return 0; } + const int spin(const char *label, const int x, const int y, const int w, const int h) + { + const int mx = input::mouseX(); + const int my = input::mouseY(); + //const bool btnDown = input::mouseBtn(1) || input::mouseBtn(3); + const bool inside = (mx>=x) && (mx=y) && (my