forked from mtcontrib/minetest_hudbars
Move custom hudbars down by 1 iff damage disabled
This commit is contained in:
parent
895028086c
commit
f046592824
10
init.lua
10
init.lua
@ -41,9 +41,15 @@ end
|
||||
|
||||
HUD_CUSTOM_POS_LEFT = HUD_HEALTH_POS
|
||||
HUD_CUSTOM_POS_RIGHT = HUD_AIR_POS
|
||||
|
||||
HUD_CUSTOM_VMARGIN = 24
|
||||
HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y - HUD_CUSTOM_VMARGIN}
|
||||
HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y - HUD_CUSTOM_VMARGIN}
|
||||
if minetest.setting_getbool("enable_damage") then
|
||||
HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y - HUD_CUSTOM_VMARGIN}
|
||||
HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y - HUD_CUSTOM_VMARGIN}
|
||||
else
|
||||
HUD_CUSTOM_START_OFFSET_LEFT = {x=HUD_HEALTH_OFFSET.x, y=HUD_HEALTH_OFFSET.y }
|
||||
HUD_CUSTOM_START_OFFSET_RIGHT = {x=HUD_AIR_OFFSET.x, y=HUD_AIR_OFFSET.y }
|
||||
end
|
||||
|
||||
HUD_TICK = 0.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user