예제 #1
0
 public SadConsoleMain(
     SadConsoleConfig sadConsoleConfig,
     EmulatorScreenConfig emulatorScreenConfig,
     SadConsoleEmulatorLoop sadConsoleEmulatorLoop)
 {
     _sadConsoleConfig       = sadConsoleConfig;
     _emulatorScreenConfig   = emulatorScreenConfig;
     _sadConsoleEmulatorLoop = sadConsoleEmulatorLoop;
 }
 public SadConsoleEmulatorRenderer(
     System.Func <SadConsoleScreen> getSadConsoleScreen,
     Memory emulatorMem,
     EmulatorScreenConfig emulatorScreenConfig)
 {
     _getSadConsoleScreen  = getSadConsoleScreen;
     _emulatorMem          = emulatorMem;
     _emulatorScreenConfig = emulatorScreenConfig;
 }
예제 #3
0
        private Console CreateScreenConsole(EmulatorScreenConfig emulatorScreenConfig)
        {
            // Setup screen
            var screen = new Console(emulatorScreenConfig.Cols + (emulatorScreenConfig.BorderCols * 2), emulatorScreenConfig.Rows + (emulatorScreenConfig.BorderRows * 2))
            {
                DefaultForeground = Microsoft.Xna.Framework.Color.White,
                DefaultBackground = Microsoft.Xna.Framework.Color.Black
            };

            //screen.Position = new Point(BorderWidth, BorderHeight);

            screen.Clear();
            screen.Cursor.IsEnabled = false;
            screen.Cursor.IsVisible = false;

            screen.Parent = this;
            return(screen);
        }
예제 #4
0
 public SadConsoleScreen(EmulatorScreenConfig emulatorScreenConfig)
 {
     ScreenConsole = CreateScreenConsole(emulatorScreenConfig);
 }