]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
More usable move/resize speed for arrow keys, it increases with time.
authorterencehill <piuntn@gmail.com>
Sun, 20 Jun 2010 20:00:37 +0000 (22:00 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 20 Jun 2010 20:00:37 +0000 (22:00 +0200)
Holding Shift the speed is constant and the step is minor, for fine adjustments.

qcsrc/client/hud.qc

index 00315aebcd30cdefaa051f9a58a1a3a0f3ba884b..0ed61b792af82acf113afbad2c13d1d50a391f6f 100644 (file)
@@ -1208,9 +1208,13 @@ void HUD_Panel_Arrow_Action(float nPrimary)
 
        float step;
        if (nPrimary == K_UPARROW || nPrimary == K_DOWNARROW)
-               step = vid_conheight / 64;
+               step = vid_conheight;
        else
-               step = vid_conwidth / 64;
+               step = vid_conwidth;
+       if (hudShiftState & S_SHIFT)
+               step = (step / 256); // more precision
+       else
+               step = (step / 64) * (1 + 2 * (time - pressed_key_time));
 
        highlightedPanel = highlightedPanel_prev;