From 78083f985c18dde2660d39b7c1ce753dd231540b 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 984f08066..a9937adff 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 9a7fa691d..cd16d0967 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);