Example #1
0
        //private void ShowSeperator()
        //{
        //    GUILayout.BeginVertical();
        //    int count = (int)(position.height / 20);
        //    //Debug.Log(count);
        //    for (int i = 0; i < count; i++)
        //    {
        //        //GUILayout.Label("★");
        //        EditorGUILayout.LabelField("★");
        //    }
        //    GUILayout.EndVertical();
        //}

        private void StoryValue()
        {
            StoryObject story = Selection.activeObject as StoryObject;

            if (story == null)
            {
                EditorGUILayout.LabelField("Not select story!", GUILayout.Width(300));
                return;
            }
            if (story._Story != null)
            {
                EditorGUILayout.BeginVertical(GUI.skin.box, GUILayout.Width(300));

                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.LabelField("<color=#FF00FF>" + story.name + "</color>", ResourcesManager.GetInstance.GetFontStyle(18));

                if (GUILayout.Button("<color=#00FF00>Add Value</color>", ResourcesManager.GetInstance.skin.button, GUILayout.Height(25)))
                {
                    ValueAdder.Open(story._Story);
                }
                EditorGUILayout.EndHorizontal();

                GUILayout.Space(10);

                ShowContainer(story._Story);

                EditorGUILayout.EndVertical();
            }
        }
Example #2
0
        private void MissionValue()
        {
            MissionObject  missionObj = Selection.activeObject as MissionObject;
            ValueContainer container;

            if (missionObj != null)
            {
                if (missionObj._mission == null)
                {
                    missionObj.Load();
                }
                container = missionObj._mission;
            }
            else
            {
                container = StoryEditor.GetInstance.CurrentValueContainer;
            }

            if (container == null)
            {
                container = missionContainer;
            }

            if (container == null)
            {
                EditorGUILayout.LabelField("Not select Mission!", GUILayout.Width(300));
                return;
            }

            EditorGUILayout.BeginVertical(GUI.skin.box, GUILayout.Width(300));

            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField("<color=#FF00FF>" + container._name + "</color>", ResourcesManager.GetInstance.GetFontStyle(18));

            if (GUILayout.Button("<color=#00FF00>Add Value</color>", ResourcesManager.GetInstance.skin.button, GUILayout.Height(25)))
            {
                ValueAdder.Open(container);
            }
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(10);

            ShowContainer(container);

            EditorGUILayout.EndVertical();
        }