From 1a8cd02f5f5a1d67212e7e2b609cbaab8a1d4052 Mon Sep 17 00:00:00 2001 From: Nicolas Roggeman Date: Wed, 18 Oct 2023 16:13:57 +0200 Subject: [PATCH] Support long press button in screenshots generation --- lib_nbgl/include/nbgl_obj.h | 1 + lib_nbgl/src/nbgl_layout.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib_nbgl/include/nbgl_obj.h b/lib_nbgl/include/nbgl_obj.h index b9a1a4e26..8411df745 100644 --- a/lib_nbgl/include/nbgl_obj.h +++ b/lib_nbgl/include/nbgl_obj.h @@ -476,6 +476,7 @@ enum { KEYPAD_ID, KEYBOARD_ID, ENTERED_TEXT_ID, + LONG_PRESS_BUTTON_ID, CONTROLS_ID, // when multiple controls in the same pages (buttons, switches, radios) NB_CONTROL_IDS }; diff --git a/lib_nbgl/src/nbgl_layout.c b/lib_nbgl/src/nbgl_layout.c index dc90ebc44..a534cc2ab 100644 --- a/lib_nbgl/src/nbgl_layout.c +++ b/lib_nbgl/src/nbgl_layout.c @@ -1914,6 +1914,7 @@ int nbgl_layoutAddLongPressButton(nbgl_layout_t *layout, container->children = (nbgl_obj_t **) nbgl_containerPoolGet(container->nbChildren, layoutInt->layer); container->obj.alignment = BOTTOM_MIDDLE; + container->obj.touchId = LONG_PRESS_BUTTON_ID; container->obj.touchMask = ((1 << TOUCHING) | (1 << TOUCH_RELEASED) | (1 << OUT_OF_TOUCH)); button = (nbgl_button_t *) nbgl_objPoolGet(BUTTON, layoutInt->layer);