Make "Color" property on TUI screen accessible
This commit is contained in:
parent
3f35a47e90
commit
46605e282e
|
@ -30,10 +30,23 @@ namespace CC_Functions.Commandline.TUI
|
||||||
/// <param name="e">Args</param>
|
/// <param name="e">Args</param>
|
||||||
public delegate void OnWindowResize(Screen screen, EventArgs e);
|
public delegate void OnWindowResize(Screen screen, EventArgs e);
|
||||||
|
|
||||||
|
private bool _color;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether to output in color. Recommended for most terminals, might cause slowdowns in others
|
/// Whether to output in color. Recommended for most terminals, might cause slowdowns in others
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly bool Color;
|
public bool Color
|
||||||
|
{
|
||||||
|
get => _color;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (_color != value)
|
||||||
|
{
|
||||||
|
_color = value;
|
||||||
|
DiffDraw.Draw(_color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private int _wndHeight = Console.WindowHeight;
|
private int _wndHeight = Console.WindowHeight;
|
||||||
private int _wndWidth = Console.WindowWidth;
|
private int _wndWidth = Console.WindowWidth;
|
||||||
|
|
Reference in New Issue