me.TD(me, 1, 1, e = makeXonoticButton(_("Clear"), '0 0 0'));
e.onClick = KeyBinder_Bind_Clear;
e.onClickEntity = kb;
+ kb.clearButton = e;
me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn);
me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it")));
ATTRIB(XonoticKeyBinder, inMouseHandler, float, 0)
ATTRIB(XonoticKeyBinder, userbindEditButton, entity, NULL)
ATTRIB(XonoticKeyBinder, keyGrabButton, entity, NULL)
+ ATTRIB(XonoticKeyBinder, clearButton, entity, NULL)
ATTRIB(XonoticKeyBinder, userbindEditDialog, entity, NULL)
METHOD(XonoticKeyBinder, editUserbind, void(entity, string, string, string))
ENDCLASS(XonoticKeyBinder)
return;
me.keyGrabButton.forcePressed = 1;
+ me.clearButton.disabled = 1;
keyGrabber = me;
}
void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
string func;
me.keyGrabButton.forcePressed = 0;
+ me.clearButton.disabled = 0;
+
if(key == K_ESCAPE)
return;