protected void OpenStandartBack(Color?color = null, bool includeLogo = true, bool includeScript = true, bool includeEditor = true)
 {
     EditorGUILayout.Space();
     if (color == null)
     {
         SpiralEditor.BeginPanel(GroupType.Vertical);
     }
     else
     {
         SpiralEditor.BeginPanel(GroupType.Vertical, (Color)color);
     }
     if (includeLogo)
     {
         SpiralEditor.DrawLogoLine();
     }
     if (includeScript)
     {
         SpiralEditor.DrawScriptField(serializedObject, true);
     }
     if (includeEditor)
     {
         MonoScript editorMono = GetEditorMono();
         if (editorMono != null)
         {
             SpiralEditor.DrawScriptField(editorMono, "Editor");
         }
     }
 }
        public static void DrawScriptFieldRect(Type type, Rect position)
        {
            SpiralEditor.SetGUIEnabled(false);
            MonoScript monoScript = SpiralEditorTools.GetMonoScript(type);

            EditorGUI.ObjectField(position, monoScript, typeof(MonoScript), false);
            SpiralEditor.RestoreGUIEnabled();
        }
 protected void OpenStandartBack(Color?color = null, bool includeLogo = true, bool includeScript = true)
 {
     EditorGUILayout.Space();
     if (color == null)
     {
         SpiralEditor.BeginPanel(GroupType.Vertical);
     }
     else
     {
         SpiralEditor.BeginPanel(GroupType.Vertical, (Color)color);
     }
     if (includeLogo)
     {
         SpiralEditor.DrawLogoLine();
     }
     if (includeScript)
     {
         SpiralEditor.DrawScriptField(monoScript, "Editor");
     }
 }
 protected void CloseStandartBack()
 {
     SpiralEditor.EndPanel();
 }
 public static void DrawLanguageSelect()
 {
     SpiralEditor.BeginPanel(GroupType.Vertical);
     language = (Language)EditorGUILayout.EnumPopup(strLocal, language);
     SpiralEditor.EndPanel();
 }
        // INITIALIZE STYLES ======================================================================
        // Инициализирует все шорткаты, используемые выше
        //=========================================================================================
        static SpiralStyles()
        {
            // panels -----------------------------------------------------------------------------
            panel = new GUIStyle(EditorStyles.helpBox);

            panelIndented              = new GUIStyle(panel);
            panelIndented.margin.left += indentPanelLeft;

            // labels -----------------------------------------------------------------------------
            labelSmall = new GUIStyle(EditorStyles.label)
            {
                fontSize = fontSizeSmall,
                richText = true
            };

            labelNormal = new GUIStyle(EditorStyles.label)
            {
                fontSize = fontSizeNormal,
                richText = true
            };

            labelBold = new GUIStyle(EditorStyles.boldLabel)
            {
                fontSize = fontSizeNormal,
                richText = true
            };

            labelSmallBold = new GUIStyle(EditorStyles.boldLabel)
            {
                fontSize = fontSizeSmall,
                richText = true
            };

            labelSmallBoxedBold = new GUIStyle(panel)
            {
                fontStyle = FontStyle.Bold,
                fontSize  = fontSizeSmall,
                richText  = true
            };

            labelBoxedBoldCaption = new GUIStyle(panel)
            {
                fontStyle = FontStyle.Bold,
                fontSize  = fontSizeNormal,
                richText  = true
            };

            labelSmallBoxed = new GUIStyle(panel)
            {
                fontSize = fontSizeSmall,
                richText = true
            };

            labelLogo = new GUIStyle(labelSmallBoxedBold);
            labelLogo.normal.textColor = new Color(0.2f, 0.4f, 0.2f);
            labelLogo.alignment        = TextAnchor.MiddleRight;

            // buttons ----------------------------------------------------------------------------
            buttonNormal = new GUIStyle(GUI.skin.button)
            {
                fontSize = fontSizeNormal,
                richText = true
            };

            // foldouts ---------------------------------------------------------------------------
            foldoutNormal = new GUIStyle(EditorStyles.foldout)
            {
                fontSize = fontSizeNormal,
                richText = true
            };

            foldoutIndentedNormal              = new GUIStyle(foldoutNormal);
            foldoutIndentedNormal.margin.left += indentFoldoutLeft;

            foldoutIndentedBold = new GUIStyle(foldoutNormal)
            {
                fontStyle = FontStyle.Bold,
            };
            foldoutIndentedBold.margin.left += indentFoldoutLeft;

            // foldout property -------------------------------------------------------------------
            foldoutPropertyNormal = new GUIStyle(EditorStyles.foldout)
            {
                fontSize = fontSizeNormal,
                richText = true
            };
            foldoutPropertyNormal.margin.left += indentPropertyFoldoutLeft;

            foldoutPropertySmall = new GUIStyle(EditorStyles.foldout)
            {
                fontSize = fontSizeSmall,
                richText = true
            };
            foldoutPropertySmall.margin.left += indentPropertyFoldoutLeft;

            foldoutPropertyBold = new GUIStyle(foldoutPropertyNormal)
            {
                fontStyle = FontStyle.Bold
            };

            foldoutPropertySmallBold = new GUIStyle(foldoutPropertySmall)
            {
                fontStyle = FontStyle.Bold
            };

            // popups -----------------------------------------------------------------------------
            popupSmall = new GUIStyle(EditorStyles.popup)
            {
                fontSize = fontSizePopupNormal,
                richText = false // lol, we have troubles here
            };

            // hex colors -------------------------------------------------------------------------
            hexDarkRed = SpiralEditor.GetColorHex(0.7f, 0.0f, 0.0f, 1.0f);
        }