Add z_index to HUD elements
This commit is contained in:
parent
17f611567c
commit
f27615d77e
5 changed files with 15 additions and 3 deletions
|
@ -297,7 +297,8 @@ function awards.unlock(name, award)
|
|||
text = background,
|
||||
position = {x = 0.5, y = 0},
|
||||
offset = {x = 0, y = 138},
|
||||
alignment = {x = 0, y = -1}
|
||||
alignment = {x = 0, y = -1},
|
||||
z_index = 11,
|
||||
})
|
||||
local hud_announce
|
||||
if awdef.secret == true then
|
||||
|
@ -313,7 +314,8 @@ function awards.unlock(name, award)
|
|||
text = hud_announce,
|
||||
position = {x = 0.5, y = 0},
|
||||
offset = {x = 0, y = 40},
|
||||
alignment = {x = 0, y = -1}
|
||||
alignment = {x = 0, y = -1},
|
||||
z_index = 12,
|
||||
})
|
||||
local three = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
|
@ -323,7 +325,8 @@ function awards.unlock(name, award)
|
|||
text = title,
|
||||
position = {x = 0.5, y = 0},
|
||||
offset = {x = 30, y = 100},
|
||||
alignment = {x = 0, y = -1}
|
||||
alignment = {x = 0, y = -1},
|
||||
z_index = 12,
|
||||
})
|
||||
--[[ We use a statbar instead of image here because statbar allows us to scale the image
|
||||
properly. Note that number is 2, thus leading to a single full image.
|
||||
|
@ -339,6 +342,7 @@ function awards.unlock(name, award)
|
|||
offset = {x = -110, y = 62},
|
||||
alignment = {x = 0, y = 0},
|
||||
direction = 0,
|
||||
z_index = 12,
|
||||
})
|
||||
minetest.after(3, function(name)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue