From: terencehill Date: Wed, 4 Aug 2010 19:55:43 +0000 (+0200) Subject: middle mouse button and ctrl-space in the cvarlist dialog to revert a cvar value... X-Git-Tag: xonotic-v0.1.0preview~266^2~5^2 X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=72c5989397a225032c9c1c52576b518561da55f7;p=xonotic%2Fxonotic-data.pk3dir.git 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 --- 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;