1
0
mirror of synced 2024-11-12 02:00: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>();
foreach (AtributeInput item in AtributeInputs)
{
inputs.Add(item.ResourceInput, item.ShaderVariable);
inputs.Add(item.ShaderVariable, item.ResourceInput);
}
return inputs;
}
@ -48,8 +48,8 @@ namespace FirstPlugin.Forms
listViewCustom1.Items.Add($"{item.Key} : {item.Value}");
AtributeInputs.Add(new AtributeInput()
{
ResourceInput = item.Key,
ShaderVariable = item.Value,
ShaderVariable = item.Key,
ResourceInput = item.Value,
});
}
}
@ -128,11 +128,11 @@ namespace FirstPlugin.Forms
List<string> KeyCheck = new List<string>();
foreach (AtributeInput item in AtributeInputs)
{
if (!KeyCheck.Contains(item.ResourceInput))
KeyCheck.Add(item.ResourceInput);
if (!KeyCheck.Contains(item.ShaderVariable))
KeyCheck.Add(item.ShaderVariable);
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, "");
DialogResult = DialogResult.None;
}