I have been working on the client IGC and the way it sets the active unit and
interacts with the GUI in general.  The patch is now fairly intrusive so I
have held it up for some play testing.  One important oddity is that when we
move a unit there is the following:

        if (!gui.onScreen(tile)) gui.setSelectedTile(tile);

I think this expresses things poorly.  I do not think we really want
to select the tile, all that is needed is that this new tile where a
unit has just moved to should be made visible, and setSelectedTile is
a convenient way to do this.  (Note: onScreen() does not test the map
as displayed but returns false for a certain amount of visible edge,
so it is impossible to completely move off screen without having
onScreen() fail earlier, which is probably a good thing)

ISTM it would be better to have a GUI routine that wrapped this up.
Perhaps GUI.ensureTileVisible(Tile)?  It would also be useful in
IGIH.animate*().  The controller then is expressing the requirement
more clearly, and onScreen would not need to be public.  Comment from
the GUI wrangler:-)?


BTW, terrain mode is working again for me following git.5f978b.  I
updated the wiki.  

Cheers,
Mike Pope

Attachment: pgpYopToc8WKd.pgp
Description: OpenPGP digital signature

------------------------------------------------------------------------------
_______________________________________________
Freecol-developers mailing list
Freecol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to