Move fallback rendering to new class

This commit is contained in:
ExMatics HydrogenC
2023-11-30 23:22:11 +08:00
parent cdbe59a3fb
commit 623f478b44
30 changed files with 165 additions and 217 deletions

View File

@@ -256,7 +256,7 @@ namespace FlaxEngine.GUI
layout.Bounds.Size.X = Width - Margin.Width;
else if (_autoWidth && !_autoHeight)
layout.Bounds.Size.Y = Height - Margin.Height;
_textSize = Render2D.MeasureText(font, _text, ref layout);
_textSize = FallbackTextUtils.MeasureText(font, _text, ref layout);
_textSize.Y *= BaseLinesGapScale;
// Check if size is controlled via text