Essentials icon indicating copy to clipboard operation
Essentials copied to clipboard

[FEATURE]-Add values with feedbacks

Open jtalborough opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Nine times out of ten the usage of feedbacks is simply to represent a single primitive value. Typically there is a backing variable and when ever the backing variable changes feedback.FireUpdate() gets called. Something akin to the code below. Rather than recreating this construct every time I think it would be helpful to create classes valuesWithFeedback for strings, ints, and bools.

Per discussions on ticket #919 we can accomplish this without effecting the base classes.

private bool _value;
public BoolFeedback Feedback;
public bool value
{
	get
	{
	     return _value;
	}
	set
	{
		_value = value;
		Feedback.FireUpdate();
	}
}

jtalborough avatar Apr 20 '22 13:04 jtalborough