Fixed Mirror and Armor checkboxes in Box Editor saving incorrectly

This commit is contained in:
MattNL
2023-02-20 17:53:52 -05:00
parent 870bede8ee
commit 2154a80e33

View File

@@ -33,8 +33,8 @@ namespace PckStudio.Forms.Utilities.Skins
Size.Z = float.Parse(arguments[6]);
uvX = float.Parse(arguments[7]);
uvY = float.Parse(arguments[8]);
HideWithArmor = arguments[9] == "1";
Mirror = arguments[10] == "1";
HideWithArmor = Convert.ToBoolean(Int32.Parse(arguments[9]));
Mirror = Convert.ToBoolean(Int32.Parse(arguments[10]));
Inflation = float.Parse(arguments[11]);
}
catch (IndexOutOfRangeException)
@@ -84,7 +84,8 @@ namespace PckStudio.Forms.Utilities.Skins
$"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " +
$"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " +
$"{uvXUpDown.Value} {uvYUpDown.Value} " +
$"{(mirrorCheckBox.Checked ? "1 " : "0 ")} {(mirrorCheckBox.Checked ? "1 " : "0 ")} " +
$"{Convert.ToInt32(armorCheckBox.Checked)} " +
$"{Convert.ToInt32(mirrorCheckBox.Checked)} " +
$"{inflationUpDown.Value}";
DialogResult = DialogResult.OK;
Close();