From 2ff8eac022f397bb1aed28aca376fbe422fc8b3c Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 29 May 2024 14:45:49 +1000 Subject: Start on TTS support by logging the data that will become TTS lines Includes some misc cleanup of haptic double-triggering (or non-triggering), since those cases all end up being TTS event double-reporting, which to me crosses the threshold from "annoying" to "usability issue" --- lib/luavgl/src/group.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib') diff --git a/lib/luavgl/src/group.c b/lib/luavgl/src/group.c index 7d88bbe9..9dabbad4 100644 --- a/lib/luavgl/src/group.c +++ b/lib/luavgl/src/group.c @@ -248,6 +248,14 @@ static int luavgl_group_get_focused(lua_State *L) return 1; } +static int luavgl_group_clear_focus(lua_State *L) +{ + luavgl_group_t *g = luavgl_check_group(L, 1); + g->group->obj_focus = NULL; + + return 0; +} + static int luavgl_group_remove_obj(lua_State *L) { lv_obj_t *obj = luavgl_to_obj(L, 1); @@ -319,6 +327,7 @@ static const luaL_Reg group_methods[] = { {"get_wrap", luavgl_group_get_wrap }, {"get_obj_count", luavgl_group_get_obj_count}, {"get_focused", luavgl_group_get_focused }, + {"clear_focus", luavgl_group_clear_focus }, {NULL, NULL }, }; -- cgit v1.2.3