[Freeciv-Dev] Re: Patch: cleanup -- client/gui-gtk/citydlg.c
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, 4 Jan 2001, Thue wrote:
> On Thursday 04 January 2001 22:06, Mike Jing wrote:
> Rather than raising the number of citizens show beside each other you should
> draw as many as you need overlapping (like in civ 2). That should be fairly
> simple to implement, just make one pixmap, and draw the number of heads you
> need with an offset from the left edge. In the gtk client something like:
>
> int offset = MAX(one_citizen_sprite->width,
> citizens_list_pixmap_width/num_citizens);
> gdk_draw_pixmap(cityzens_list_pixmap, civ_gc, one_citizen_sprite->pixmap,
> 0, 0,
> this_citizen_number * offset, 0,
> one_citizen_sprite->width, one_citizen_sprite->height );
>
> Where this_citizen_number should run from 0.
You would have to make a special mouse click event function too though.
---
Vasco Alexandre da Silva Costa @ Instituto Superior Tecnico, Lisboa
|
|