Exemple #1
0
        public static void OnGUI(UnityModManager.ModEntry modEntry)
        {
            GUILayout.BeginVertical("Box");
            // GUILayoutHelper.Title("練功 <color=#A0A0A0>(修習、突破、研讀)</color>");
            GUILayoutHelper.GongFaSelection("<color=#80FF80>練功</color>時使用功法", ref settings.HomeSystemGongFaIndex);
            settings.HomeSystemAutoAccessories = GUILayout.Toggle(settings.HomeSystemAutoAccessories, "<color=#80FF80>練功</color>時自動裝備適合的飾品 (資質優先,悟性其次)");
            settings.AdvancedReadBookMode      = GUILayout.Toggle(settings.AdvancedReadBookMode, "進階研讀模式:難度超過 50% 則資質優先、悟性其次;否則悟性優先");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            // GUILayoutHelper.Title("製造 <color=#A0A0A0>(锻造、制木、炼药、炼毒、织锦、制石、烹飪)</color>");
            settings.MakeSystemAutoAccessories = GUILayout.Toggle(settings.MakeSystemAutoAccessories, "<color=#80FF80>製造</color>時自動裝備適合的飾品");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            settings.HealingAutoAccessories = GUILayout.Toggle(settings.HealingAutoAccessories, "<color=#80FF80>療傷</color>與<color=#80FF80>驅毒</color>自動裝備適合的飾品 <color=#FF8080>※如果不在城鎮/門派格,將不會使用倉庫裡的裝備※</color>");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            GUILayoutHelper.GongFaSelection("跨月恢復<color=#80FF80>內息</color>時使用功法", ref settings.RestGongFaIndex);
            settings.RestAutoEquip = GUILayout.Toggle(settings.RestAutoEquip, "跨月恢復<color=#80FF80>內息</color>時自動裝備適合的武器 (內息優先) <color=#FF8080>※如果不在城鎮/門派格,將不會使用倉庫裡的裝備※</color>");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            GUILayoutHelper.GongFaSelection("進入<color=#80FF80>戰鬥</color>準備畫面時,使用指定功法", ref settings.StartBattleGongFaIndex);
            GUILayoutHelper.EquipGroupSelection("進入<color=#80FF80>戰鬥</color>準備畫面時,使用指定裝備", ref settings.StartBattleEquipGroupIndex);
            GUILayout.Label("<color=#FF8080>※戰鬥後不會換回※</color>");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            GUILayoutHelper.EquipGroupSelection("進入<color=#80FF80>較藝</color>準備畫面時,使用指定裝備", ref settings.StartSkillBattleEquipGroupIndex);
            GUILayout.Label("<color=#FF8080>※較藝後不會換回※</color>");
            GUILayout.EndVertical();

            GUILayout.BeginVertical("Box");
            GUILayout.BeginHorizontal();
            settings.EnabledLog = GUILayout.Toggle(settings.EnabledLog, "輸出偵錯資訊,可於log內檢視切換歷程");
            if (GUILayout.Button("開啟UnityModManager.log"))
            {
                string logFilePath = System.IO.Path.GetFullPath(System.IO.Path.Combine(modEntry.Path, @"../UnityModManager.log"));
                if (logFilePath != null && System.IO.File.Exists(logFilePath))
                {
                    var p = new System.Diagnostics.Process();
                    p.StartInfo.FileName  = "explorer.exe";
                    p.StartInfo.Arguments = $"\"{logFilePath}\"";
                    p.Start();
                }
            }
            GUILayout.EndHorizontal();
            GUILayout.EndVertical();
        }