Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] (PR#7384) Vertical scroll zigzag in iso mode.
Home

[Freeciv-Dev] (PR#7384) Vertical scroll zigzag in iso mode.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7384) Vertical scroll zigzag in iso mode.
From: "Gregory Berkolaiko" <Gregory.Berkolaiko@xxxxxxxxxxxxx>
Date: Fri, 6 Feb 2004 12:05:15 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7384 >

Set topo to >= 4.
tiles to isotrident (I guess this is irrelevant).

Scroll vertically, using either the bar or the arrow buttons.  View 
zigzags unpleasantly.

A hack which sets the scroll step to 2 and cures zigzaging is attached.  
It's is not good, but probably a step in the right direction.

G.

Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.74
diff -u -r1.74 mapview_common.c
--- client/mapview_common.c     2004/02/03 20:16:07     1.74
+++ client/mapview_common.c     2004/02/06 19:50:23
@@ -491,6 +491,10 @@
 {
   int map_x0, map_y0;
 
+  if (is_isometric && scroll_y % 2 != 0) {
+    scroll_y++;
+  }
+
   native_to_map_pos(&map_x0, &map_y0, scroll_x, scroll_y);
   set_mapview_origin(map_x0, map_y0);
 }
Index: client/gui-gtk-2.0/mapview.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/mapview.c,v
retrieving revision 1.91
diff -u -r1.91 mapview.c
--- client/gui-gtk-2.0/mapview.c        2004/02/05 20:20:27     1.91
+++ client/gui-gtk-2.0/mapview.c        2004/02/06 19:50:24
@@ -1212,7 +1212,7 @@
   get_mapview_scroll_window(&xmin, &ymin, &xmax, &ymax, &xsize, &ysize);
 
   map_hadj = gtk_adjustment_new(-1, xmin, xmax, 1, xsize, xsize);
-  map_vadj = gtk_adjustment_new(-1, ymin, ymax, 1, ysize, ysize);
+  map_vadj = gtk_adjustment_new(-1, ymin, ymax, 2, ysize, ysize);
 
   gtk_range_set_adjustment(GTK_RANGE(map_horizontal_scrollbar),
        GTK_ADJUSTMENT(map_hadj));

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7384) Vertical scroll zigzag in iso mode., Gregory Berkolaiko <=