예제 #1
0
        /***********************************************
        *  GUI METHODS
        ***********************************************/

        void OnGUI()
        {
            if (reflection == null)
            {
                reflection = PSReflectionFactory.GetReflection();
            }

            if (target == null)
            {
                EditorGUILayout.HelpBox("No humanoid target found, please select humanoid gameobject in the hierarchy.", MessageType.None);
                if (GUILayout.Button("Refresh", EditorStyles.miniButton, GUILayout.Width(100)))
                {
                    reflection.Init();
                }
                return;
            }

            this.InfoGUI();

            EditorGUILayout.Space();
            EditorGUILayout.BeginHorizontal();
            if (GUILayout.Toggle(curTab == tabMuscle, "MUSCLE", EditorStyles.toolbarButton))
            {
                curTab = tabMuscle;
            }

            if (GUILayout.Toggle(curTab == tabOption, "OPTIONS", EditorStyles.toolbarButton))
            {
                curTab = tabOption;
            }
            EditorGUILayout.EndHorizontal();

            this.TabGUI();

            EditorGUILayout.BeginHorizontal(EditorStyles.helpBox);
            EditorGUILayout.LabelField(Version);
            EditorGUILayout.LabelField("Email: [email protected]", GUILayout.Width(190));
            EditorGUILayout.EndHorizontal();
        }
예제 #2
0
        public void Initialize()
        {
            if (tabMuscle == null)
            {
                tabMuscle = new PSTabMuscle();
                tabMuscle.Init();
            }

            if (tabOption == null)
            {
                tabOption = new PSTabOption();
            }
            if (muscleHandle == null)
            {
                muscleHandle = new PSMuscleHandle();
            }

            muscleHandle.setTabs(tabMuscle, tabOption);
            if (curTab == null)
            {
                curTab = tabMuscle;
            }
        }