(e858408c2) Use localizable "signal_out_x" text in CustomInterface elements with an empty label (TODO: disable empty elements)

This commit is contained in:
Joonas Rikkonen
2019-05-16 06:59:56 +03:00
parent 8619135761
commit 9ba7dee1d7
10 changed files with 177 additions and 631 deletions
@@ -119,11 +119,15 @@ namespace Barotrauma.Items.Components
{
if (uiElements[i] is GUIButton button)
{
button.Text = customInterfaceElementList[i].Label;
button.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
TextManager.Get("connection.signaloutx").Replace("[num]", (i + 1).ToString()) :
customInterfaceElementList[i].Label;
}
else if (uiElements[i] is GUITickBox tickBox)
{
tickBox.Text = customInterfaceElementList[i].Label;
tickBox.Text = string.IsNullOrWhiteSpace(customInterfaceElementList[i].Label) ?
TextManager.Get("connection.signaloutx").Replace("[num]", (i + 1).ToString()) :
customInterfaceElementList[i].Label;
}
}
}