Some material param improvments
This commit is contained in:
parent
e3497c76b2
commit
9b5e558543
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -34,9 +34,24 @@ namespace FirstPlugin.Forms
|
|||||||
shaderParamListView.Items.Clear();
|
shaderParamListView.Items.Clear();
|
||||||
foreach (BfresShaderParam prm in mat.matparam.Values)
|
foreach (BfresShaderParam prm in mat.matparam.Values)
|
||||||
{
|
{
|
||||||
string DisplayValue = "";
|
|
||||||
|
|
||||||
var item = new ListViewItem(prm.Name);
|
var item = new ListViewItem(prm.Name);
|
||||||
|
ShaderParamToListItem(prm, item);
|
||||||
|
|
||||||
|
shaderParamListView.View = View.Details;
|
||||||
|
shaderParamListView.Items.Add(item);
|
||||||
|
CurParam++;
|
||||||
|
}
|
||||||
|
il.ImageSize = new Size(10, 10);
|
||||||
|
shaderParamListView.SmallImageList = il;
|
||||||
|
shaderParamListView.FullRowSelect = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShaderParamToListItem(BfresShaderParam prm, ListViewItem item )
|
||||||
|
{
|
||||||
|
item.SubItems.Clear();
|
||||||
|
item.Text = prm.Name;
|
||||||
|
|
||||||
|
string DisplayValue = "";
|
||||||
|
|
||||||
switch (prm.Type)
|
switch (prm.Type)
|
||||||
{
|
{
|
||||||
@ -65,13 +80,6 @@ namespace FirstPlugin.Forms
|
|||||||
item.SubItems.Add(DisplayValue);
|
item.SubItems.Add(DisplayValue);
|
||||||
item.SubItems.Add("");
|
item.SubItems.Add("");
|
||||||
item.SubItems[2].BackColor = GetColor(prm);
|
item.SubItems[2].BackColor = GetColor(prm);
|
||||||
shaderParamListView.View = View.Details;
|
|
||||||
shaderParamListView.Items.Add(item);
|
|
||||||
CurParam++;
|
|
||||||
}
|
|
||||||
il.ImageSize = new Size(10, 10);
|
|
||||||
shaderParamListView.SmallImageList = il;
|
|
||||||
shaderParamListView.FullRowSelect = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color GetColor(BfresShaderParam prm)
|
private Color GetColor(BfresShaderParam prm)
|
||||||
@ -378,8 +386,7 @@ namespace FirstPlugin.Forms
|
|||||||
|
|
||||||
if (dialog.ShowDialog() == DialogResult.OK)
|
if (dialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
currentItem.SubItems[1].Text = GetValueString(material.matparam[currentItem.Text]);
|
ShaderParamToListItem(material.matparam[currentItem.Text], shaderParamListView.SelectedItems[0]);
|
||||||
currentItem.SubItems[2].BackColor = GetColor(material.matparam[currentItem.Text]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user