public NumberEdit(double startingValue, double x = 0, double y = 0, double pointSize = 12, double pixelWidth = 0, double pixelHeight = 0, bool allowNegatives = false, bool allowDecimals = false, double minValue = int.MinValue, double maxValue = int.MaxValue, double increment = 1, int tabIndex = 0) { if (!allowNegatives) { minValue = Math.Max(0, minValue); } InternalTextEditWidget = new InternalNumberEdit(startingValue, pointSize, allowNegatives, allowDecimals, minValue, maxValue, increment, tabIndex); HookUpToInternalWidget(pixelWidth, pixelHeight); OriginRelativeParent = new Vector2(x, y); }
public NumberEdit(double startingValue, double x = 0, double y = 0, double pointSize = 12, double pixelWidth = 0, double pixelHeight = 0, bool allowNegatives = false, bool allowDecimals = false, double minValue = int.MinValue, double maxValue = int.MaxValue, double increment = 1, int tabIndex = 0) { if (!allowNegatives) { minValue = Math.Max(0, minValue); } internalTextEditWidget = new InternalNumberEdit(startingValue, pointSize, pixelWidth, pixelHeight, allowNegatives, allowDecimals, minValue, maxValue, increment, tabIndex); HookUpToInternalWidget(pixelWidth, pixelHeight); OriginRelativeParent = new Vector2(x, y); }