From 4f5090ff68a0c51fd7bf23a709c27721109d8c5e Mon Sep 17 00:00:00 2001 From: lisacvuk Date: Sun, 4 Feb 2018 10:17:46 +0100 Subject: [PATCH] Make hud_get return aligment, offset and size. (#7006) * Make hud_get return aligment and offset. * Return size aswell. --- src/script/common/c_content.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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"); -- 2.25.1