mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-24 23:36:10 +00:00
Add maxChar to RenamePrompt
This commit is contained in:
@@ -11,16 +11,14 @@ namespace PckStudio
|
||||
/// </summary>
|
||||
public string NewText => InputTextBox.Text;
|
||||
|
||||
public RenamePrompt(TreeNode nodeIn)
|
||||
{
|
||||
InitializeComponent();
|
||||
InputTextBox.Text = nodeIn.Text;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
public RenamePrompt(string InitialText)
|
||||
public RenamePrompt(string InitialText) : this(InitialText, -1)
|
||||
{ }
|
||||
|
||||
public RenamePrompt(string InitialText, int maxChar)
|
||||
{
|
||||
InitializeComponent();
|
||||
InputTextBox.Text = InitialText;
|
||||
InputTextBox.MaxLength = maxChar < 0 ? short.MaxValue : maxChar;
|
||||
FormBorderStyle = FormBorderStyle.None;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user