using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using UnityEngine; using UnityEngine.UI; using SFB; using System.IO; namespace RimWorldAnimationStudio { public class RaceSettingsDialog : DialogBox { public Dropdown raceSelectDropdown; public Transform raceSettingsWindow; public Toggle isHumanoidToggle; public InputField scaleField; public override void Initialize(bool addedNewTag = false) { Reset(); PawnRaceDef pawnRaceDef = GetCurrentRaceDef(); if (pawnRaceDef == null) return; isHumanoidToggle.SetIsOnWithoutNotify(pawnRaceDef.isHumanoid); Text bodyGraphicsTitle = AddCloneObjectToParent(raceSettingsWindow, 2).GetComponent(); bodyGraphicsTitle.text = "Body graphic filepaths"; List allTags = pawnRaceDef.isHumanoid ? DefaultTags.bodyTypes : new List() { "None" }; foreach (string bodyType in allTags) { string _bodyType = bodyType; if (pawnRaceDef.isHumanoid) { Text bodyTypeTitle = AddCloneObjectToParent(raceSettingsWindow, 2).GetComponent(); bodyTypeTitle.text = bodyType; } for (int i = 2; i >= 0; i--) { CardinalDirection facing = (CardinalDirection)i; GameObject filepath = AddCloneObjectToParent(raceSettingsWindow, 0); filepath.GetComponent().text = facing.ToString(); filepath.transform.Find("FilepathButton").GetComponent