(26639256a) - Added a method that automatically sets the text scale of a set of GUITextBlocks so that they all use the same scale and the text fits in all of the blocks. - Fixed TextBlock padding not being taken into account if the text is centered. - AutoScale and change the layout in a bunch of places where translated texts are likely to not fit.

This commit is contained in:
Joonas Rikkonen
2019-04-29 21:12:47 +03:00
parent e21b4e5efc
commit 8737a0e0dd
7 changed files with 147 additions and 56 deletions
@@ -504,6 +504,8 @@ namespace Barotrauma.Networking
return true;
};
GUITextBlock.AutoScaleAndNormalize(buttonHolder.Children.Select(c => ((GUIButton)c).TextBlock));
foreach (ItemPrefab ip in MapEntityPrefab.List.Where(p => p is ItemPrefab).Select(p => p as ItemPrefab))
{
if (!ip.CanBeBought && !ip.Tags.Contains("smallitem")) continue;