public static void CreateUIButtons() { TrainerButton = Utilities.CreateUIButton(() => SettingsWindow.Toggle(), Helpers.TrainerVersion, "TrainerButton"); SkillChangeButton = Utilities.CreateUIButton(() => EmployeeSkillChangeWindow.Show(), "Skill Change", "EmployeeSkillButton"); Utilities.AddElementToElement(TrainerButton.gameObject, "MainPanel/Holder/FanPanel", new Rect(164, 0, 100, 32)); Utilities.AddElementToElement(SkillChangeButton.gameObject, "ActorWindow/ContentPanel/Panel", new Rect(0, 0, 100, 32)); }
public static void AttachSkillChangeButtonToEmployeeWindow() { SkillChangeButton = WindowManager.SpawnButton(); SkillChangeButton.GetComponentInChildren <Text>().text = "Skill Change"; SkillChangeButton.onClick.AddListener(() => EmployeeSkillChangeWindow.Show()); SkillChangeButton.name = "EmployeeSkillButton"; WindowManager.AddElementToElement(SkillChangeButton.gameObject, WindowManager.FindElementPath("ActorWindow/ContentPanel/Panel").gameObject, new Rect(0, 0, 100, 32), new Rect(0, 0, 0, 0)); }