Update CreateTexturePack prompt

This commit is contained in:
miku-666
2023-04-02 17:29:32 +02:00
parent 9bf4b77ee0
commit a4aac09f58
4 changed files with 2435 additions and 2150 deletions

View File

@@ -116,7 +116,7 @@
this.Controls.Add(this.InputTextBox);
this.Controls.Add(this.OKButton);
this.Controls.Add(this.TextLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "CreateTexturePack";

View File

@@ -9,19 +9,18 @@ namespace PckStudio
/// <summary>
/// Text entered <c>only access when DialogResult == DialogResult.OK</c>
/// </summary>
public string packName => InputTextBox.Text;
public string packRes => metroComboBox1.Text;
public string PackName => InputTextBox.Text;
public string PackRes => metroComboBox1.Text;
public CreateTexturePack(string InitialText)
public CreateTexturePack()
{
InitializeComponent();
InputTextBox.Text = InitialText;
FormBorderStyle = FormBorderStyle.None;
}
private void OKBtn_Click(object sender, EventArgs e)
{
if (metroComboBox1.SelectedIndex < 0) return;
if (metroComboBox1.SelectedIndex < 0)
return;
DialogResult = DialogResult.OK;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1327,10 +1327,10 @@ namespace PckStudio
private void texturePackToolStripMenuItem_Click(object sender, EventArgs e)
{
checkSaveState();
CreateTexturePack packPrompt = new CreateTexturePack("");
CreateTexturePack packPrompt = new CreateTexturePack();
if (packPrompt.ShowDialog() == DialogResult.OK)
{
currentPCK = InitializeTexturePack(new Random().Next(8000, int.MaxValue), 0, packPrompt.packName, packPrompt.packRes);
currentPCK = InitializeTexturePack(new Random().Next(8000, int.MaxValue), 0, packPrompt.PackName, packPrompt.PackRes);
isTemplateFile = true;
wasModified = true;
LoadEditorTab();
@@ -1340,10 +1340,10 @@ namespace PckStudio
private void mashUpPackToolStripMenuItem_Click(object sender, EventArgs e)
{
checkSaveState();
CreateTexturePack packPrompt = new CreateTexturePack("");
CreateTexturePack packPrompt = new CreateTexturePack();
if (packPrompt.ShowDialog() == DialogResult.OK)
{
currentPCK = InitializeMashUpPack(new Random().Next(8000, int.MaxValue), 0, packPrompt.packName, packPrompt.packRes);
currentPCK = InitializeMashUpPack(new Random().Next(8000, int.MaxValue), 0, packPrompt.PackName, packPrompt.PackRes);
isTemplateFile = true;
wasModified = false;
LoadEditorTab();