Fixed Options.HudOffset being evaluated wrong in Y direction

closes #890
This commit is contained in:
Wofsauge committed 2025-07-17 20:52:54 +02:00
1 parent 3e566ecedc
commit 5b90f91b6f
1 file changed
+6 -4
+6 -4
View File
@@ -1205,7 +1205,9 @@ end
function EID:CheckPosModifiers()
-- HUD offset adjustment, done every frame so it looks nice while changing the option
if Options then
EID:addTextPosModifier("HudOffset", Vector(((Options.HUDOffset * 10) * 2) - 20, (Options.HUDOffset * 10) - 10))
-- Read the HUD offset from the Options table if it exists.
-- +3 Y to avoid overlapping with the shadow of the charge bar hud
EID:addTextPosModifier("HudOffset", Vector(20, 12) * (Options.HUDOffset - 1) + Vector(0, 3))
else
EID:addTextPosModifier("HudOffset", Vector((EID.Config["HUDOffset"] * 2) - 20, EID.Config["HUDOffset"] - 10))
end
@@ -1214,20 +1216,20 @@ function EID:CheckPosModifiers()
-- Repentance+ pushes a lot of UI lower, so we have to push the description lower as well to avoid overlapping
if EID.isRepentancePlus then
EID:addTextPosModifier("Repentance+", Vector(0,10))
EID:addTextPosModifier("Repentance+", Vector(0, 10))
else
EID:removeTextPosModifier("Repentance+")
end
-- Greed Mode small right adjustment
if game:IsGreedMode() then
EID:addTextPosModifier("Greed Mode Horizontal", Vector(8,0))
EID:addTextPosModifier("Greed Mode Horizontal", Vector(8, 0))
else
EID:removeTextPosModifier("Greed Mode Horizontal")
end
if not EID.isRepentance then
-- AB+ Schoolbag adjustment
if EID.player:HasCollectible(CollectibleType.COLLECTIBLE_SCHOOLBAG) then
EID:addTextPosModifier("Schoolbag", Vector(0,30))
EID:addTextPosModifier("Schoolbag", Vector(0, 30))
else
EID:removeTextPosModifier("Schoolbag")
end