예제 #1
0
        protected virtual void Start()
        {
            var input = gameObject.GetComponent <TMP_InputField>();

            NextFrame.Function(
                delegate { input.onValueChanged.Invoke(input.text); });
        }
예제 #2
0
 void Start()
 {
     if (InputField.characterValidation.Equals(TMP_InputField.CharacterValidation.None))
     {
         InputField.onValidateInput += MyValidate;
     }
     NextFrame.Function(ResizeField2);
     InputField.onValueChanged.AddListener(ResizeField);
 }
예제 #3
0
 protected override void Start()
 {
     base.Start();
     if (canvas == null)
     {
         canvas = GetComponentInParent <Canvas>();
         UpdateSize();
         // this is messy but the reference pixels needs to be a big enough change for this to actually update properly
         canvas.referencePixelsPerUnit -= .01f;
         NextFrame.Function(UpdateSize);
     }
 }
예제 #4
0
        protected virtual void ResizeField2()
        {
            if (resizeLock)
            {
                return;
            }
            resizeLock = true;

            NextFrame.Function(ActivateResizeTMP);
            NextFrame.Function(delegate { NextFrame.Function(ActivateResizeTMP); });

            if (InputField)
            {
                ZeroRectTransformOffsets(InputField.textComponent.rectTransform);
            }
        }
예제 #5
0
 protected virtual void Start()
 {
     Scrollbar = GetComponent <Scrollbar>();
     NextFrame.Function(ResetScroll);
 }
예제 #6
0
 // Use this for initialization
 void Start() => NextFrame.Function(Fix);