namespace Terminal.Gui.Drivers;
///
/// Holds global driver settings.
///
public sealed class Driver
{
private static bool _force16Colors = false; // Resources/config.json overrides
// NOTE: Force16Colors is a configuration property (Driver.Force16Colors).
// NOTE: IDriver also has a Force16Colors property, which is an instance property
// NOTE: set whenever this static property is set.
///
/// Determines if driver instances should use 16 colors instead of the default TrueColors.
///
///
[ConfigurationProperty (Scope = typeof (SettingsScope))]
public static bool Force16Colors
{
get => _force16Colors;
set
{
bool oldValue = _force16Colors;
_force16Colors = value;
Force16ColorsChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _force16Colors));
}
}
/// Raised when changes.
public static event EventHandler>? Force16ColorsChanged;
}