Ejemplo n.º 1
0
        public GameObjectConsole()
            : base(80, 25)
        {
            var animation = new AnimatedTextSurface("default", 1, 1, SadConsole.Engine.DefaultFont);
            var frame = animation.CreateFrame();
            frame.Cells[0].GlyphIndex = 1;

            player = new SadConsole.Game.GameObject(SadConsole.Engine.DefaultFont);
            player.Animation = animation;
            player.RepositionRects = true;
            player.Position = new Point(textSurface.Width / 2, textSurface.Height / 2);
            playerPreviousPosition = player.Position;

            // Setup this console to accept keyboard input.
            CanUseKeyboard = true;
            IsVisible = false;
        }
Ejemplo n.º 2
0
        public GameObjectConsole()
            : base(80, 25)
        {
            var animation = new AnimatedTextSurface("default", 1, 1, SadConsole.Engine.DefaultFont);
            var frame     = animation.CreateFrame();

            frame.Cells[0].GlyphIndex = 1;

            player                 = new SadConsole.Game.GameObject(SadConsole.Engine.DefaultFont);
            player.Animation       = animation;
            player.RepositionRects = true;
            player.Position        = new Point(textSurface.Width / 2, textSurface.Height / 2);
            playerPreviousPosition = player.Position;

            // Setup this console to accept keyboard input.
            CanUseKeyboard = true;
            IsVisible      = false;
        }
Ejemplo n.º 3
0
        public LineTool()
        {
            frameEffect = new SadConsole.Effects.Fade()
            {
                UseCellBackground = true,
                FadeForeground = true,
                FadeDuration = 1f,
                AutoReverse = true
            };

            lineCell = new Cell();

            settingsPanel = new LineToolPanel();
            ControlPanels = new CustomPanel[] { settingsPanel, CharacterPickPanel.SharedInstance };

            // Configure the animations
            Brush = new SadConsole.Game.GameObject();
            Brush.Font = Settings.Config.ScreenFont;
            AnimatedTextSurface animation = new AnimatedTextSurface("single", 1, 1, Settings.Config.ScreenFont);
            animation.CreateFrame()[0].GlyphIndex = 42;
            Brush.Animations.Add(animation.Name, animation);
            ResetLine();
        }
Ejemplo n.º 4
0
        public void OnSelected()
        {
            Brush = new SadConsole.Game.GameObject(Settings.Config.ScreenFont);
            Brush.Animation = new AnimatedTextSurface("default", 1, 1);
            Brush.Animation.CreateFrame();
            Brush.IsVisible = false;
            RefreshTool();
            EditorConsoleManager.Brush = Brush;
            EditorConsoleManager.UpdateBrush();

            EditorConsoleManager.QuickSelectPane.CommonCharacterPickerPanel_ChangedHandler(CharacterPickPanel.SharedInstance, System.EventArgs.Empty);
            CharacterPickPanel.SharedInstance.Changed += CharPanelChanged;
            EditorConsoleManager.QuickSelectPane.IsVisible = true;
        }