(c57beb621) Autoscale text in a bunch of places where it's likely to overflow

This commit is contained in:
Joonas Rikkonen
2019-05-06 14:13:38 +03:00
parent 3c1db2e9a7
commit 6e152c4575
5 changed files with 251 additions and 134 deletions
@@ -675,10 +675,10 @@ namespace Barotrauma
{
var inputContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.06f),(i <= (inputNames.Length / 2.2f) ? inputColumnLeft : inputColumnRight).RectTransform))
{ Stretch = true, IsHorizontal = true, RelativeSpacing = 0.05f, Color = new Color(12, 14, 15, 215) };
var inputName = new GUITextBlock(new RectTransform(new Vector2(0.5f, 1.0f), inputContainer.RectTransform, Anchor.TopLeft) { MinSize = new Point(150, 0) },
var inputName = new GUITextBlock(new RectTransform(new Vector2(0.7f, 1.0f), inputContainer.RectTransform, Anchor.TopLeft) { MinSize = new Point(150, 0) },
TextManager.Get("InputType." + ((InputType)i)) + ": ", font: GUI.SmallFont) { ForceUpperCase = true };
inputNameBlocks.Add(inputName);
var keyBox = new GUITextBox(new RectTransform(new Vector2(0.5f, 1.0f), inputContainer.RectTransform),
var keyBox = new GUITextBox(new RectTransform(new Vector2(0.3f, 1.0f), inputContainer.RectTransform),
text: keyMapping[i].ToString(), font: GUI.SmallFont)
{
UserData = i