From 09586329696aa306e79f340aa1d6596c41de4353 Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Mon, 1 Apr 2019 02:31:13 +0200 Subject: [PATCH] added size fields to statbar hud elements (not doing so is deprecated) --- sparkcore/lua/hud.lua | 5 +++-- sparkdebug/lua/multimeter.lua | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sparkcore/lua/hud.lua b/sparkcore/lua/hud.lua index dbcbc78..c5800fc 100644 --- a/sparkcore/lua/hud.lua +++ b/sparkcore/lua/hud.lua @@ -7,7 +7,8 @@ minetest.register_on_joinplayer(function(player) offset = {x =-100, y = -40}, text = "bar_red.png", direction = 0, - number = 20 + number = 20, + size = { x=2, y=20 } }) local idy = player:hud_add({ hud_elem_type = "text", @@ -40,4 +41,4 @@ minetest.register_globalstep(function(dtime) player:hud_change(i["idt"], "text", energy .. " / " .. energymax) end end -end) \ No newline at end of file +end) diff --git a/sparkdebug/lua/multimeter.lua b/sparkdebug/lua/multimeter.lua index 969a05d..0073974 100644 --- a/sparkdebug/lua/multimeter.lua +++ b/sparkdebug/lua/multimeter.lua @@ -26,6 +26,7 @@ minetest.register_on_joinplayer(function(player) offset = {x =-100, y = -40}, text = "bar_red.png", direction = 0, + size = { x=2, y=20 }, -- looks correct with 2, less is invisble, more is too big :/ number = 20 }) local idy = player:hud_add({