Fix Color UI external_control, wait_for_release (#19771)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Victor Oliveira
2020-10-16 18:19:48 -03:00
committed by GitHub
parent e370834c35
commit 0b80841c38
4 changed files with 20 additions and 15 deletions

View File

@@ -164,7 +164,13 @@ class Touch {
static void reset() { controls_count = 0; touch_time = -1; current_control = NULL; }
static void clear() { controls_count = 0; }
static void idle();
static bool is_clicked() { return touch_control_type == CLICK; }
static bool is_clicked() {
if (touch_control_type == CLICK) {
touch_control_type = NONE;
return true;
}
return false;
}
static void disable() { enabled = false; }
static void enable() { enabled = true; }