diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-04-19 02:06:37 +0000 |
|---|---|---|
| committer | cooljqln <cooljqln@noreply.codeberg.org> | 2024-04-19 02:06:37 +0000 |
| commit | 7f630cebddcf6d0b8a31632af7ed617f4173a6e1 (patch) | |
| tree | 617537d644ebbbe8315ab0f89ccef368ef5d78ab /lib/luavgl/src/obj.c | |
| parent | b17f8a3dcc36ec2479412f603c7b5e77003b80a2 (diff) | |
| download | tangara-fw-7f630cebddcf6d0b8a31632af7ed617f4173a6e1.tar.gz | |
daniel/recycler-list (#66)
@cooljqln should be good to merge to main, give it a look over though please? :)
Reviewed-on: https://codeberg.org/cool-tech-zone/tangara-fw/pulls/66
Co-authored-by: ailurux <ailuruxx@gmail.com>
Co-committed-by: ailurux <ailuruxx@gmail.com>
Diffstat (limited to 'lib/luavgl/src/obj.c')
| -rw-r--r-- | lib/luavgl/src/obj.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/luavgl/src/obj.c b/lib/luavgl/src/obj.c index 4b108891..fb89e3f9 100644 --- a/lib/luavgl/src/obj.c +++ b/lib/luavgl/src/obj.c @@ -595,6 +595,14 @@ static int luavgl_obj_focus(lua_State *L) { return 0; } +static int luavgl_obj_move_to_index(lua_State *L) { + lv_obj_t *obj = luavgl_to_obj(L, 1); + int idx = luavgl_tointeger(L, 2); + + lv_obj_move_to_index(obj, idx); + return 0; +} + /** * Remove all animations associates to this object */ @@ -672,6 +680,7 @@ static const luaL_Reg luavgl_obj_methods[] = { {"get_coords", luavgl_obj_get_coords}, {"get_pos", luavgl_obj_get_pos}, {"focus", luavgl_obj_focus}, + {"move_to_index", luavgl_obj_move_to_index}, {"onevent", luavgl_obj_on_event}, {"onPressed", luavgl_obj_on_pressed}, |
