Exemple #1
0
        private void Init()
        {
            label = CreateLabel();
            {
                label.Alignment = TextAnchor.UpperLeft;
            }

            input = CreateChild <BasicInput>("input", 1);
            {
                input.Anchor = AnchorType.BottomStretch;
                input.Pivot  = PivotType.Bottom;
                input.SetOffsetHorizontal(8f);
                input.Y      = 8f;
                input.Height = 30f;

                input.UseDefaultHoverAni();
                input.UseDefaultFocusAni();

                input.OnSubmitted += (value) =>
                {
                    if (stringEntry != null && stringEntry.Value != value)
                    {
                        stringEntry.Value = value;
                    }
                };
            }
        }
 private void Init()
 {
     input = RootMain.CreateChild <BasicInput>("input", 0);
     {
         input.Size       = new Vector2(200f, 40f);
         input.OnFocused += (isFocused) =>
         {
             Debug.Log("Focus state changed to: " + isFocused);
         };
         input.UseDefaultFocusAni();
         input.UseDefaultHoverAni();
     }
 }