2021-11-17 23:39:18 +00:00
|
|
|
|
using System.Linq;
|
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
namespace QSB.Utility;
|
|
|
|
|
|
|
|
|
|
internal static class UIHelper
|
2021-11-17 23:39:18 +00:00
|
|
|
|
{
|
2022-03-03 03:46:33 +00:00
|
|
|
|
public static void ReplaceUI(UITextType key, string text)
|
2021-11-17 23:39:18 +00:00
|
|
|
|
{
|
2022-03-03 03:46:33 +00:00
|
|
|
|
var table = TextTranslation.Get().m_table;
|
|
|
|
|
table.theUITable[(int)key] = text;
|
|
|
|
|
}
|
2022-01-31 20:47:00 +00:00
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
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;
|
2021-11-17 23:39:18 +00:00
|
|
|
|
}
|
2022-02-25 06:04:54 +00:00
|
|
|
|
}
|