Ejemplo n.º 1
0
        void OnGUI()
        {
            EditorGUILayout.HelpBox(m_message.message, m_message.type, true);

            GUILayout.FlexibleSpace();
            if (!string.IsNullOrEmpty(m_message.source))
            {
                EditorGUILayout.LabelField("Posted by", m_message.source);
            }
            if (string.IsNullOrEmpty(m_message.source))
            {
                using (new EditorGUILayout.HorizontalScope())
                {
                    if (GUILayout.Button("編集", "ButtonLeft"))
                    {
                        var win = AssetMessageWriter.Open(m_message);
                        var p   = win.position;
                        p.center     = position.center;
                        win.position = p;
                    }
                    if (GUILayout.Button("削除", "ButtonRight"))
                    {
                        AssetMessenger.Clear(m_message.guid);
                        Close();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        void OnGUI()
        {
            EditorGUIUtility.labelWidth = 100;
            m_message.type    = (MessageType)EditorGUILayout.EnumPopup("Type", m_message.type);
            m_message.message = EditorGUILayout.TextArea(m_message.message, GUILayout.ExpandHeight(true));

            EditorGUILayout.Space();

            GUI.enabled = !string.IsNullOrEmpty(m_message.message);
            if (GUILayout.Button("設定"))
            {
                AssetMessenger.SetMessage(m_message);
                Close();
            }
        }