diff --git a/mods/hbarmor/init.lua b/mods/hbarmor/init.lua index f97be0c..7e5c439 100644 --- a/mods/hbarmor/init.lua +++ b/mods/hbarmor/init.lua @@ -83,7 +83,9 @@ local function custom_hud(player) end --register and define armor HUD bar -hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } ) +local hicon = "hbarmor_icon.png" +if hb.settings.bar_type == "progress_bar" then hicon = nil end +hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = hicon, bgicon = nil, bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } ) function hbarmor.get_armor(player) if not player or not armor.def then diff --git a/mods/hbarmor/textures/hbarmor_icon.png b/mods/hbarmor/textures/hbarmor_icon.png index 6a5a763..f76e9c3 100644 Binary files a/mods/hbarmor/textures/hbarmor_icon.png and b/mods/hbarmor/textures/hbarmor_icon.png differ diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua index 3133ff4..9fff093 100644 --- a/mods/hudbars/init.lua +++ b/mods/hudbars/init.lua @@ -234,7 +234,7 @@ function hb.register_hudbar(identifier, text_color, label, textures, default_sta hud_elem_type = "image", position = pos, scale = bgscale, - text = "hudbars_bar_background.png", + text = "", alignment = {x=1,y=1}, offset = { x = offset.x - 1, y = offset.y - 1 }, z_index = 0, @@ -520,8 +520,14 @@ end --register built-in HUD bars if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then - hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, hb.settings.hp_player_maximun, hb.settings.hp_player_maximun, false) - hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = "hudbars_icon_breath.png", bgicon = "hudbars_bgicon_breath.png" }, hb.settings.br_player_maximun, hb.settings.br_player_maximun, true) + local hicon = "hudbars_icon_health.png" + local bicon = "hudbars_icon_breath.png" + if hb.settings.bar_type == "progress_bar" then + hicon = nil + bicon = nil + end + hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = hicon, bgicon = nil }, hb.settings.hp_player_maximun, hb.settings.hp_player_maximun, false) + hb.register_hudbar("breath", 0xFFFFFF, S("Breath"), { bar = "hudbars_bar_breath.png", icon = bicon, bgicon = nil }, hb.settings.br_player_maximun, hb.settings.br_player_maximun, true) end local function hide_builtin(player) diff --git a/mods/hudbars/textures/hudbars_bar_background.png b/mods/hudbars/textures/hudbars_bar_background.png deleted file mode 100644 index e6be257..0000000 Binary files a/mods/hudbars/textures/hudbars_bar_background.png and /dev/null differ diff --git a/mods/hudbars/textures/hudbars_bgicon_breath.png b/mods/hudbars/textures/hudbars_bgicon_breath.png deleted file mode 100644 index 79db8f5..0000000 Binary files a/mods/hudbars/textures/hudbars_bgicon_breath.png and /dev/null differ diff --git a/mods/hudbars/textures/hudbars_bgicon_health.png b/mods/hudbars/textures/hudbars_bgicon_health.png deleted file mode 100644 index e2be276..0000000 Binary files a/mods/hudbars/textures/hudbars_bgicon_health.png and /dev/null differ diff --git a/mods/hudbars/textures/hudbars_icon_breath.png b/mods/hudbars/textures/hudbars_icon_breath.png index 8f49fbd..810cac9 100644 Binary files a/mods/hudbars/textures/hudbars_icon_breath.png and b/mods/hudbars/textures/hudbars_icon_breath.png differ diff --git a/mods/hudbars/textures/hudbars_icon_health.png b/mods/hudbars/textures/hudbars_icon_health.png index f1c980f..d5302ec 100644 Binary files a/mods/hudbars/textures/hudbars_icon_health.png and b/mods/hudbars/textures/hudbars_icon_health.png differ