From 11f4e4c36b5b47992255ea2a802b19f2cb471490 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Fri, 19 Jan 2024 18:14:24 +0100 Subject: [PATCH] BoxEditor - Change Result type from string to SkinBOX --- PCK-Studio/Forms/Editor/BoxEditor.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PCK-Studio/Forms/Editor/BoxEditor.cs b/PCK-Studio/Forms/Editor/BoxEditor.cs index cae9d054..54c393f7 100644 --- a/PCK-Studio/Forms/Editor/BoxEditor.cs +++ b/PCK-Studio/Forms/Editor/BoxEditor.cs @@ -7,9 +7,10 @@ namespace PckStudio.Forms.Editor { public partial class BoxEditor : MetroFramework.Forms.MetroForm { - public string Result; + private SkinBOX result; + public SkinBOX Result => result; - public BoxEditor(string box, bool hasInflation) + public BoxEditor(string box, bool hasInflation) : this(SkinBOX.FromString(box), hasInflation) { } @@ -43,14 +44,14 @@ namespace PckStudio.Forms.Editor private void saveButton_Click(object sender, EventArgs e) { - Result = + result = SkinBOX.FromString( $"{parentComboBox.SelectedItem} " + $"{PosXUpDown.Value} {PosYUpDown.Value} {PosZUpDown.Value} " + $"{SizeXUpDown.Value} {SizeYUpDown.Value} {SizeZUpDown.Value} " + $"{uvXUpDown.Value} {uvYUpDown.Value} " + $"{Convert.ToInt32(armorCheckBox.Checked)} " + $"{Convert.ToInt32(mirrorCheckBox.Checked)} " + - $"{inflationUpDown.Value}"; + $"{inflationUpDown.Value}"); DialogResult = DialogResult.OK; }