ValueChanged event for TUI Slider

This commit is contained in:
JFronny 2020-06-12 11:29:07 +02:00
parent 79531147b2
commit fb44579b33
1 changed files with 7 additions and 0 deletions

View File

@ -31,12 +31,14 @@ namespace CC_Functions.Commandline.TUI
if (_value < MinValue)
_value = MinValue;
Value = _value;
ValueChanged?.Invoke(screen, new EventArgs());
break;
case ConsoleKey.RightArrow:
_value += StepSize;
if (_value > MaxValue)
_value = MaxValue;
Value = _value;
ValueChanged?.Invoke(screen, new EventArgs());
break;
}
};
@ -114,5 +116,10 @@ namespace CC_Functions.Commandline.TUI
rend[i, j]);
return output;
}
/// <summary>
/// Called if the selected value of the slider changes
/// </summary>
public event OnClick ValueChanged;
}
}