-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextWrapPos on ExtuiTooltip instead of ExtuiText doesn't wrap the text. #472
Comments
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. |
Thinking on it, this is probably an order of operations issue. TextWrapPos does this in the pre-render phase:
However, tooltips are considered to be a separate window with their own DC, so the TextWrapPos call is made before we start rendering the tooltip window and the value is essentially ignored. |
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.
The text was updated successfully, but these errors were encountered: