Add z_index to HUD elements

This commit is contained in:
Wuzzy 2020-04-07 14:39:05 +02:00
parent 23b0467645
commit 4ad81439d0
5 changed files with 9 additions and 0 deletions

View File

@ -10,6 +10,7 @@ local health_bar_definition = {
direction = 0,
size = { x=24, y=24 },
offset = { x=(-10*16)-64-32, y=-(48+24+24)},
z_index = 1,
}
local breath_bar_definition = {
@ -20,6 +21,7 @@ local breath_bar_definition = {
dir = 0,
size = { x=24, y=24 },
offset = {x=16,y=-(48+24+24)-24},
z_index = 1,
}
local health_bar_bg = {
@ -30,6 +32,7 @@ local health_bar_bg = {
direction = 0,
size = { x=24, y=24 },
offset = { x=(-10*16)-64-32, y=-(48+24+24)},
z_index = 0,
}
local breath_bar_bg = {
@ -40,6 +43,7 @@ local breath_bar_bg = {
dir = 0,
size = { x=24, y=24 },
offset = {x=16,y=-(48+24+24)-24},
z_index = 0,
}
default.hud.ids={}

View File

@ -108,6 +108,7 @@ function hunger.update_bar(player)
dir = 0,
size = {x=24, y=24},
offset = {x=16, y=-(48+24+24)},
z_index = 1,
})
end
end
@ -153,6 +154,7 @@ local function on_joinplayer(player)
dir = 0,
size = {x=24, y=24},
offset = {x=16, y=-(48+24+24)},
z_index = 0,
})
hunger.update_bar(player)

View File

@ -59,6 +59,7 @@ local function display_effect_icons(player)
scale = { x = 3, y = 3 },
size = { x = 16, y = 16 },
alignment = { x = 1, y = 1 },
z_index = 10,
})
table.insert(huds[name], id)
i = i + 1

View File

@ -42,6 +42,7 @@ local function set_hud(player)
alignment = {x=0, y=0},
number = 0xFFFFFF ,
text = "",
z_index = 10,
})
end

View File

@ -12,6 +12,7 @@ if enable_vignette then
scale = {x = -100, y = -100},
alignment = 0,
text = "vignette_vignette.png",
z_index = -40,
}
local function on_joinplayer(player)