Menu: Unbind all keys for a given command when two were defined.

This commit is contained in:
Marco Cawthorne 2020-09-21 18:52:00 +02:00
parent 8bde44b01c
commit a0a593ef6b
1 changed files with 6 additions and 0 deletions

View File

@ -281,6 +281,12 @@ menu_controls_input(float evtype, float scanx, float chary, float devid)
g_controlquery = -1;
g_ctrl_refresh = time + 0.1f;
} else if (scanx > 0) {
if (ctrl_lbActBind1.GetItem(g_controlquery) != " ")
if (ctrl_lbActBind2.GetItem(g_controlquery) != " ") {
localcmd(sprintf("unbind %s\n", ctrl_lbActBind1.GetItem(g_controlquery)));
localcmd(sprintf("unbind %s\n", ctrl_lbActBind2.GetItem(g_controlquery)));
}
localcmd(sprintf("bind %s %s\n", keynumtostring(scanx), ctrl_lbActBind3.GetItem(g_controlquery)));
g_controlquery = -1;
g_ctrl_refresh = time + 0.1f;