1
0
mirror of synced 2024-09-24 19:48:21 +02:00

Fix sampler/attribute input editor

This commit is contained in:
KillzXGaming 2019-05-12 10:46:41 -04:00
parent d8f77fff9f
commit 47d79b812e
9 changed files with 17 additions and 3 deletions

Binary file not shown.

View File

@ -290,7 +290,7 @@ namespace FirstPlugin.Forms
if (editor.ShowDialog() == DialogResult.OK)
{
material.shaderassign.attributes = editor.GetNewInputs();
material.shaderassign.samplers = editor.GetNewInputs();
}
}

View File

@ -129,11 +129,12 @@
// stPropertyGrid1
//
this.stPropertyGrid1.AutoScroll = true;
this.stPropertyGrid1.ShowHintDisplay = true;
this.stPropertyGrid1.Location = new System.Drawing.Point(256, 60);
this.stPropertyGrid1.Name = "stPropertyGrid1";
this.stPropertyGrid1.ShowHintDisplay = true;
this.stPropertyGrid1.Size = new System.Drawing.Size(210, 356);
this.stPropertyGrid1.TabIndex = 16;
this.stPropertyGrid1.Load += new System.EventHandler(this.stPropertyGrid1_Load);
//
// stButton1
//

View File

@ -99,7 +99,15 @@ namespace FirstPlugin.Forms
}
}
public void OnPropertyChanged() { }
public void OnPropertyChanged()
{
if (listViewCustom1.SelectedIndices.Count > 0)
{
int index = listViewCustom1.SelectedIndices[0];
var item = listViewCustom1.Items[index];
item.Text = $"{SamplerInputs[index].ResourceInput} : {SamplerInputs[index].ShaderVariable}";
}
}
private void btnScrollDown_Click(object sender, EventArgs e)
{
@ -145,5 +153,10 @@ namespace FirstPlugin.Forms
}
KeyCheck.Clear();
}
private void stPropertyGrid1_Load(object sender, EventArgs e)
{
}
}
}