(eba811de) Unstable 0.9.703.0

This commit is contained in:
Juan Pablo Arce
2020-02-04 11:54:57 -03:00
parent 15499cb704
commit 08ab6185c4
100 changed files with 2162 additions and 1520 deletions
@@ -868,7 +868,7 @@ namespace Barotrauma
t.RectTransform.SizeChanged += () =>
{
t.TextScale = 1.0f;
t.AutoScale = true;
t.AutoScaleHorizontal = true;
};
}
@@ -1096,25 +1096,20 @@ namespace Barotrauma
{
var tagBtn = new GUIButton(new RectTransform(new Vector2(0.25f, 1.0f), tagHolder.Content.RectTransform, anchor: Anchor.CenterLeft),
tag.CapitaliseFirstInvariant(), style: "GUIButtonRound");
tagBtn.TextBlock.AutoScale = true;
tagBtn.TextBlock.AutoScaleHorizontal = true;
tagBtn.Selected = itemEditor?.Tags?.Any(t => t.ToLowerInvariant() == tag) ?? false;
Color defaultTextColor = tagBtn.TextColor;
tagBtn.TextColor = tagBtn.Selected ? GUI.Style.Green : defaultTextColor;
tagBtn.OnClicked = (btn, userdata) =>
{
if (!tagBtn.Selected)
{
if (!(itemEditor?.Tags?.Any(t => t.ToLowerInvariant() == tag) ?? false)) { itemEditor = itemEditor?.WithTag(tagBtn.Text); }
tagBtn.Selected = true;
tagBtn.TextColor = GUI.Style.Green;
}
else
{
itemEditor?.Tags?.RemoveAll(t => t.ToLowerInvariant() == tagBtn.Text.ToLowerInvariant());
tagBtn.Selected = false;
tagBtn.TextColor = defaultTextColor;
}
return true;
};
@@ -1387,7 +1382,7 @@ namespace Barotrauma
return true;
}
};
publishBtn.TextBlock.AutoScale = true;
publishBtn.TextBlock.AutoScaleHorizontal = true;
}
private void OnPreviewImageSelected(GUIImage previewImageElement, string filePath)