Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [RFC] Map decorations
Home

[Freeciv-Dev] Re: [RFC] Map decorations

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] Map decorations
From: Daniel Sjölie <deepone@xxxxxxxxxx>
Date: Sun, 7 Oct 2001 16:35:53 +0200

On 2001-10-07 12:07:53, Raimar Falke wrote:
> 
> This is a preparation for unit agents. It would be nice if for example
> the SMA (settler management agent something like the current auto
> settler function) can show which action a settler plans to carry out
> and to show certain information. See the attached picture for an
> example made with a drawing program (there is a settler in the south
> east corner, it was just "blinked out" at the screenshot).
> 
> Another point is that the current way of drawing the goto line is very
> ugly. The goto code calls the GUI code (if the line is started or
> changes) and the GUI code calls the goto code (if the mapview is
> refreshed).
> 
> So something like the following is useful IMHO:
> 
> struct map_decoration
> {
>   int elements_used;
>   struct {
>     int x,y;
>     char *text;
>     enum color_std line_color, text_color;
>   } elements[MAX_MAP_DECORATIONS_ELEMENTS];
> };
> 
> /*
>  * Draws line between the centers of the tiles which are mentioned in
>  * the elements fields. Note that the tiles doesn't have to be
>  * adjacent. If a text is given this is drawn at the
>  * tile. Returns an id.
>  */
> int add_map_decoration(struct map_decoration *p);
> 
> void remove_map_decoration(int id);
> 
> So the goto (or the SMA) code controls/calls the GUI code.
> 
> There may be extra modifiers for the text (position, size) and maybe
> also multiple texts.

Yes, I think this concept could be extended like this in quite a few
ways... (Eg, having small pixmaps or silimar)
I think the idea is a really good one even as is though...
It should be easy to build on later...

/Daniel

-- 
Now take a deep breath, smile and don't take life so seriously... :)


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