Exemple #1
0
        public CharacterPicker(Color foreground, Color fill, Color selectedCharacterColor) : base(16, 16)
        {
            effectsManager = new SadConsole.Effects.EffectsManager(textSurface);
            textSurface.DefaultForeground = _charForeground = foreground;
            textSurface.DefaultBackground = _fill = fill;
            Clear();


            this.UseMouse = true;

            _selectedCharColor = selectedCharacterColor;

            //_characterSurface = new SadConsole.Controls.DrawingSurface(16, 16);
            //_characterSurface.DefaultBackground = fill;
            //_characterSurface.DefaultForeground = foreground;
            //_characterSurface.Clear();

            _selectedCharEffect = new SadConsole.Effects.Fade()
            {
                FadeBackground        = true,
                UseCellBackground     = false,
                DestinationBackground = new ColorGradient(_fill, _selectedCharColor * 0.8f),
                FadeDuration          = 2d,
                CloneOnApply          = false,
                AutoReverse           = true,
                Repeat = true,
            };

            SelectedCharacter = 1;
        }
        public CharacterPicker(Color foreground, Color fill, Color selectedCharacterColor)
            : base(16, 16)
        {
            effectsManager = new SadConsole.Effects.EffectsManager(textSurface);
            textSurface.DefaultForeground = _charForeground = foreground;
            textSurface.DefaultBackground = _fill = fill;
            Clear();

            this.CanUseMouse = true;

            _selectedCharColor = selectedCharacterColor;

            //_characterSurface = new SadConsole.Controls.DrawingSurface(16, 16);
            //_characterSurface.DefaultBackground = fill;
            //_characterSurface.DefaultForeground = foreground;
            //_characterSurface.Clear();

            _selectedCharEffect = new SadConsole.Effects.Fade()
            {
                FadeBackground = true,
                UseCellBackground = false,
                DestinationBackground = new ColorGradient(_fill, _selectedCharColor * 0.8f),
                FadeDuration = 2d,
                CloneOnApply = false,
                AutoReverse = true,
                Repeat = true,
            };

            SelectedCharacter = 1;
        }
Exemple #3
0
        public void OnSelected()
        {
            Brush = new SadConsole.GameHelpers.GameObject(1, 1, SadConsoleEditor.Settings.Config.ScreenFont);
            Brush.Animation.CreateFrame();
            Brush.IsVisible = false;

            blinkManager = new SadConsole.Effects.EffectsManager(Brush.Animation.Frames[0]);

            RefreshTool();
            MainScreen.Instance.Brush = Brush;

            MainScreen.Instance.QuickSelectPane.CommonCharacterPickerPanel_ChangedHandler(CharacterPickPanel.SharedInstance, System.EventArgs.Empty);
            CharacterPickPanel.SharedInstance.Changed      += CharPanelChanged;
            CharacterPickPanel.SharedInstance.HideCharacter = true;
        }
Exemple #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;

            blinkManager = new SadConsole.Effects.EffectsManager(Brush.Animation.Frames[0]);

            RefreshTool();
            EditorConsoleManager.Brush = Brush;
            EditorConsoleManager.UpdateBrush();

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