From: lisacvuk Date: Sun, 4 Feb 2018 09:17:46 +0000 (+0100) Subject: Make hud_get return aligment, offset and size. (#7006) X-Git-Tag: 5.0.0~599 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4f5090ff68a0c51fd7bf23a709c27721109d8c5e;p=oweals%2Fminetest.git Make hud_get return aligment, offset and size. (#7006) * Make hud_get return aligment and offset. * Return size aswell. --- diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index cac48d488..38e9411af 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -1865,6 +1865,15 @@ void push_hud_element(lua_State *L, HudElement *elem) lua_pushnumber(L, elem->dir); 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 lua_pushnumber(L, elem->dir); lua_setfield(L, -2, "dir");