QOL fixes
This commit is contained in:
parent
ae1608d438
commit
c09c373046
|
|
@ -50,6 +50,10 @@ public partial class ItemCreationSDK : Form
|
|||
MessageBox.Show("You must assign an item name before you change the icon.", "Novetus Item Creation SDK", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
string previconpath = SDKFuncs.GetPathForType(type) + "\\" + ItemNameBox.Text.Replace(" ", "") + ".png";
|
||||
|
||||
if (!File.Exists(previconpath))
|
||||
{
|
||||
IconLoader icon = new IconLoader();
|
||||
icon.CopyToItemDir = true;
|
||||
|
|
@ -79,9 +83,22 @@ public partial class ItemCreationSDK : Form
|
|||
if (!Option1TextBox.ReadOnly) Option1TextBox.ReadOnly = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageBox.Show("An icon with this item's name already exists. Please change the item's name.", "Novetus Item Creation SDK", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void ItemTypeListBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
string previconpath = SDKFuncs.GetPathForType(type) + "\\" + ItemNameBox.Text.Replace(" ", "") + ".png";
|
||||
|
||||
if (File.Exists(previconpath))
|
||||
{
|
||||
File.SetAttributes(previconpath, FileAttributes.Normal);
|
||||
File.Delete(previconpath);
|
||||
}
|
||||
|
||||
type = SDKFuncs.GetTypeForInt(ItemTypeListBox.SelectedIndex);
|
||||
|
||||
switch (type)
|
||||
|
|
@ -332,13 +349,19 @@ public partial class ItemCreationSDK : Form
|
|||
string msgboxtext = "The Item Creation SDK has experienced an error: You are missing some requirements:\n";
|
||||
bool passed = true;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(ItemNameBox.Text) && ItemIcon.Image == null || string.IsNullOrWhiteSpace(ItemNameBox.Text) || ItemIcon.Image == null)
|
||||
if (string.IsNullOrWhiteSpace(ItemNameBox.Text))
|
||||
{
|
||||
msgboxtext += "\n - You must assign an item name and/or icon.";
|
||||
msgboxtext += "\n - You must assign an item name.";
|
||||
passed = false;
|
||||
}
|
||||
|
||||
if (ItemIcon.Image == null)
|
||||
{
|
||||
msgboxtext += "\n - You must assign an icon.";
|
||||
|
||||
if (RequiresIconForTexture && ItemIcon.Image == null)
|
||||
{
|
||||
msgboxtext += " This item type requires that you must select an Icon to select a Template or Texture.";
|
||||
msgboxtext += " This item type requires that you must select an Icon to use as a Template or Texture.";
|
||||
}
|
||||
|
||||
passed = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue