From b526dbaba5246ceedbe8a4d361bb406e59dbcf56 Mon Sep 17 00:00:00 2001 From: Martin Vladic Date: Wed, 4 Sep 2024 12:03:34 +0200 Subject: [PATCH] #516 --- packages/project-editor/lvgl/widgets/Base.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/project-editor/lvgl/widgets/Base.tsx b/packages/project-editor/lvgl/widgets/Base.tsx index ad691797..1595bef0 100644 --- a/packages/project-editor/lvgl/widgets/Base.tsx +++ b/packages/project-editor/lvgl/widgets/Base.tsx @@ -1538,19 +1538,23 @@ export class LVGLWidget extends Widget { build.line( `lv_obj_add_event_cb(obj, ${build.getCheckedEventHandlerCallbackName( this - )}, LV_EVENT_VALUE_CHANGED, ${eventHandler.userData});` + )}, LV_EVENT_VALUE_CHANGED, (void *)${ + eventHandler.userData + });` ); } else if (eventHandler.eventName == "UNCHECKED") { build.line( `lv_obj_add_event_cb(obj, ${build.getUncheckedEventHandlerCallbackName( this - )}, LV_EVENT_VALUE_CHANGED, ${eventHandler.userData});` + )}, LV_EVENT_VALUE_CHANGED, (void *)${ + eventHandler.userData + });` ); } else { build.line( `lv_obj_add_event_cb(obj, ${build.getActionFunctionName( eventHandler.action - )}, LV_EVENT_${eventHandler.eventName}, ${ + )}, LV_EVENT_${eventHandler.eventName}, (void *)${ eventHandler.userData });` );