Hi, > Gesendet: Donnerstag, 06. August 2015 um 12:09 Uhr > Von: "Michael T. Pope" <mp...@computer.org> > An: "FreeCol Developers" <freecol-developers@lists.sourceforge.net> > Betreff: [Freecol-developers] map visibility > > 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.
Well, if you would have attached a diff, I could take a look at it or try it out. > 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:-)? It might be better to not change the selected tile, but not sure if changing that causes the screen to some weird long unvisited part of the map when switching to the tile view mode? I think we have several methods already, which could provide that functionality. Maybe setFocus, setFocusImmediately, centerActiveUnit, isTileVisible, onScreen or some others in MapViewer would help? But the call should be routed through SwingGUI and there are some helper methods already. > BTW, terrain mode is working again for me following git.5f978b. I > updated the wiki. Was it that commit or did git.c039176c fix it already? Greetings, wintertime ------------------------------------------------------------------------------ _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers