Skip to content

GUI.Frame(GUI.RectTransform(Vector2(x, y)), nil) doesn't work properly on ultrawidescreen resolutions #278

@Xerathe

Description

@Xerathe

In game, it still considers me using standard 16:9 1440p when I try to Anchor a TextBlock to the BottomCenter - which makes the text appear to the left from the actual center.

I am using a 21:9 1440p monitor - 3440x1440.

Trying to tweak a mod/add-on for Real Sonar and they have a TextBlock that shows angle you aim a turret at:
local textBlock = GUI.TextBlock(GUI.RectTransform(Vector2(0.5, 0.045), frame.RectTransform, GUI.Anchor.BottomCenter), "Aiming at: 0°", Color(125, 255, 125, 255), nil, GUI.Alignment.Center)

GUI.Anchor.BottomCenter = text appears a long way to the left from the actual center
GUI.Anchor.BottomRight = text appears moderately to the right from the actual center

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug / issueSomething isn't working or needs to be addressed.upstream-issueThis issue is present on the vanilla Barotrauma game

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions