]> 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)
committerFruitieX <rasse@rasse-lappy.localdomain>
Tue, 29 Jun 2010 08:08:19 +0000 (11:08 +0300)
Holding Shift the speed is constant and the step is minor, for fine adjustments.

qcsrc/client/hud.qc

index 7e22dbfc0c41bb0b8e798c4dd5a8237c9c684e9a..aa4995e34dd630cbb2accc01d6fd019484ec0066 100644 (file)
@@ -1116,9 +1116,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;