Exemple #1
0
        /// <summary>
        /// Creates a new instance of the theme states object.
        /// </summary>
        public ThemeStates(Colors themeColors = null)
        {
            themeColors = themeColors ?? Library.Default.Colors;

            RefreshTheme(themeColors);
        }
Exemple #2
0
        /// <inheritdoc />
        public override void RefreshTheme(Colors themeColors)
        {
            base.RefreshTheme(themeColors);

            Normal = new SadConsole.Cell(themeColors.Text, themeColors.GrayDark);
        }
Exemple #3
0
        /// <summary>
        /// Called when the theme is attached to a control.
        /// </summary>
        /// <param name="control">The control that will use this theme instance.</param>
        public virtual void Attached(ControlBase control)
        {
            Colors colors = Colors ?? control.Parent?.Theme.Colors ?? Library.Default.Colors;

            RefreshTheme(colors);
        }