From: terencehill Date: Sun, 20 Jun 2010 20:00:37 +0000 (+0200) Subject: More usable move/resize speed for arrow keys, it increases with time. X-Git-Tag: xonotic-v0.1.0preview~457^2~65 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=8e962848883b42ad8fbba7dd6e020c2485e60050;p=xonotic%2Fxonotic-data.pk3dir.git More usable move/resize speed for arrow keys, it increases with time. Holding Shift the speed is constant and the step is minor, for fine adjustments. --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 7e22dbfc0..aa4995e34 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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;