Remove and save custom tags

This commit is contained in:
AbstractConcept 2022-09-21 16:15:25 -05:00
parent e36ef6a368
commit 2f3f807911
264 changed files with 1118 additions and 498 deletions

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
@ -12,6 +13,11 @@ namespace RimWorldAnimationStudio
{
public List<GameObject> cloneObjects;
public void OnEnable()
{
Initialize();
}
public void Pop()
{
gameObject.SetActive(gameObject.activeSelf == false);
@ -32,5 +38,22 @@ namespace RimWorldAnimationStudio
return cloneObject;
}
public void AddCustomTag(InputField field, ref List<string> tags, ref List<string> customTags)
{
if (field?.text == null || field.text == "")
{ return; }
if (tags.Contains(field.text) || customTags.Contains(field.text))
{ field.text = ""; return; }
customTags.Add(field.text);
ApplicationManager.Instance.SaveCustomArrays();
Initialize(true);
}
public virtual void Initialize(bool addedNewTag = false) { }
}
}