public void FixValue() { if (binding == null) { return; } if (EnableUndo) { binding.SetValue(internalValue[0]); } else { binding.SetValueDirectly(internalValue[0]); } }
public void Update() { if (binding != null) { internalValue[0] = binding.Value; } if (Manager.NativeManager.DragFloat(Label + id, internalValue)) { if (EnableUndo) { binding.SetValue(internalValue[0]); } else { binding.SetValueDirectly(internalValue[0]); } } }
void Write() { if (binding != null && changed) { float parsed = 0; if (float.TryParse(Text, System.Globalization.NumberStyles.Float, Setting.NFI, out parsed)) { Writing = true; if (EnableUndo) { binding.SetValue(parsed); } else { binding.SetValueDirectly(parsed); } Writing = false; } } }