예제 #1
0
        public static void CreateDirectories()
        {
            string customPortraitsDirectory = CompanionCustomPortraitsManager.GetPortraitsDirectory();

            foreach (string companionName in CompanionCustomPortraitsManager.CompanionGUID.Values)
            {
                Directory.CreateDirectory(Path.Combine(customPortraitsDirectory, companionName));
            }
        }
예제 #2
0
        private static void OnGUI(UnityModManager.ModEntry modEntry)
        {
            GUILayout.BeginHorizontal();

            if (GUILayout.Button("Open Portraits Directory", new GUILayoutOption[] { GUILayout.Width(170f) }))
            {
                System.Diagnostics.Process.Start(CompanionCustomPortraitsManager.GetPortraitsDirectory());
            }

            if (GUILayout.Button("Reload Portraits", new GUILayoutOption[] { GUILayout.Width(130f) }))
            {
                CompanionCustomPortraitsManager.Instance.LoadPortraits();
            }

            GUILayout.Label(string.Format("After reload, it takes effect after you enter any location or load a game."), new GUILayoutOption[] { GUILayout.ExpandWidth(false) });

            GUILayout.EndHorizontal();
        }