fix hud not being centered on all screens

This commit is contained in:
chmodsayshello 2022-10-06 22:32:40 +02:00
parent 385f0e60ca
commit b11e9bfb18
1 changed files with 5 additions and 5 deletions

10
hud.lua
View File

@ -3,17 +3,17 @@ function create_huds(arena)
local function create(player) local function create(player)
scoreboard_blue = minetest.get_player_by_name(player):hud_add({ scoreboard_blue = minetest.get_player_by_name(player):hud_add({
hud_elem_type = "text", hud_elem_type = "text",
position = {x = 1, y = 0}, position = {x =0.35, y = 0},
offset = {x=-600, y = 50}, offset = {x=0, y = 50},
scale = {x = 1, y = 1}, scale = {x = 100, y = 100},
text = "0", text = "0",
number = 0x0001FF, number = 0x0001FF,
}) })
scoreboard_red = minetest.get_player_by_name(player):hud_add({ scoreboard_red = minetest.get_player_by_name(player):hud_add({
hud_elem_type = "text", hud_elem_type = "text",
position = {x = 1, y = 0}, position = {x = 0.65, y = 0},
offset = {x=-400, y = 50}, offset = {x=0, y = 50},
scale = {x = 400, y = 1}, scale = {x = 400, y = 1},
text = "0", text = "0",
number = 0xFF0000 number = 0xFF0000