Skip to content

Commit 97f7cfb

Browse files
hud_elem_type fix
1 parent 3ab6040 commit 97f7cfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hud.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local function setup_hud(player)
88
local data = {}
99

1010
data.img = player:hud_add({
11-
hud_elem_type = "image",
11+
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "image",
1212
position = hud_position,
1313
text = "mapsync_loaded.png",
1414
offset = {x = 0, y = 0},
@@ -17,7 +17,7 @@ local function setup_hud(player)
1717
})
1818

1919
data.text = player:hud_add({
20-
hud_elem_type = "text",
20+
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "text",
2121
position = hud_position,
2222
number = 0x00ff00,
2323
text = "",
@@ -27,7 +27,7 @@ local function setup_hud(player)
2727
})
2828

2929
data.text2 = player:hud_add({
30-
hud_elem_type = "text",
30+
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "text",
3131
position = hud_position,
3232
number = 0x00ff00,
3333
text = "",

0 commit comments

Comments
 (0)