Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: fix for isometric scrolling problem (PR#1222)
Home

[Freeciv-Dev] Re: fix for isometric scrolling problem (PR#1222)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: fix for isometric scrolling problem (PR#1222)
From: "Ross W. Wetmore" <rwetmore@xxxxxxxxxxxx>
Date: Sat, 12 Jan 2002 19:03:48 -0500

I think there are some problems with the isometric scaling additions. 

The two scrollbars are not independent, but constrained by the fact
that the iso view cannot move to all positions. This is not a problem
if the scrollbars are handled in standard map coordinates, or maybe
I should say not as much. This will reverse with iso-maps.

This doesn't seem to take that into account. Moreover since you are
setting up a new interface, you should pass in both current slider
positions and deal with things in a proper 2-D fashion.

Technically the scrollbars only have a range of the map size minus the
current canvas size, or some BB enclosing it.

Nowhere does this seem to enter in.

The current calculations are also a fairly confusing mess of special
cases. Again, if one goes to a new set of functions, I think they need
to be done with some obvious improvements, rather than just generating
code that now needs ot be fixed again.

With some more work this might be quite useful.

Cheers,
RossW
=====

At 04:14 PM 02/01/11 -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
>Attached is a patch that fixes the isometric scrolling problem.
>
>The problem: when using an iso-view client, the scrollbars are still 
>linked to map positions.  This means the scrolling will be done 
>diagonally relative to the window.  This is clearly Bad.
>
>The solution: when we have is_isometric, link the scrollbars to 
>isometric coordinates.
>
>In this patch, I've separated out the calculation code from gui-gtk into 
>functions in mapview_common.  These functions can likely be used by 
>other GUI's to implement the same functionality (though I have not yet 
>looked at this).  The calculation code deals in "scrollbar positions", 
>which are closely related to native GUI positions; i.e. they're 
>equivalent to map positions if !is_isometric and become some sort of 
>strange transformed compressed iso positions if is_isometric.
>
>(I also have a simpler patch in which I've just changed the GTK code, 
>without separating the calculations.  This can be used instead if 
>necessary.)
>
>jason




[Prev in Thread] Current Thread [Next in Thread]