Skip to content

Commit 4f5090f

Browse files
lisacvuknerzhul
authored andcommitted
Make hud_get return aligment, offset and size. (#7006)
* Make hud_get return aligment and offset. * Return size aswell.
1 parent 735fc2a commit 4f5090f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/script/common/c_content.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1865,6 +1865,15 @@ void push_hud_element(lua_State *L, HudElement *elem)
18651865
lua_pushnumber(L, elem->dir);
18661866
lua_setfield(L, -2, "direction");
18671867

1868+
push_v2f(L, elem->offset);
1869+
lua_setfield(L, -2, "offset");
1870+
1871+
push_v2f(L, elem->align);
1872+
lua_setfield(L, -2, "alignment");
1873+
1874+
push_v2s32(L, elem->size);
1875+
lua_setfield(L, -2, "size");
1876+
18681877
// Deprecated, only for compatibility's sake
18691878
lua_pushnumber(L, elem->dir);
18701879
lua_setfield(L, -2, "dir");

0 commit comments

Comments
 (0)