In my libgag based design, heres what I would do:

I'm considering moving the DrawMap and DrawMiniMap code from Game into
libgag widgets, which would be a logical start.

After that, I might seperate out GamePanel, which draw the transparent
background for the side and top panels. The DrawMiniMap would fit
snugly into this, hopefully.

Then I would make a set of graphic buttons for what goes under the
minimap, and these buttons would swap hide/show other panels, such as
ChooseBuilding, or GameStatistics. Further more, GameStatistics could
be devided into a generic Statistics widget which would be provided a
reference to a vector which would hold the current statistics.

Buildings and flags could be done using a GraphicalRadioButton type
widget, which is a set of buttons of which only one can be selected at
a time, and this could then be reused in the MapEditor.

The "zones" however pose a particular problem in the widget system,
however. I think the only possibility would be three widgets, a
ZoneType, ZoneAddOrRemove, and BrushShapeChooser widgets, which we
could use boost::function to provide callbacks in which we would tie
them together in the main program.

As a side note, boost::function makes a very convient way to provide
callback type interface without virtual functions, which would allow
are wigets to be used dynamically.

There would also be a building properties widget, along with a unit
properties widget, each of which there would be two different versions
of to reflect the difference between in-game and map editor, where in
the map editor you can change all of the properties, in the gui, you
can.



I think it might all be do-able using libgag, although it would take
allot more work than seems nesseccary just to re-write the map editor.


Rememberthis is all just the future..!


_______________________________________________
glob2-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/glob2-devel

Reply via email to