public AInputWidget(P parent, string label, GetValue getValue, SetValue setValue, ShouldDrawInput shouldDrawInput = null) { this.Parent = parent; this.label = label; this.getValue = getValue; this.setValue = setValue; this.shouldDrawInput = shouldDrawInput; }
public EnumInputWidget(P parent, string label, float labelWidth, GetValue getValue, SetValue setValue, ShouldDrawInput shouldDrawInput = null) : base(parent, label, getValue, setValue, shouldDrawInput) { this.labelWidth = labelWidth; args = new FloatOptionsArgs <E>() { getDisplayName = v => v.ToString(), items = Enum.GetValues(typeof(E)).Cast <E>(), onSelect = v => base.setValue(base.Parent, v) }; }
public DefInputWidget(P parent, string label, float labelWidth, GetValue getValue, SetValue setValue, bool includeNullOption, Predicate <D> exclude = null, ShouldDrawInput shouldDrawInput = null) : base(parent, label, getValue, setValue, shouldDrawInput) { this.labelWidth = labelWidth; args = new FloatOptionsArgs <D>() { getDisplayName = def => Util.GetLabel(def), items = Util.SortedDefList <D>(exclude), onSelect = def => base.setValue(base.Parent, def), includeNullOption = includeNullOption }; }
public FloatInputWidget(P parent, string label, GetValue getValue, SetValue setValue, ShouldDrawInput shouldDrawInput = null) : base(parent, label, getValue, setValue, shouldDrawInput) { this.value = base.getValue(base.Parent); this.ResetBuffers(); }