mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Remove and save custom tags
This commit is contained in:
parent
e36ef6a368
commit
2f3f807911
264 changed files with 1118 additions and 498 deletions
|
@ -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) { }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue