Always enable custom shaders create button, prompt for name. Refs #304

This commit is contained in:
baldurk
2016-07-25 11:38:20 +02:00
parent 12a51ee5a4
commit 54ea69a619
+2 -2
View File
@@ -882,6 +882,8 @@ namespace renderdocui.Windows
if (m_CustomShaders.ContainsKey(customShader.Text.ToUpperInvariant()))
{
MessageBox.Show("Selected shader already exists.\nEnter a new name in the textbox.", "Error Creating Shader", MessageBoxButtons.OK, MessageBoxIcon.Error);
customShader.Text = "";
UI_UpdateChannels();
return;
}
@@ -2289,12 +2291,10 @@ namespace renderdocui.Windows
if (m_TexDisplay.CustomShader == ResourceId.Null) { m_CurPixelValue = null; m_CurRealValue = null; UI_UpdateStatusText(); }
m_TexDisplay.CustomShader = m_CustomShaders[customShader.Text.ToUpperInvariant()];
customDelete.Enabled = customEdit.Enabled = true;
customCreate.Enabled = false;
}
else
{
customDelete.Enabled = customEdit.Enabled = false;
customCreate.Enabled = true;
}
}