mods - hudbars and hbarmor - minimize textures and simplified
* remove icon on progress bar, use simple bar simplistic * optimize size of the textures * remove unnecesary textures, dont use backgrounds, simplistic
@ -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
|
||||
|
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 147 B |
@ -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)
|
||||
|
Before Width: | Height: | Size: 113 B |
Before Width: | Height: | Size: 161 B |
Before Width: | Height: | Size: 302 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 143 B |