Exemplo n.º 1
0
        protected void DrawToolsInfo(string aText, bool aBold, bool aItalic)
        {
            GUI.color = ColorManager.GetCompagnieBackColor();
            EditorGUILayout.BeginVertical(GUI.skin.button);
            GUI.color = Color.white;

            if (aBold && !aItalic)
            {
                EditorGUILayout.HelpBox("<b>" + aText + "</b>", MessageType.Info);
            }
            else if (aItalic && !aBold)
            {
                EditorGUILayout.HelpBox("<i>" + aText + "</i>", MessageType.Info);
            }
            else if (aItalic && aBold)
            {
                EditorGUILayout.HelpBox("<b><i>" + aText + "</i></b>", MessageType.Info);
            }
            else
            {
                EditorGUILayout.HelpBox(aText, MessageType.Info);
            }

            EditorGUILayout.EndVertical();
        }
Exemplo n.º 2
0
 private void DrawBanner()
 {
     GUI.color = ColorManager.GetCompagnieBackColor();
     EditorGUILayout.BeginVertical(GUI.skin.button);
     GUI.color = ColorManager.GetCompagnieColor();
     EditorGUILayout.LabelField(CompanyName, m_TitleCenterStyle);
     GUI.color = Color.white;
     EditorGUILayout.EndVertical();
 }
Exemplo n.º 3
0
 ///<summary> Write a title </summary>
 protected void DrawTitle(string aTitle, Color32 aColor)
 {
     GUI.color = ColorManager.GetCompagnieBackColor();
     EditorGUILayout.BeginVertical(GUI.skin.button);
     GUI.color = aColor;
     ShowAdvancedLabelCenter(aTitle, m_TitleCenterStyle);
     GUI.color = Color.white;
     EditorGUILayout.EndVertical();
     m_TitleCenterStyle.normal.textColor = Color.white;
 }
Exemplo n.º 4
0
        private void CreateStyle()
        {
            m_CustomFont                  = Resources.Load("editorFont") as Font;
            m_CustomFont2                 = Resources.Load("editorFont5") as Font;
            m_TitleStyle                  = new GUIStyle(GUI.skin.label);
            m_TitleStyle.font             = m_CustomFont;
            m_TitleStyle.fontSize         = 14;
            m_TitleStyle.normal.textColor = Color.white;
            m_TitleStyle.alignment        = TextAnchor.MiddleLeft;

            m_TitleCenterStyle                  = new GUIStyle(GUI.skin.label);
            m_TitleCenterStyle.font             = m_CustomFont;
            m_TitleCenterStyle.fontSize         = 14;
            m_TitleCenterStyle.normal.textColor = Color.white;
            m_TitleCenterStyle.alignment        = TextAnchor.MiddleCenter;

            m_SubtitleStyle                  = new GUIStyle(GUI.skin.label);
            m_SubtitleStyle.font             = m_CustomFont2;
            m_SubtitleStyle.fontSize         = 12;
            m_SubtitleStyle.normal.textColor = ColorManager.GetCompagnieBackColor();
            m_SubtitleStyle.alignment        = TextAnchor.MiddleLeft;
            m_SubtitleStyle.richText         = true;

            m_LabelTxtStyleLeft                  = new GUIStyle(GUI.skin.label);
            m_LabelTxtStyleLeft.font             = m_CustomFont2;
            m_LabelTxtStyleLeft.fontSize         = 12;
            m_LabelTxtStyleLeft.normal.textColor = ColorManager.GetCompagnieBackColor();
            m_LabelTxtStyleLeft.richText         = true;
            m_LabelTxtStyleLeft.alignment        = TextAnchor.MiddleLeft;

            m_LabelTxtStyleCenter           = new GUIStyle(m_LabelTxtStyleLeft);
            m_LabelTxtStyleCenter.alignment = TextAnchor.MiddleCenter;

            m_LabelTxtStyleRight           = new GUIStyle(m_LabelTxtStyleLeft);
            m_LabelTxtStyleRight.alignment = TextAnchor.MiddleRight;

            m_LabelTxtStyleCenterSmall          = new GUIStyle(m_LabelTxtStyleCenter);
            m_LabelTxtStyleCenterSmall.fontSize = 8;

            m_RichTxtStyle          = new GUIStyle(GUI.skin.label);
            m_RichTxtStyle.richText = true;

            m_WarningStyle           = new GUIStyle();
            m_WarningStyle           = GUI.skin.label;
            m_WarningStyle.richText  = true;
            m_WarningStyle.fontSize  = 12;
            m_WarningStyle.alignment = TextAnchor.MiddleCenter;

            m_ButtonStyle                   = new GUIStyle(GUI.skin.button);
            m_ButtonStyle.font              = m_CustomFont2;
            m_ButtonStyle.fontSize          = 12;
            m_ButtonStyle.alignment         = TextAnchor.MiddleCenter;
            m_ButtonStyle.richText          = true;
            m_ButtonStyle.normal.textColor  = ColorManager.GetCompagnieBackColor();
            m_ButtonStyle.focused.textColor = CurrentColorDark;
            m_ButtonStyle.active.textColor  = CurrentColor;

            m_ListBtnSelect               = new GUIStyle(GUI.skin.textField);
            m_ListBtnSelect.font          = m_CustomFont2;
            m_ListBtnSelect.fontSize      = 12;
            m_ListBtnSelect.alignment     = TextAnchor.MiddleLeft;
            m_ListBtnSelect.imagePosition = ImagePosition.ImageLeft;
            m_ListBtnSelect.richText      = true;

            m_ListBtnUnselect               = new GUIStyle(GUI.skin.label);
            m_ListBtnUnselect.font          = m_CustomFont2;
            m_ListBtnUnselect.fontSize      = 12;
            m_ListBtnUnselect.alignment     = TextAnchor.MiddleLeft;
            m_ListBtnUnselect.imagePosition = ImagePosition.ImageLeft;
            m_ListBtnUnselect.richText      = true;

            m_TextAreaStyle           = new GUIStyle(GUI.skin.textArea);
            m_TextAreaStyle.font      = m_CustomFont2;
            m_TextAreaStyle.fontSize  = 12;
            m_TextAreaStyle.alignment = TextAnchor.UpperLeft;

            m_ToolTipStyle           = new GUIStyle(GUI.skin.textArea);
            m_ToolTipStyle.font      = m_CustomFont2;
            m_ToolTipStyle.fontSize  = 10;
            m_ToolTipStyle.alignment = TextAnchor.UpperLeft;
            m_ToolTipStyle.richText  = true;


            m_ObjFieldStyle          = new GUIStyle(GUI.skin.label);
            m_ObjFieldStyle.font     = m_CustomFont2;
            m_ObjFieldStyle.fontSize = 12;

            m_FloatFieldStyle           = new GUIStyle(GUI.skin.textField);
            m_FloatFieldStyle.font      = m_CustomFont2;
            m_FloatFieldStyle.fontSize  = 11;
            m_FloatFieldStyle.alignment = TextAnchor.MiddleCenter;

            m_ToggleStyle           = new GUIStyle(GUI.skin.label);
            m_ToggleStyle.font      = m_CustomFont2;
            m_ToggleStyle.fontSize  = 12;
            m_ToggleStyle.alignment = TextAnchor.MiddleLeft;

            m_HelpBoxStyle          = GUI.skin.GetStyle("HelpBox");
            m_HelpBoxStyle.richText = true;
        }