-
Notifications
You must be signed in to change notification settings - Fork 2
/
ShopStackUI.cs
39 lines (34 loc) · 1013 Bytes
/
ShopStackUI.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
using InvTweaks.Gui;
using System;
using Terraria.ModLoader;
using Terraria.UI;
namespace InvTweaks
{
internal class ShopStackUI : UIState
{
public static bool visible = false;
private DragableUIPanel panel;
private NewUITextBox textBox;
public override void OnInitialize()
{
panel = new DragableUIPanel();
panel.SetPadding(0);
panel.HAlign = panel.VAlign = .5f;
panel.Width.Set(180, 0);
panel.Height.Set(70, 0);
textBox = new NewUITextBox("Enter stack");
textBox.SetPadding(0);
textBox.Left.Set(20, 0);
textBox.Top.Set(10, 0);
textBox.Width.Set(140, 0);
textBox.Height.Set(20, 0);
panel.Append(textBox);
Append(panel);
}
public int ShopStack
{
get => Convert.ToInt32(textBox.Text);
set => textBox.SetText(value.ToString(), 1, false);
}
}
}