From 2e40e311a033f315ef57e0b56bb93a7f6df8e1ab Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 4 Feb 2015 03:23:06 +0100 Subject: [PATCH] Add simple background image for the bars --- init.lua | 16 ++++++++++++++++ textures/hudbars_bar_background.png | Bin 0 -> 140 bytes 2 files changed, 16 insertions(+) create mode 100644 textures/hudbars_bar_background.png diff --git a/init.lua b/init.lua index 45226a5..65b28cb 100644 --- a/init.lua +++ b/init.lua @@ -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, diff --git a/textures/hudbars_bar_background.png b/textures/hudbars_bar_background.png new file mode 100644 index 0000000000000000000000000000000000000000..cbc6c3f519956fab4bbe266ef26428e4ed8bb66c GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0vp^i-1^&gAGXDuwcytQo)`sjv*QM-rh14JYXQe>}V;R zkoYBH-o%+lW$xTKs>gD6s+8xy1Bv;QLawHB`MrGib4H^yhoEAUfS?ivb!eU7@d&*Q Z3=a;oDeIOTssb9%;OXk;vd$@?2>|+XD)|5a literal 0 HcmV?d00001