///////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// DrawModeButtons
        /// # Draw editor mode buttons
        /// </summary>
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        void DrawModeButtons()
        {
            // create mode buttons
            EditorGUILayout.Separator();

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            float buttonsScale = position.width / 6;

            // separator
            EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(0.1f * buttonsScale, buttonsScale), false, true, true, true);

            if (EditorBasicFunctions.GetEditorButton("EditionModeButton", "Select 'Edit Mode'", new Vector2(buttonsScale, buttonsScale), (systemMode == cSystemMode.edition), true, false, false))
            {
                systemMode = cSystemMode.edition;
            }

            // separator
            EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(0.1f * buttonsScale, buttonsScale), false, true, true, true);

            if (EditorBasicFunctions.GetEditorButton("PutMeshDecalsButton", "Select 'Mesh Decals Mode'", new Vector2(buttonsScale, buttonsScale), (systemMode == cSystemMode.meshDecals), true, false, false))
            {
                systemMode = cSystemMode.meshDecals;
            }

            // separator
            EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(0.1f * buttonsScale, buttonsScale), false, true, true, true);

            if (EditorBasicFunctions.GetEditorButton("PutObjectsButton", "Select 'Insert Objects Mode'", new Vector2(buttonsScale, buttonsScale), (systemMode == cSystemMode.objects), true, false, false))
            {
                systemMode = cSystemMode.objects;
            }

            // separator
            EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(0.1f * buttonsScale, buttonsScale), false, true, true, true);

            if (EditorBasicFunctions.GetEditorButton("PutProjectedDecalsButton", "Select 'Insert Projected Decals Mode'", new Vector2(buttonsScale, buttonsScale), (systemMode == cSystemMode.projectedDecals), true, false, false))
            {
                systemMode = cSystemMode.projectedDecals;
            }

            GUILayout.FlexibleSpace();
            EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(0.1f * buttonsScale, buttonsScale), false, true, true, true);


            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            EditorGUILayout.Separator();
            EditorGUILayout.Separator();
        }
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// DrawAdvancedButtons
        /// # Draw all advanced buttons
        /// </summary>
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        void DrawAdvancedButtons()
        {
            bool drawThis = true;

            if (!configSaver.parameters.showAdvancedActionsAlways && (systemMode != cSystemMode.edition))
            {
                drawThis = false;
            }

            if (drawThis)
            {
                configSaver.parameters.showAdvancedActions = EditorGUILayout.Foldout(configSaver.parameters.showAdvancedActions, new GUIContent("Advanced actions", "Show advanced actions"));

                if (configSaver.parameters.showAdvancedActions)
                {
                    EditorBasicFunctions.DrawEditorBox("Advanced actions", Color.yellow, position);

                    EditorGUILayout.Separator();
                    EditorGUILayout.Separator();

                    float buttonsScale = position.width / 6;

                    if (cleanAlSceneScriptsConfirmationMode)
                    {
                        EditorBasicFunctions.DrawEditorBox("Do you really want to clean all the scripts?", Color.white, position);

                        // clean all scripts
                        GUILayout.BeginHorizontal();
                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorButton("NoButton", "Don't clean", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            cleanAlSceneScriptsConfirmationMode = false;
                        }

                        EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(buttonsScale, buttonsScale), false, true, true, true);
                        EditorBasicFunctions.GetEditorButton("EmptyButton", "", new Vector2(buttonsScale, buttonsScale), false, true, true, true);

                        if (EditorBasicFunctions.GetEditorButton("YesButton", "Continue cleaning", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            CleanAllSceneScriptsAction();
                            cleanAlSceneScriptsConfirmationMode = false;
                        }

                        GUILayout.FlexibleSpace();
                        GUILayout.EndHorizontal();
                    }
                    else
                    {
                        // clean all scripts
                        GUILayout.BeginHorizontal();
                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorTextButton("CLEAN SCRIPTS", "Clean all the scripts in the scene, for example to use without this editor extension in the system", position))
                        {
                            cleanAlSceneScriptsConfirmationMode = true;
                        }

                        // create new decal
                        if (EditorBasicFunctions.GetEditorTextButton("CREATE DECAL", "Create a new decal just selecting textures, type and folder", position))
                        {
                            CreateDecalWindow window = ScriptableObject.CreateInstance <CreateDecalWindow>();
                            window.name = "Create new decal";
#if UNITY_5_0
                            window.title = window.name;
#else
                            window.titleContent = new GUIContent(window.name);
#endif
                            window.Show();
                        }

                        GUILayout.FlexibleSpace();
                        GUILayout.EndHorizontal();

                        EditorGUILayout.Separator();

                        GUILayout.BeginHorizontal();
                        GUILayout.FlexibleSpace();


                        // lock all future time lockable decals
                        if (EditorBasicFunctions.GetEditorTextButton("LOCK DECALS", "Mark all 'futureTimeLockableShape' decals as locked", position))
                        {
                            foreach (GenericMeshDecal actualDecal in GameObject.FindObjectsOfType <GenericMeshDecal>())
                            {
                                if (actualDecal.futureTimeLockableShape)
                                {
                                    actualDecal.lockedShapeAlways = true;
                                }
                            }
                        }

                        // merge decals
                        if (EditorBasicFunctions.GetEditorTextButton("MERGE DECALS", "Merge all selected decals into single one mesh", position))
                        {
                            MergeDecalWindow window = ScriptableObject.CreateInstance <MergeDecalWindow>();
                            window.name = "Merge new decal";
#if UNITY_5_0
                            window.title = window.name;
#else
                            window.titleContent = new GUIContent(window.name);
#endif
                            window.Show();
                        }

                        GUILayout.FlexibleSpace();
                        GUILayout.EndHorizontal();
                    }

                    EditorGUILayout.Separator();
                    EditorGUILayout.Separator();
                    EditorBasicFunctions.DrawLineSeparator();
                }
            }
        }
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        /// <summary>
        /// DrawBasicButtons
        /// # Draw all basic buttons
        /// </summary>
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        void DrawBasicButtons()
        {
            bool drawThis = true;

            if (!configSaver.parameters.showBasicActionsAlways && (systemMode != cSystemMode.edition))
            {
                drawThis = false;
            }

            if (drawThis)
            {
                configSaver.parameters.showBasicActions = EditorGUILayout.Foldout(configSaver.parameters.showBasicActions, new GUIContent("Basic actions", "Show basic actions"));

                if (configSaver.parameters.showBasicActions)
                {
                    EditorBasicFunctions.DrawEditorBox("Basic actions", Color.yellow, position);

                    float buttonsScale = position.width / 5;

                    if (deleteAllConfirmationMode)
                    {
                        EditorBasicFunctions.DrawEditorBox("Do you really want to delete all?", Color.white, position);

                        GUILayout.BeginHorizontal();
                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorButton("NoButton", "Don't delete", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            deleteAllConfirmationMode = false;
                        }

                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorButton("YesButton", "Continue deleting", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            DeleteAllAction();
                            deleteAllConfirmationMode = false;
                        }

                        GUILayout.FlexibleSpace();
                        GUILayout.EndHorizontal();
                    }
                    else
                    {
                        EditorGUILayout.Separator();
                        EditorGUILayout.Separator();

                        GUILayout.BeginHorizontal();
                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorButton("DeleteAllButton", "Delete all created objects of every mode, in edit mode delete all created objects of all modes", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            deleteAllConfirmationMode = true;
                        }

                        GUILayout.FlexibleSpace();

                        if (EditorBasicFunctions.GetEditorButton("DeleteLastButton", "Delete last created object of every mode, in edit mode delete last create object of all modes", new Vector2(buttonsScale, buttonsScale), true, false, false, true))
                        {
                            DeleteLastAction();
                        }

                        GUILayout.FlexibleSpace();
                        GUILayout.EndHorizontal();
                    }

                    EditorGUILayout.Separator();
                    EditorGUILayout.Separator();
                    EditorBasicFunctions.DrawLineSeparator();
                }
            }
        }