[Freeciv-Dev] Re: [patch] "turns-to-grow" on the map overview
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Mar 04, 2002 at 03:37:48PM -0500, Jason Short wrote:
> Raimar Falke wrote:
> > On Mon, Mar 04, 2002 at 03:05:08PM -0500, Jason Short wrote:
> >
> >>Raimar Falke wrote:
> >>
> >>>On Mon, Mar 04, 2002 at 07:21:31AM -0500, Jason Short wrote:
> >>>
> >>>
> >>>>Civ III shows the city's "turns-to-grow" on the map overview, like:
> >>>>
> >>>> XXX
> >>>> XXX <-- city
> >>>> XXX
> >>>> CityName 5
> >>>>SomeProduction 7
> >>>>
> >>>>where 5 is the turns-to-grow and 7 the turns-to-build. The only way
> >>>>this really differs from freeciv is that the turns-to-build is shown. I
> >>>>found it very helpful to see.
> >>>>
> >>>>Here's a patch that adds this feature to freeciv by adding a new
> >>>>function, get_city_mapview_name, to mapview_common, and changing the GUI
> >>>>code to use it.
> >>>>
> >>>>I also introduce a new function, city_turns_to_grow, in
> >>>>common/city.[ch], and change the GTK city dialog to use it. I've
> >>>>changed the xaw and gtk frontends.
> >>>>
> >>>>
> >>>>Issues:
> >>>>
> >>>>- It's controled by the draw_city_productions option (of course,
> >>>>draw_city_names must also be enabled). This is better than nothing IMO,
> >>>>but still not ideal.
> >>>>
> >>>>
> >>>An extra option?
> >>>
> >>Most likely, yes. But first it should be supported by all GUI's, right?
> >>
> >
> > By default should things be implemented for all GUIs.
>
> Yes, but doing so in one patch is probably a bad idea, since I can only
> compile half of the GUIs.
>
> >>>>- Shrinking cities are a bit tricky. In the GTK citydlg, they're shown
> >>>>in red to symbolize the shrinking. With the mapview as a backdrop, this
> >>>>wouldn't work so well (it would also require lots of gui-specific code).
> >>>> So instead I use [N] for a city that will _shrink_ in N turns.
> >>>>
> >>>>- Differentiating blocked and never-growing cities is a bit tricky. I
> >>>>use "X" for blocked cities and "-" for never-growing ones. (I believe
> >>>>CivIII just used "-" for both.)
> >>>>
> >>>>- The city names are drawn in a bigger font than the city productions.
> >>>>This is a bit odd when the growth is included in the city name.
> >>>>
> >>>>- Since city names can have numbers in them, this could get a bit
> >>>>confusing. For instance we could have "Paris 2" (Paris, 2 turns to
> >>>>grow) and "Paris 2 -" (Paris 2, no growth).
> >>>>
> >>>>
> >>>It is possible to use another font for this one. We already do some
> >>>width and height calculations. If the grow string is drawn separately
> >>>it is also not a problem to use a different color.
> >>>
> >>Well, I couldn't figure out how to do red with the GTK-client.
> >>
> >
> > gdk_gc_set_foreground(civ_gc, colors_standard[COLOR_STD_RED]);
>
> Very nice (new patch attached). Now to do this for the other 3 GUIs...
Xaw:
XSetForeground(display, fill_bg_gc, colors_standard[COLOR_STD_RED]);
For MUI and Win you have to ask other people.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
+#if defined(__alpha__) && defined(CONFIG_PCI)
+ /*
+ * The meaning of life, the universe, and everything. Plus
+ * this makes the year come out right.
+ */
+ year -= 42;
+#endif
-- Patch for 1.3.2 (kernel/time.c) from Marcus Meissner
|
|