diff options
author | Wuzzy <almikes@aol.com> | 2015-02-04 03:23:06 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2015-02-04 03:23:06 +0100 |
commit | 2e40e311a033f315ef57e0b56bb93a7f6df8e1ab (patch) | |
tree | d42db2cf88ecf77b4f571d7dc50254053bbd2099 /init.lua | |
parent | 5f3d4b70c6baa3a0f81ee5830f02a4db82885440 (diff) |
Add simple background image for the bars
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -51,6 +51,14 @@ local function custom_hud(player) if minetest.setting_getbool("enable_damage") then --health + player:hud_add({ + hud_elem_type = "image", + position = HUD_HEALTH_POS, + scale = { x = 1, y = 1 }, + text = "hudbars_bar_background.png", + alignment = {x=1,y=1}, + offset = { x = HUD_HEALTH_OFFSET.x - 1, y = HUD_HEALTH_OFFSET.y - 1 }, + }) health_hud[name] = player:hud_add({ hud_elem_type = "statbar", position = HUD_HEALTH_POS, @@ -61,6 +69,14 @@ local function custom_hud(player) }) --air + player:hud_add({ + hud_elem_type = "image", + position = HUD_AIR_POS, + scale = { x = 1, y = 1 }, + text = "hudbars_bar_background.png", + alignment = {x=1,y=1}, + offset = { x = HUD_AIR_OFFSET.x - 1, y = HUD_AIR_OFFSET.y - 1 }, + }) air_hud[name] = player:hud_add({ hud_elem_type = "statbar", position = HUD_AIR_POS, |