Fix wielded item text overlapping with HUD
This commit is contained in:
parent
271cdbcf03
commit
41a1a3167d
@ -7,6 +7,7 @@ local dtimes = {}
|
|||||||
local dlimit = 3 -- HUD element will be hidden after this many seconds
|
local dlimit = 3 -- HUD element will be hidden after this many seconds
|
||||||
|
|
||||||
local hudbars_mod = minetest.get_modpath("hudbars")
|
local hudbars_mod = minetest.get_modpath("hudbars")
|
||||||
|
local xp_mod = minetest.get_modpath("mcl_experience")
|
||||||
|
|
||||||
local function set_hud(player)
|
local function set_hud(player)
|
||||||
if not player:is_player() then return end
|
if not player:is_player() then return end
|
||||||
@ -28,6 +29,9 @@ local function set_hud(player)
|
|||||||
local vmargin = tonumber(minetest.settings:get("hudbars_vmargin")) or 28
|
local vmargin = tonumber(minetest.settings:get("hudbars_vmargin")) or 28
|
||||||
off.y = -76 - vmargin*rows
|
off.y = -76 - vmargin*rows
|
||||||
end
|
end
|
||||||
|
if xp_mod then
|
||||||
|
off.y = off.y - 25
|
||||||
|
end
|
||||||
|
|
||||||
-- Dirty trick to avoid collision with Minetest's status text (e.g. “Volume changed to 0%”)
|
-- Dirty trick to avoid collision with Minetest's status text (e.g. “Volume changed to 0%”)
|
||||||
if off.y >= -167 and off.y <= -156 then
|
if off.y >= -167 and off.y <= -156 then
|
||||||
|
Loading…
Reference in New Issue
Block a user