Ejemplo n.º 1
0
        public void OnEnable()
        {
            titleContent = new GUIContent("TheBlackArmsSDX Import panel");

            TheBlackArmsSDX_ImportManager.checkForConfigUpdate();
            LoadJson();

            maxSize = new Vector2(_sizeX, _sizeY);
            minSize = maxSize;

            _nanoHeader = new GUIStyle
            {
                normal =
                {
                    background = Resources.Load("TheBlackArmsSDXHeader") as Texture2D,
                    textColor  = Color.white
                },
                fixedHeight = 200
            };
        }
Ejemplo n.º 2
0
 public static void ForceUpdateConfigs()
 {
     TheBlackArmsSDX_ImportManager.updateConfig();
 }
Ejemplo n.º 3
0
        public void OnGUI()
        {
            GUILayout.Box("", _nanoHeader);
            GUILayout.Space(4);
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("SDK made by PhoenixAceVFX/zombie2312"))
            {
                Application.OpenURL("https://github.com/TheBlackArms/TheBlackArmsSDX");
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("TheBlackArmsSDX Discord"))
            {
                Application.OpenURL("https://discord.gg/wngbcHS7NC");
            }
            if (GUILayout.Button("TheBlackArmsSDX Website"))
            {
                Application.OpenURL("https://trigon.systems/");
            }
            GUILayout.EndHorizontal();
            GUILayout.Space(4);
            //Update assets
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Update assets (config)"))
            {
                TheBlackArmsSDX_ImportManager.updateConfig();
            }
            GUILayout.EndHorizontal();
            GUILayout.Space(4);



            //Imports V!V
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            _changeLogScroll    = GUILayout.BeginScrollView(_changeLogScroll, GUILayout.Width(_sizeX));
            GUI.backgroundColor = new Color(
                UnityEditor.EditorPrefs.GetFloat("SDKColor_R"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_G"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_B"),
                UnityEditor.EditorPrefs.GetFloat("SDKColor_A")
                );
            foreach (var asset in assets)
            {
                GUILayout.BeginHorizontal();
                if (asset.Value == "")
                {
                    GUILayout.FlexibleSpace();
                    GUILayout.Label(asset.Key);
                    GUILayout.FlexibleSpace();
                }
                else
                {
                    if (GUILayout.Button(
                            (File.Exists(TheBlackArmsSDX_Settings.getAssetPath() + asset.Value) ? "Import" : "Download") +
                            " " + asset.Key))
                    {
                        TheBlackArmsSDX_ImportManager.downloadAndImportAssetFromServer(asset.Value.Split('\\')[0], asset.Value.Split('\\')[1]);
                    }

                    if (GUILayout.Button("Del", GUILayout.Width(40)))
                    {
                        TheBlackArmsSDX_ImportManager.deleteAsset(asset.Value);
                    }
                }
                GUILayout.EndHorizontal();
            }

            GUILayout.EndScrollView();
        }