New() 공개 메소드

public New ( Color foreground, Color background, int width, int height ) : void
foreground Color
background Color
width int
height int
리턴 void
예제 #1
0
        private void CreateNewEditor(Editors.Editors editorType, int width, int height, Color defaultForeground, Color defaultBackground)
        {
            Editors.IEditor editor = null;

            switch (editorType)
            {
            case SadConsoleEditor.Editors.Editors.Console:
                editor = new Editors.LayeredConsoleEditor();
                editor.New(defaultForeground, defaultBackground, width, height);
                break;

            case SadConsoleEditor.Editors.Editors.GameObject:
                editor = new Editors.GameObjectEditor();
                editor.New(defaultForeground, defaultBackground, width, height);
                break;

            case SadConsoleEditor.Editors.Editors.Scene:
                editor = new Editors.SceneEditor();
                editor.New(defaultForeground, defaultBackground, width, height);
                break;

            case SadConsoleEditor.Editors.Editors.GUI:
                break;

            default:
                break;
            }

            if (editor != null)
            {
                AddEditor(editor, true);
            }

            topBarPane.IsVisible = true;
            ToolsPane.IsVisible  = true;
        }
        private static void CreateNewEditor(Editors.Editors editorType, int width, int height, Color defaultForeground, Color defaultBackground)
        {
            Editors.IEditor editor = null;

            switch (editorType)
            {
                case SadConsoleEditor.Editors.Editors.Console:
                    editor = new Editors.LayeredConsoleEditor();
                    editor.New(defaultForeground, defaultBackground, width, height);
                    break;
                case SadConsoleEditor.Editors.Editors.GameObject:
                    editor = new Editors.GameObjectEditor();
                    editor.New(defaultForeground, defaultBackground, width, height);
                    break;
                case SadConsoleEditor.Editors.Editors.Scene:
                    editor = new Editors.SceneEditor();
                    editor.New(defaultForeground, defaultBackground, width, height);
                    break;
                case SadConsoleEditor.Editors.Editors.GUI:
                    break;
                default:
                    break;
            }

            if (editor != null)
            {
                AddEditor(editor, true);
            }

            topBarPane.IsVisible = true;
            ToolsPane.IsVisible = true;
            scrollerContainer.IsVisible = true;
        }