Complete.Org: Mailing Lists: Archives: freeciv-dev: July 1999:
Re: [Freeciv-Dev] patch: makes city dialog units scrollable (PR#79)

Re: [Freeciv-Dev] patch: makes city dialog units scrollable (PR#79)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Freeciv-Dev] patch: makes city dialog units scrollable (PR#79)
From: vasc@xxxxxxxxxxxxxxxxxxxxx
Date: Fri, 30 Jul 1999 04:19:06 -0700 (PDT)

On Thu, 29 Jul 1999, P.E.Jean wrote:

> pejean.lists@xxxxxxxxx wrote:
> > Currently, in the city dialog, only 12 supported units
> > and 12 present units can be shown.
> > 
> > This patch allows the player to see more of them and
> > adds a scroll bar under the supported units list and/or
> > the present units list when there isn't enough place to
> > show them all.

Sorry to pester you again, but the patch you added creates 2*50 unit
pixmap widgets and adds a scrollable widget to them.  What if the city has
more than 50 units inside?  (Not likely but...)  Besides it wastes a lot
of mem because pixmaps are very memory hungry.  I suggest you add instead
something like this:

You keep the old number of pixmaps and your scrollbar and lose the viewport
widget. Whenever you want to know which unit pixmaps to draw, check the
position of the scrollbar widget to see which is the first unit to draw,
and draw the rest of the units from that onwards.

If you really feel like it add a capture event for resize events and
change the maximum number of unit pixmap widget accordingly.

I know this is a lot more trouble than the patch you added, but it saves
mem and for seasoned players the click & point fury of hitting moving unit
pixmaps can be frustrating.

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