コード例 #1
0
ファイル: Main.cs プロジェクト: Trawis/T4A11
        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));
        }
コード例 #2
0
        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));
        }