From 72c5989397a225032c9c1c52576b518561da55f7 Mon Sep 17 00:00:00 2001 From: terencehill Date: Wed, 4 Aug 2010 21:55:43 +0200 Subject: [PATCH] middle mouse button and ctrl-space in the cvarlist dialog to revert a cvar value to its default Useful when u want to revert a lot of cvars --- qcsrc/menu/xonotic/cvarlist.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/menu/xonotic/cvarlist.c b/qcsrc/menu/xonotic/cvarlist.c index 387396bba..d1116a70d 100644 --- a/qcsrc/menu/xonotic/cvarlist.c +++ b/qcsrc/menu/xonotic/cvarlist.c @@ -157,7 +157,12 @@ void XonoticCvarList_drawListBoxItem(entity me, float i, vector absSize, float i float XonoticCvarList_keyDown(entity me, float scan, float ascii, float shift) { - if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift)) + if (scan == K_MOUSE3 || ((shift & S_CTRL) && scan == K_SPACE)) + { + CvarList_Revert_Click(world, me); + return 1; + } + else if(SUPER(XonoticCvarList).keyDown(me, scan, ascii, shift)) return 1; else if(!me.controlledTextbox) return 0; -- 2.39.2