Galactic Civilizations IV: Supernova Galactic Civilizations IV: Supernova Galactic Civilizations IV

Excessively Slow Tooltip rendering when using the [BR] XML tags

Published on Sunday, June 2, 2024 By Dorian Gray II In GalCiv IV Support

The [BR] XML tag is used in your XML files to denote a carriage-return when formatting text strings for display within a tooltip.

When using the [BR] XML tags in the LeaderTraitText.XML file, as in the following -

"Is known to have escaped a high-security prison colony; why they were there is unknown.[BR][BR]+20% [HS=HS_Crime]Crime[/HS] when assigned as Governor."

causes a noticable rendering performance hit where the tooltip is draw with an extended rectangle and then resized and redrawn, all using the onscreen canvas.

Additionally, this causes a flood of error msgs in the debug.err file:


Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription
Debug Message:  Could not snap child to grid because it doesn't fit in parent rect: UnitTraitToolTipDescription