Search in sources :

Example 1 with MapLink

use of delta.games.lotro.maps.data.MapLink in project lotro-tools by dmorcellet.

the class LinkCreationInterator method doLink.

private void doLink(MapBundle bundle, int x, int y) {
    MapBundle currentMap = _canvas.getCurrentMap();
    Map map = currentMap.getMap();
    String target = bundle.getKey();
    GeoPoint hotPoint = map.getGeoReference().pixel2geo(new Dimension(x, y));
    MapLink link = new MapLink(target, hotPoint);
    map.addLink(link);
    _manager.saveMap(map.getKey());
    _canvas.repaint();
}
Also used : GeoPoint(delta.games.lotro.maps.data.GeoPoint) MapLink(delta.games.lotro.maps.data.MapLink) MapBundle(delta.games.lotro.maps.data.MapBundle) Dimension(java.awt.Dimension) Map(delta.games.lotro.maps.data.Map)

Aggregations

GeoPoint (delta.games.lotro.maps.data.GeoPoint)1 Map (delta.games.lotro.maps.data.Map)1 MapBundle (delta.games.lotro.maps.data.MapBundle)1 MapLink (delta.games.lotro.maps.data.MapLink)1 Dimension (java.awt.Dimension)1