コード例 #1
0
        private void StoryValue()
        {
            DialogObject dialog = Selection.activeObject as DialogObject;

            if (dialog == null)
            {
                EditorGUILayout.LabelField("Not select dialog!");
                return;
            }
            if (dialog.Dialog != null)
            {
                EditorGUILayout.BeginVertical();

                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.LabelField("<color=#FF00FF>" + dialog.name + "</color>", ResourcesManager.GetInstance.GetFontStyle(18));
                //GUILayout.Space(10);
                if (GUILayout.Button("<color=#00FF00>Add Value</color>", ResourcesManager.GetInstance.skin.button, GUILayout.Height(25)))
                {
                    ValueAdder.Open(dialog.Dialog);
                }
                EditorGUILayout.EndHorizontal();

                GUILayout.Space(10);

                ShowContainer(dialog.Dialog);

                EditorGUILayout.EndVertical();
            }
        }
コード例 #2
0
        public static void Open(ValueContainer container)
        {
            ValueAdder win = EditorWindow.CreateInstance <ValueAdder>();

            win.titleContent = new GUIContent("Value Adder");
            float h = Screen.height * 0.3f;
            float w = Screen.width * 0.4f;

            win.position = new Rect(Screen.width - w, Screen.height - h, w, h);

            _container = container;
            win.ShowAuxWindow();
        }