Add handler for escape/enter shortcut keys in the dialog

This commit is contained in:
baldurk
2014-09-16 19:30:10 +01:00
parent 29e78c467e
commit 5596533459
@@ -45,6 +45,22 @@ namespace renderdocui.Windows.Dialogs
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Escape)
{
DialogResult = DialogResult.Cancel;
this.Close();
return true;
}
if (keyData == Keys.Enter)
{
ok_Click(this, null);
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}
public FetchTexture tex = new FetchTexture();
public TextureSave saveData = new TextureSave();