Skip to content

Tooltip wrapping can leave lines wider than their configured limit #10590

Backlog

Description

@zubSero

How is Path of Building expected to behave?

When the next word doesn't fit within a tooltip's maximum width, it should go on the next line.

How does Path of Building behave?

main:WrapString first adds the word that goes over the limit and only then breaks the line, so wrapped lines end up wider than the limit. The last line is never checked at all. Tooltip:AddLine uses this for every tooltip that has a maximum width.

How to reproduce the issue

With a font where every character is one unit wide, main:WrapString("aa bb cc dd", 16, 5) returns {"aa bb cc", "dd"}. It should return {"aa bb", "cc dd"}.

Fix in #10613.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions