From: Holger Schemel Date: Sun, 23 Jul 2006 01:00:42 +0000 (+0200) Subject: rnd-20060723-2-src X-Git-Tag: 3.2.1^2~39 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=d1ff6ce8cc755f54833fb2363a1f4519e2866a0f;p=rocksndiamonds.git rnd-20060723-2-src * changed scrollbars to always show last line as first after scrolling (that means jumping n - 1 screen lines instead of n screen lines) --- diff --git a/ChangeLog b/ChangeLog index 9f0350b4..83237984 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-23 + * changed scrollbars to always show last line as first after scrolling + (that means jumping n - 1 screen lines instead of n screen lines) + 2006-07-22 * fixed level versions of EMC level loader (from V4 to V1, V2 and V3) * fixed level time for EMC levels for V2 engine (V2 and V5 levels) diff --git a/src/conftime.h b/src/conftime.h index 68c52e8d..2b8cf3d4 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2006-07-23 01:12]" +#define COMPILE_DATE_STRING "[2006-07-23 01:22]" diff --git a/src/libgame/gadgets.c b/src/libgame/gadgets.c index ede8cfc7..fc723cf9 100644 --- a/src/libgame/gadgets.c +++ b/src/libgame/gadgets.c @@ -1687,11 +1687,12 @@ boolean HandleGadgets(int mx, int my, int button) struct GadgetScrollbar *gs = &gi->scrollbar; int old_item_position = gs->item_position; + int item_steps = gs->items_visible - 1; + int item_direction = (mpos < gpos + gi->scrollbar.position ? -1 : +1); changed_position = FALSE; - gs->item_position += - gs->items_visible * (mpos < gpos + gi->scrollbar.position ? -1 : +1); + gs->item_position += item_steps * item_direction; if (gs->item_position < 0) gs->item_position = 0;