Пример #1
0
        public UISearchBar(LocalizedText emptyContentText, float scale)
        {
            this._textToShowWhenEmpty = emptyContentText;
            this._textScale           = scale;
            UITextBox uiTextBox1 = new UITextBox("", scale, false);

            uiTextBox1.HAlign          = 0.0f;
            uiTextBox1.VAlign          = 0.5f;
            uiTextBox1.BackgroundColor = Color.Transparent;
            uiTextBox1.BorderColor     = Color.Transparent;
            uiTextBox1.Width           = new StyleDimension(0.0f, 1f);
            uiTextBox1.Height          = new StyleDimension(0.0f, 1f);
            uiTextBox1.TextHAlign      = 0.0f;
            uiTextBox1.ShowInputTicker = false;
            UITextBox uiTextBox2 = uiTextBox1;

            this.Append((UIElement)uiTextBox2);
            this._text = uiTextBox2;
        }
Пример #2
0
        public UISearchBar(LocalizedText emptyContentText, float scale)
        {
            _textToShowWhenEmpty = emptyContentText;
            _textScale           = scale;
            UITextBox uITextBox = new UITextBox("", scale)
            {
                HAlign          = 0f,
                VAlign          = 0.5f,
                BackgroundColor = Color.Transparent,
                BorderColor     = Color.Transparent,
                Width           = new StyleDimension(0f, 1f),
                Height          = new StyleDimension(0f, 1f),
                TextHAlign      = 0f,
                ShowInputTicker = false
            };

            Append(uITextBox);
            _text = uITextBox;
        }