Exemplo n.º 1
0
  public void loadMapEditor(Group root) {
    Logic.Images.LoadImagesEditor li = new LoadImagesEditor();
    li.loadMapEditor();

    Group meGroup = new Group();
    ivHover = new ImageView(Objekte.getImgMapEditor().getSingleBorderHover());
    ivHover.setVisible(true);

    Gui.Listener.EditorHoverListener eHoverL = new Gui.Listener.EditorHoverListener(ivHover);

    for (int y = 0; y < Objekte.getMapData().getMapSizeY(); y++) {
      for (int x = 0; x < Objekte.getMapData().getMapSizeX(); x++) {

        ImageView iv = new ImageView(Objekte.getImgMapEditor().getSingleBorder());
        iv.setLayoutX(x * 25);
        iv.setLayoutY(y * 25);
        eHoverL.addImageView(iv);
        iv.hoverProperty().addListener(eHoverL);
        meGroup.getChildren().add(iv);
      }
    }

    root.getChildren().add(meGroup);
    root.getChildren().add(ivHover);

    loadEditorPalette(root);
    loadMapUI(root);
    loadEditorButtons(root);
    loadMapNumbers(root);
  }
Exemplo n.º 2
0
 public void loadNumberChoiceBox() {
   int nr =
       (Objekte.getMapData().getMapNumberListById(Objekte.getMapData().getCurNumberId())).getNr();
   cb.getItems().clear();
   for (Data.MapNumber mapN : Objekte.getMapData().getMapNumberList()) {
     String anzeige = "";
     anzeige += "" + mapN.getNr() + ": " + mapN.getName();
     cb.getItems().add(anzeige);
   }
   cb.getSelectionModel().select(nr - 1);
 }