Package de.yaams.extensions.basemap.tiled.util

Examples of de.yaams.extensions.basemap.tiled.util.TileMergeHelper


    int ret = JOptionPane.showConfirmDialog(editor.getAppFrame(), "Do you wish to merge tile images, and create a new tile set?",
        "Merge Tiles?", JOptionPane.YES_NO_CANCEL_OPTION);

    if (ret == JOptionPane.YES_OPTION) {
      TileMergeHelper tmh = new TileMergeHelper(map);
      int len = map.getTotalLayers();
      // TODO: Add a dialog option: "Yes, visible only"
      TileLayer newLayer = tmh.merge(0, len, true);
      map.removeAllLayers();
      map.addLayer(newLayer);
      newLayer.setName("Merged Layer");
      map.addTileset(tmh.getSet());
      editor.setCurrentLayer(0);
    } else if (ret == JOptionPane.NO_OPTION) {
      while (map.getTotalLayers() > 1) {
        map.mergeLayerDown(editor.getCurrentLayerIndex());
      }
View Full Code Here

TOP

Related Classes of de.yaams.extensions.basemap.tiled.util.TileMergeHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.