Add better notification for adding/removing shader linked material data.
This commit is contained in:
parent
890f5afcf7
commit
7348419be4
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -302,6 +302,9 @@ namespace FirstPlugin.Forms
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show("NOTE! Texture maps are adjusted by shader options which link by shaders. These are not possible to edit yet, do you want to contiue?", "MateraiL Editor", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
var tex = new MatTexture();
|
||||
tex.SamplerName = GetSamplerName("_a0");
|
||||
@ -344,6 +347,7 @@ namespace FirstPlugin.Forms
|
||||
item.SubItems.Add(tex.FragShaderSampler);
|
||||
textureRefListView.Items.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
@ -351,13 +355,7 @@ namespace FirstPlugin.Forms
|
||||
{
|
||||
string FirstSelecteItem = textureRefListView.SelectedItems[0].Text;
|
||||
|
||||
DialogResult result;
|
||||
if (textureRefListView.SelectedIndices.Count == 1)
|
||||
result = MessageBox.Show($"Are you sure you want to remove texture {FirstSelecteItem}? This could potentially break things!",
|
||||
"Texture Map Editor", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
|
||||
else
|
||||
result = MessageBox.Show("Are you sure you want to remove these textures? This could potentially break things!",
|
||||
"Texture Map Editor", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
|
||||
var result = MessageBox.Show("NOTE! Texture maps are adjusted by shader options which link by shaders. These are not possible to edit yet, do you want to contiue?", "MateraiL Editor", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
|
||||
|
||||
if (result == DialogResult.Yes)
|
||||
{
|
||||
|
@ -107,6 +107,9 @@ namespace FirstPlugin.Forms
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show("NOTE! Shader Options are link by shaders. These are not possible to edit yet, do you want to contiue?", "MateraiL Editor", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
var edtior = new ShaderOptionsEditBox();
|
||||
edtior.LoadOption("", "");
|
||||
@ -121,8 +124,12 @@ namespace FirstPlugin.Forms
|
||||
material.shaderassign.options.Add(edtior.textBoxName.Text, edtior.textBoxValue.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnRemove_Click(object sender, EventArgs e)
|
||||
{
|
||||
var result = MessageBox.Show("NOTE! Shader Options are link by shaders. These are not possible to edit yet, do you want to contiue?", "MateraiL Editor", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation);
|
||||
if (result == DialogResult.OK)
|
||||
{
|
||||
if (shaderOptionsListView.SelectedObject != null)
|
||||
{
|
||||
@ -134,3 +141,4 @@ namespace FirstPlugin.Forms
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user