From: Erik V. <eri...@hc...> - 2005-09-25 13:56:55
|
Thanks for the new tile images. 18AL is now OK. > There are a few different ways, the easiest being just to > comment out the g2.drawImage() call in the > orientation-specific GUIHex.Paint() method. > > One idea I have been batting around is to change HexMap from > extending JPanel to extending JLayeredPane so that when we > draw the hexes, we can choose which is drawn on top. I tried a different approach: enabling ToolTips, to display Hex and current Tile properties when the cursor hovers above a tile (or if the tile is clicked once). First I tried these on the GUIHex classes (tiles), but that doesn't work - mouse events never reach the tiles. I suppose you have found that out before. Then I tried to do it in HexMap, in two ways: - by having HexMap implement MouseMotionListener, and setting a tooltip in mouseMoved(). This does not work, and mouseClicked() also ceases to respond. - by setting the tooltip in mouseClicked(). That does the job, but only once: additional mouse clicks do nothing anymore (and the tooltip will display everywhere). The latter situation is currently committed, so that you can have a look if you want. Restore the old situation by removing line 555 from HexMap. I don't know if you find this idea worth further pursueing, but if so, I must say that there seems to be much more to mouse handling than meets the eye..... Erik. |