summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2024-05-29 14:45:49 +1000
committerjacqueline <me@jacqueline.id.au>2024-05-29 14:45:49 +1000
commit2ff8eac022f397bb1aed28aca376fbe422fc8b3c (patch)
treeae80d0d89a212b1badf1d971fc67e701a9e4e962 /lib
parentef812a53e5a84665e74be8c46cb983edaa712b3f (diff)
downloadtangara-fw-2ff8eac022f397bb1aed28aca376fbe422fc8b3c.tar.gz
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"
Diffstat (limited to 'lib')
-rw-r--r--lib/luavgl/src/group.c9
1 files changed, 9 insertions, 0 deletions
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 },
};