1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Add better notification for adding/removing shader linked material data.

This commit is contained in:
KillzXGaming 2019-06-07 17:28:06 -04:00
parent 890f5afcf7
commit 7348419be4
6 changed files with 64 additions and 58 deletions

Binary file not shown.

View File

@ -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)
{

View File

@ -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
}
}
}
}