Beispiel #1
0
        private static UIFocusTextInputPanel AddInput(string text, UIPanel mainPanel, ref float top, bool noSpaces = false, int h = 40)
        {
            UIFocusTextInputPanel boolElement = new UIFocusTextInputPanel(text);

            boolElement.SetPadding(0);
            boolElement.Width.Set(0, 1f);
            boolElement.Height.Set(h, 0f);
            boolElement.Top.Set(top, 0f);

            if (noSpaces)
            {
                //boolElement.OnTextChange += (a, b) =>
                //{
                //	boolElement.SetText(boolElement.currentText.RemoveSpaces());
                //};
            }

            mainPanel.Append(boolElement);

            top += h + 6;
            return(boolElement);
        }