From 49b399f80b9064b1f7b405e464ebc3ac83b51c77 Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Thu, 5 Oct 2023 20:02:59 +0200 Subject: [PATCH] =?UTF-8?q?-=20[NEW]=20ComboBox=20-=20El=20text=20en=20el?= =?UTF-8?q?=20Textbox=20ja=20no=20est=C3=A0=20centrat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/jui.cpp | 36 +++++++++++++++++++++++++++++++++--- source/jui.h | 1 + 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/source/jui.cpp b/source/jui.cpp index d1cca75..2445f70 100644 --- a/source/jui.cpp +++ b/source/jui.cpp @@ -26,17 +26,47 @@ namespace ui return 0; } + const int combo(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=x) && (mx=y) && (my