tooltipfix icon indicating copy to clipboard operation
tooltipfix copied to clipboard

Tooltips replaces colors with alternates.

Open Kichura opened this issue 4 years ago • 5 comments

Usually the mod should just make the text italic or create a new line for either bold or normal text, But for some reason it affects colors and causes them to change when the window size does not have enough room to fit.

Expected behavior: image

Actual behavior: image

Kichura avatar Dec 20 '20 22:12 Kichura

Can confirm. Italic and purple is the default style for item lores, so it looks like it resets the style when wrapping.

timby3 avatar Apr 20 '22 11:04 timby3

Fun fact: if you style the tooltip text inside of the translation using §5§o, it breaks even worse! The text loses its color when it breaks down to another line.

LemmaEOF avatar Jul 28 '22 10:07 LemmaEOF

ToolTipFix has never properly handled styles correctly. Currently it just copies the style of the previous line when making a new line. Not sure how it's ending up purple/italic though.

I do plan on fixing this eventually

kyrptonaught avatar Jul 28 '22 10:07 kyrptonaught

This is still an issue and it's quite annoying. The issue here are ChatFormatting codes. ToolTipFix prefers the Component's Style over those, but for Minecraft it's the other way around: If a String contains ChatFormatting codes, the set Style is (mostly?) ignored in favor of the custom formatting.

In the attached screenshot from a mod of mine (feel free to use it for testing a fix, the mod allows for using formatting codes directly in the anvil text field) you can see how formatting codes are properly applied in the first line, and then as mentioned in another comment, the Component's Style is used instead for the following lines.

This is not an issue in the native fix Forge has, so maybe it's worth checking that out.

2022-10-03_16 22 52

Fuzss avatar Oct 03 '22 14:10 Fuzss

Been a while, I apologize for the delay.

TooltTipFix 1.1.0 is almost a complete rewrite of the wrapping logic significantly improving it. I believe this issue is fixed.

kyrptonaught avatar Nov 06 '22 20:11 kyrptonaught