Package com.onpositive.mapper.dialogs

Examples of com.onpositive.mapper.dialogs.NewTilesetDialog


    setDescription("Please specify file name and map parameters");
    setFileExtension("tmx");
  }
 
  public void addTileset() {
    NewTilesetDialog dialog = new NewTilesetDialog(getShell());
    String widthTxt = tileWidthCombo.getText();
    String heightTxt = tileHeightCombo.getText();
    if (!widthTxt.isEmpty() && !heightTxt.isEmpty()) {
    dialog.setInitialTileSize(Integer.parseInt(widthTxt),Integer.parseInt(heightTxt));
    }
    dialog.open();
    TileSet result = dialog.getResult();
    if (result != null)
      tilesetsField.addElement(result);
  }
View Full Code Here


  public AddTilesetAction() {
  }
 
  @Override
  public void runForMap(IAction action, Map map) {
    NewTilesetDialog dialog = new NewTilesetDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
    dialog.setInitialTileSize(map.getTileWidth(),map.getTileHeight());
    int open = dialog.open();
    if (open == Dialog.OK) {
      map.addTileset(dialog.getCuttedResult());
    }
   
  }
View Full Code Here

TOP

Related Classes of com.onpositive.mapper.dialogs.NewTilesetDialog

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.