mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Make hud_get return aligment, offset and size. (#7006)
* Make hud_get return aligment and offset. * Return size aswell.
This commit is contained in:
parent
735fc2a1f2
commit
4f5090ff68
@ -1865,6 +1865,15 @@ void push_hud_element(lua_State *L, HudElement *elem)
|
|||||||
lua_pushnumber(L, elem->dir);
|
lua_pushnumber(L, elem->dir);
|
||||||
lua_setfield(L, -2, "direction");
|
lua_setfield(L, -2, "direction");
|
||||||
|
|
||||||
|
push_v2f(L, elem->offset);
|
||||||
|
lua_setfield(L, -2, "offset");
|
||||||
|
|
||||||
|
push_v2f(L, elem->align);
|
||||||
|
lua_setfield(L, -2, "alignment");
|
||||||
|
|
||||||
|
push_v2s32(L, elem->size);
|
||||||
|
lua_setfield(L, -2, "size");
|
||||||
|
|
||||||
// Deprecated, only for compatibility's sake
|
// Deprecated, only for compatibility's sake
|
||||||
lua_pushnumber(L, elem->dir);
|
lua_pushnumber(L, elem->dir);
|
||||||
lua_setfield(L, -2, "dir");
|
lua_setfield(L, -2, "dir");
|
||||||
|
Loading…
Reference in New Issue
Block a user