Norbyte / bg3se

Baldur's Gate 3 Script Extender
Other
1.14k stars 66 forks source link

TextWrapPos on ExtuiTooltip instead of ExtuiText doesn't wrap the text. #472

Open FineRedMist opened 2 weeks ago

FineRedMist commented 2 weeks ago

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 10

Platform

Steam

Description

If I do (in lua):

local tooltip = win:Tooltip() tooltip.ItemWidth = 400 tooltip.TextWrapPos = 400 text = tooltip:AddText()

The text won't wrap.

However: local tooltip = win:Tooltip() text = tooltip:AddText) text.ItemWidth =400 text.TextWrapPos = 400

The text does wrap.

Indications

This is my code trying to generate tooltips based on SE code.

Diagnostic Files

No response

Steps to Reproduce

local tooltip = win:Tooltip() tooltip.ItemWidth = 400 tooltip.TextWrapPos = 400 text = tooltip:AddText("Twas brillig and the slithy toves did gyre and gimble in the wabe. All mimsy were the borogroves, and the momeraths outgrabe. Beware the jabberwock my son, the jaws that bite, the claws that catch, beware the jub jub bird, and shun the frumious bandersnatch.")

Expected Behavior

The above code should work with the text wrapped.

Actual Behavior

The text is not wrapped in the tooltip.

FineRedMist commented 2 weeks ago

Oh my, I just realized this could be an issue with ImGui, not SE. If that is the case, I'm not sure I can achieve my objective. I may try splitting the sentence to see if that works.

FineRedMist commented 1 week ago

I was hoping to be able to highlight the different kinds of damage, similar to how the original BG3 tooltips do:

image