Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ UISearchBar()

Terraria.GameContent.UI.Elements.UISearchBar.UISearchBar ( LocalizedText emptyContentText,
float scale )
inline

Definition at line 37 of file UISearchBar.cs.

38 {
39 _textToShowWhenEmpty = emptyContentText;
40 _textScale = scale;
41 UITextBox uITextBox = new UITextBox("", scale)
42 {
43 HAlign = 0f,
44 VAlign = 0.5f,
45 BackgroundColor = Color.Transparent,
46 BorderColor = Color.Transparent,
47 Width = new StyleDimension(0f, 1f),
48 Height = new StyleDimension(0f, 1f),
49 TextHAlign = 0f,
50 ShowInputTicker = false
51 };
52 uITextBox.SetTextMaxLength(50);
53 Append(uITextBox);
54 _text = uITextBox;
55 }
StyleDimension Height
Definition UIElement.cs:29
void Append(UIElement element)
Definition UIElement.cs:166
StyleDimension Width
Definition UIElement.cs:27
static Color Transparent
Definition Color.cs:76

References Terraria.GameContent.UI.Elements.UISearchBar._text, Terraria.GameContent.UI.Elements.UISearchBar._textScale, Terraria.GameContent.UI.Elements.UISearchBar._textToShowWhenEmpty, Terraria.UI.UIElement.Append(), Terraria.UI.UIElement.HAlign, Terraria.UI.UIElement.Height, Terraria.GameContent.UI.Elements.UITextBox.SetTextMaxLength(), Microsoft.Xna.Framework.Color.Transparent, Terraria.UI.UIElement.VAlign, and Terraria.UI.UIElement.Width.