added size fields to statbar hud elements (not doing so is deprecated)
This commit is contained in:
parent
05e692a0d5
commit
0958632969
@ -7,7 +7,8 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
offset = {x =-100, y = -40},
|
offset = {x =-100, y = -40},
|
||||||
text = "bar_red.png",
|
text = "bar_red.png",
|
||||||
direction = 0,
|
direction = 0,
|
||||||
number = 20
|
number = 20,
|
||||||
|
size = { x=2, y=20 }
|
||||||
})
|
})
|
||||||
local idy = player:hud_add({
|
local idy = player:hud_add({
|
||||||
hud_elem_type = "text",
|
hud_elem_type = "text",
|
||||||
@ -40,4 +41,4 @@ minetest.register_globalstep(function(dtime)
|
|||||||
player:hud_change(i["idt"], "text", energy .. " / " .. energymax)
|
player:hud_change(i["idt"], "text", energy .. " / " .. energymax)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -26,6 +26,7 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
offset = {x =-100, y = -40},
|
offset = {x =-100, y = -40},
|
||||||
text = "bar_red.png",
|
text = "bar_red.png",
|
||||||
direction = 0,
|
direction = 0,
|
||||||
|
size = { x=2, y=20 }, -- looks correct with 2, less is invisble, more is too big :/
|
||||||
number = 20
|
number = 20
|
||||||
})
|
})
|
||||||
local idy = player:hud_add({
|
local idy = player:hud_add({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user