예제 #1
0
        static void OnToolbarGUI()
        {
            GUILayout.Space(50);

            if (GUILayout.Button(new GUIContent("Play From Main Menu", "Play From Main Menu"), ToolbarStyles.commandButtonStyle))
            {
                SceneHelper.StartScene("Assets/Scenes/MainMenu.unity");
            }
        }
예제 #2
0
        static void OnToolbarGUI()
        {
            GUILayout.FlexibleSpace();

            if (GUILayout.Button(new GUIContent(">", "Play from Boot"), ToolbarStyles.commandButtonStyle))
            {
                SceneHelper.StartScene("Assets/Scenes/S_Boot.unity");
            }
        }
예제 #3
0
        static void OnToolbarGUI()
        {
            var running       = EditorApplication.isPlaying;
            var buttonContent = running ? contentInactive : contentActive;

            if (GUILayout.Toggle(running, buttonContent, ToolbarStyles.commandButtonStyle))
            {
                if (!running)
                {
                    SceneHelper.StartScene("Assets/_app/Scenes/loadscenes.unity");
                }
            }
        }
예제 #4
0
        static void OnToolbarGUI()
        {
            GUILayout.FlexibleSpace();

            if (GUILayout.Button(new GUIContent("1", "Start Scene 1"), ToolbarStyles.commandButtonStyle))
            {
                SceneHelper.StartScene("Assets/ToolbarExtender/Example/Scenes/Scene1.unity");
            }

            if (GUILayout.Button(new GUIContent("2", "Start Scene 2"), ToolbarStyles.commandButtonStyle))
            {
                SceneHelper.StartScene("Assets/ToolbarExtender/Example/Scenes/Scene2.unity");
            }
        }
예제 #5
0
        static void OnToolbarGUI()
        {
            GUILayout.FlexibleSpace();

            // S tímhle sc opatrně, nezkoušet přidat do classy!!! otrocky vypsat

            if (EditorSceneManager.GetActiveScene().name != Settings.SCREEN_UI_SCENE_NAME && EditorSceneManager.GetActiveScene().name == Settings.MAIN_SCENE_NAME)
            {
                if (GUILayout.Button(new GUIContent("SC-UI", "Hlavní UI hráče."), ToolbarStyles.commandButtonStyle))
                {
                    SceneHelper.StartScene(Settings.SCENES_PATH + (Settings.SCREEN_UI_SCENE_NAME + ".unity"));
                }
            }
            else if (EditorSceneManager.GetActiveScene().name == Settings.SCREEN_UI_SCENE_NAME)
            {
                EditorGUI.BeginDisabledGroup(true);
                GUI.backgroundColor = Color.blue;
                if (GUILayout.Button(new GUIContent("SC-UI", "Hlavní UI hráče.(current)"), ToolbarStyles.pressedButtonStyle))
                {
                    Debug.Log("CurrentScene!");
                }
                EditorGUI.EndDisabledGroup();
            }

            GUI.backgroundColor = Color.white;



            if (EditorSceneManager.GetActiveScene().name != Settings.MAIN_SCENE_NAME)
            {
                if (GUILayout.Button(new GUIContent("MAIN", "Hlavní scéna hry."), ToolbarStyles.commandButtonStyle))
                {
                    SceneHelper.StartScene(Settings.SCENES_PATH + (Settings.MAIN_SCENE_NAME + ".unity"));
                }
            }
            else
            {
                EditorGUI.BeginDisabledGroup(true);
                GUI.backgroundColor = Color.blue;
                if (GUILayout.Button(new GUIContent("MAIN", "Hlavní scéna hry.(current)"), ToolbarStyles.pressedButtonStyle))
                {
                    Debug.Log("CurrentScene!");
                }
                EditorGUI.EndDisabledGroup();
            }

            GUI.backgroundColor = Color.white;

            //   AddButtonToLayoutClass addBtn = new AddButtonToLayoutClass();

            // INICIALIZAČNÍ SCÉNA --
            // AddButtonToLayout(Settings.INI_SCENE_NAME, new GUIContent("INI", "Inicializační scéna."));

            /*if (EditorSceneManager.GetActiveScene().name != Settings.INI_SCENE_NAME)
             * {
             *  GUI.backgroundColor = Color.white;
             *  if (GUILayout.Button(new GUIContent("INI", "Inicializační scéna."), ToolbarStyles.commandButtonStyle))
             *  {
             *      SceneHelper.StartScene(Settings.SCENES_PATH + (Settings.INI_SCENE_NAME + ".unity"));
             *  }
             * }
             * else
             * {
             *  EditorGUI.BeginDisabledGroup(true);
             *  GUI.backgroundColor = Color.blue;
             *  if (GUILayout.Button(new GUIContent("INI", "Inicializační scéna."), ToolbarStyles.commandButtonStyle))
             *      Debug.Log("Current Layer");
             *  EditorGUI.EndDisabledGroup();
             * }
             *
             * // MAINMENUBTN --
             * /* AddButtonToLayout(Settings.MAIN_MENU_SCENE_NAME, new GUIContent("MENU", "Main Menu scéna.."));
             *
             * // MAINMENUBTN --
             * AddButtonToLayout(Settings.MAIN_SCENE_NAME, new GUIContent("MAIN", "Hlavní scéna hry."));
             *
             *
             * // SCREEN UI --
             * if (EditorSceneManager.GetActiveScene().name == Settings.MAIN_SCENE_NAME){
             *   AddButtonToLayout(Settings.SCREEN_UI_SCENE_NAME, new GUIContent("SC-UI", "Hlavní UI hráče."));
             * }*/


            GUI.backgroundColor = Color.white;
        }