Re: Contribution on Java-freeciv
Leprince Olivier <[email protected]> Mon, 15 Apr 2002 10:04:47 +0200 (CEST)
| Newsgroups | gmane.games.freeciv.java |
|---|---|
| Message-ID | <[email protected]> |
--- Ben Mazur <[email protected]> a écrit : > > Maybe someone could checkin my development for me > in > > the CVS tree. The Zip file contains a diff file > that > > should be apply on the cvs tree released on > 02/04/2002 > > and two new classes. Units may now move and the > screen > > is updated when so. > > I can't seem to get this to work. I've applied the > patch and inserted > the new classes. Everything compiles without error > so I assume that > I've applied everything correctly. > Thanks a lot... > Whenever I click on a tile, intending to move a unit > there, all I get > is "Click 45,231" (for example) in the console. If > I set a unit on > auto settle/explore, the screen does seem to be > updating better. > > Any advice? Correct as nothing is developped yet. I just created the MapMouseListener to receive mouse event, but I didn't code the action. I just write in the console the mouse coordinates in the component coordinates space. But I don't know yet how to convert them into the map coordinate space. Maybe it could be usefull to have a method somewhere that do that transformation. We have in AbstractMainView: protected abstract boolean getCanvasPosition( int map_x, int map_y, Point canvasPos ); Maybe it should be interested to add protected abstract boolean getMapPosition( int canvas_x, int canvas_y, Point mapPos ); and to move both these methods in MapView ? Olivier ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com