1
0
mirror of synced 2024-11-13 18:50:50 +01:00

BFRES : Fix shader variables being switched in UI.

This commit is contained in:
KillzXGaming 2021-03-22 18:00:33 -04:00 committed by GitHub
parent dcba003aba
commit 2056fd1fa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ namespace FirstPlugin.Forms
var inputs = new Dictionary<string, string>(); var inputs = new Dictionary<string, string>();
foreach (AtributeInput item in AtributeInputs) foreach (AtributeInput item in AtributeInputs)
{ {
inputs.Add(item.ResourceInput, item.ShaderVariable); inputs.Add(item.ShaderVariable, item.ResourceInput);
} }
return inputs; return inputs;
} }
@ -48,8 +48,8 @@ namespace FirstPlugin.Forms
listViewCustom1.Items.Add($"{item.Key} : {item.Value}"); listViewCustom1.Items.Add($"{item.Key} : {item.Value}");
AtributeInputs.Add(new AtributeInput() AtributeInputs.Add(new AtributeInput()
{ {
ResourceInput = item.Key, ShaderVariable = item.Key,
ShaderVariable = item.Value, ResourceInput = item.Value,
}); });
} }
} }
@ -128,11 +128,11 @@ namespace FirstPlugin.Forms
List<string> KeyCheck = new List<string>(); List<string> KeyCheck = new List<string>();
foreach (AtributeInput item in AtributeInputs) foreach (AtributeInput item in AtributeInputs)
{ {
if (!KeyCheck.Contains(item.ResourceInput)) if (!KeyCheck.Contains(item.ShaderVariable))
KeyCheck.Add(item.ResourceInput); KeyCheck.Add(item.ShaderVariable);
else else
{ {
STErrorDialog.Show($"A Resource Input with the same name already exists! {item.ResourceInput}", STErrorDialog.Show($"A Shader Variable with the same name already exists! {item.ShaderVariable}",
this.Text, ""); this.Text, "");
DialogResult = DialogResult.None; DialogResult = DialogResult.None;
} }