Lilyzavoqth
Member
- Gender
- Female
- Guildcard
- 42110778
I've figured out how to get the text to wrap the way I want it to but I don't use github. I also wouldn't say that its a good solution.I am not sure if ill be able to figure that out maybe @Ender has an idea I think the way my current name coloring works doesnt allow for that.
Also after enders PR ill prob add a setting so players can choose their highlight color.
The idea is to start the text portion of the message at the same place as the name starts so the line wrap starts at the far left and just add spaces to the beginning so that the messages text doesn't overlap the name.local namePadding = ""
while imgui.CalcTextSize(namePadding) < imgui.CalcTextSize(nameFormat)-imgui.CalcTextSize(" ") do
namePadding = namePadding .. " "
end
imgui.SetCursorPos(imgui.GetCursorPosX()-imgui.CalcTextSize(namePadding), imgui.GetCursorPosY())
imgui.TextWrapped(namePadding .. options.clMessageSeparator .. formattedText)
One issue is that a bunch of spaces won't always line up nicely with the end of the name to place the separator so I've dynamically moved the starting position so that the separator does line up but the wrapped text might be a tiny bit indented. I couldn't figure out a way to get both to line up every time so I had to pick one.



