Exemple #1
0
        public void FixValue()
        {
            if (binding == null)
            {
                return;
            }

            if (EnableUndo)
            {
                binding.SetValue(internalValue[0]);
            }
            else
            {
                binding.SetValueDirectly(internalValue[0]);
            }
        }
Exemple #2
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]);
                }
            }
        }
Exemple #3
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;
                }
            }
        }