quantum-space-buddies/QSB/Utility/UIHelper.cs
2022-03-02 19:46:33 -08:00

20 lines
435 B
C#

using System.Linq;
namespace QSB.Utility;
internal static class UIHelper
{
public static void ReplaceUI(UITextType key, string text)
{
var table = TextTranslation.Get().m_table;
table.theUITable[(int)key] = text;
}
public static UITextType AddToUITable(string text)
{
var table = TextTranslation.Get().m_table;
var key = table.theUITable.Keys.Max() + 1;
table.theUITable[key] = text;
return (UITextType)key;
}
}