Пример #1
0
 private void createNewChunk() {
   int w = (Integer) widthSpinner.getValue();
   int h = (Integer) heightSpinner.getValue();
   currentChunk = new Chunk(cl.getNextId(), w, h);
   levelDrawer.setSize(w * 16, h * 16);
   levelDrawer.setMap(currentChunk.getMap());
   levelDrawer.setSprites(currentChunk.getSprites());
   levelDrawer.repaint();
 }
Пример #2
0
 private void selectChunk() {
   Chunk sel = cl.getChunk(list.getSelectedValue());
   if (sel != null) {
     currentChunk = sel;
     levelDrawer.setSize(sel.getWidth() * 16, sel.getHeight() * 16);
     widthSpinner.setValue(sel.getWidth());
     heightSpinner.setValue(sel.getHeight());
     levelDrawer.setMap(currentChunk.getMap());
     levelDrawer.setSprites(currentChunk.getSprites());
     levelDrawer.repaint();
   }
 }