Bug fixes plus better layout

This commit is contained in:
AbstractConcept 2022-09-19 00:35:34 -05:00
parent b0a965e0b2
commit 18c0473f39
192 changed files with 4773 additions and 5746 deletions

View file

@ -19,21 +19,18 @@ namespace RimWorldAnimationStudio
public void AddDefName(InputField field)
{
Debug.Log("Attempting to add new def name");
if (field?.text == null || field.text == "")
{ Debug.LogWarning("Input field is null"); return; }
{ return; }
if (Workspace.defNames.Contains(field.text))
{ Debug.LogWarning("Def name is null"); field.text = ""; return; }
{ field.text = ""; return; }
Debug.Log("Added new def name: " + field.text);
Workspace.defNames.Add(field.text);
Initialize();
Initialize(null, true);
}
public void Initialize(Actor actor = null)
public void Initialize(Actor actor = null, bool addedNewTag = false)
{
if (actor != null)
{ this.actor = actor; }
@ -68,7 +65,12 @@ namespace RimWorldAnimationStudio
else if (toggleComp.isOn == false && actor.defNames.Contains(defName))
{ actor.defNames.Remove(defName); }
Workspace.Instance.MakeDirty();
});
if (addedNewTag && i == Workspace.sexTypes.Count - 1)
{ toggleComp.isOn = true; }
}
Transform _optionField = AddCloneObjectToParent(contentWindow, 1).transform;