new-horizons/Marshmallow/Utility/AddToUITable.cs
Mister_Nebula dc23ac2de8 Massive rewrite
- Added moon support
- Rewrote every class for readability
- Rewrote Main class to simplify code (file planets now load on scene load)
2020-06-11 19:41:39 +01:00

21 lines
615 B
C#

using OWML.ModHelper.Events;
using System.Linq;
using UnityEngine;
namespace Marshmallow.Utility
{
static class AddToUITable
{
public static int Add(string text)
{
TextTranslation.TranslationTable instance = GameObject.FindObjectOfType<TextTranslation>().GetValue<TextTranslation.TranslationTable>("m_table");
instance.Insert_UI(instance.theUITable.Keys.Max() + 1, text);
Logger.Log($"Added [{text}] to UI table with key [{instance.theUITable.Keys.Max()}]", Logger.LogType.Log);
return instance.theUITable.Keys.Max();
}
}
}