Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
PowerStripUIElement.cs
Go to the documentation of this file.
3using Terraria.UI;
4
6
8{
10
11 private string _gamepadPointGroupname;
12
14 {
17 int count = buttons.Count;
18 int num = 4;
19 int num2 = 40;
20 int num3 = 40;
21 int num4 = num3 + num;
23 {
24 Width = new StyleDimension(num2 + num * 2, 0f),
25 Height = new StyleDimension(num3 * count + num * (1 + count), 0f)
26 };
27 SetPadding(0f);
28 Width = uIPanel.Width;
29 Height = uIPanel.Height;
30 uIPanel.BorderColor = new Color(89, 116, 213, 255) * 0.9f;
31 uIPanel.BackgroundColor = new Color(73, 94, 171) * 0.9f;
32 uIPanel.SetPadding(0f);
34 for (int i = 0; i < count; i++)
35 {
37 uIElement.HAlign = 0.5f;
38 uIElement.Top = new StyleDimension(num + num4 * i, 0f);
39 uIElement.SetSnapPoint(_gamepadPointGroupname, i);
40 uIPanel.Append(uIElement);
42 }
43 }
44}
PowerStripUIElement(string gamepadGroupName, List< UIElement > buttons)
StyleDimension Height
Definition UIElement.cs:29
void Append(UIElement element)
Definition UIElement.cs:166
StyleDimension Width
Definition UIElement.cs:27
void SetPadding(float pixels)
Definition UIElement.cs:361