projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
735fc2a
)
Make hud_get return aligment, offset and size. (#7006)
author
lisacvuk
<lisacvukhome@gmail.com>
Sun, 4 Feb 2018 09:17:46 +0000
(10:17 +0100)
committer
Loïc Blot
<nerzhul@users.noreply.github.com>
Sun, 4 Feb 2018 09:17:46 +0000
(10:17 +0100)
* Make hud_get return aligment and offset.
* Return size aswell.
src/script/common/c_content.cpp
patch
|
blob
|
history
diff --git
a/src/script/common/c_content.cpp
b/src/script/common/c_content.cpp
index cac48d4882f4b6cab99fd6d99f36be1ca0285c81..38e9411af17caaa2caff27933d8bb882c36c157e 100644
(file)
--- 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");