escape can now be bound through the special bindings dropdown menu
This commit is contained in:
parent
126c13ba78
commit
e6a979bfd3
|
@ -23,6 +23,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
/// These bindings get ignored by the widget and can only be entered by SetBinding() via the contextmenu from the InputCompositeWidget
|
/// These bindings get ignored by the widget and can only be entered by SetBinding() via the contextmenu from the InputCompositeWidget
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly string[] SpecialBindings = new[] {
|
public static readonly string[] SpecialBindings = new[] {
|
||||||
|
"Escape",
|
||||||
"WMouse L","WMouse M","WMouse R",
|
"WMouse L","WMouse M","WMouse R",
|
||||||
"WMouse 1", "WMouse 2"
|
"WMouse 1", "WMouse 2"
|
||||||
};
|
};
|
||||||
|
@ -142,24 +143,29 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (bindingStr != null)
|
if (bindingStr != null)
|
||||||
{
|
{
|
||||||
//ignore special bindings
|
|
||||||
if (SpecialBindings.Contains(bindingStr))
|
//has special meaning for the binding UI system (clear it).
|
||||||
{
|
//you can set it through the special bindings dropdown menu
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bindingStr == "Escape")
|
if (bindingStr == "Escape")
|
||||||
{
|
{
|
||||||
EraseMappings();
|
EraseMappings();
|
||||||
Increment();
|
Increment();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//seriously, we refuse to allow you to bind this to anything else.
|
||||||
if (bindingStr == "Alt+F4")
|
if (bindingStr == "Alt+F4")
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ignore special bindings
|
||||||
|
if (SpecialBindings.Contains(bindingStr))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!IsDuplicate(bindingStr))
|
if (!IsDuplicate(bindingStr))
|
||||||
{
|
{
|
||||||
_bindings[_pos] = bindingStr;
|
_bindings[_pos] = bindingStr;
|
||||||
|
|
Loading…
Reference in New Issue