Package mapwriter.map

Examples of mapwriter.map.Marker


   
    // get a marker near the specified block pos if it exists.
    // the maxDistance is based on the view width so that you need to click closer
    // to a marker when zoomed in to select it.
    public Marker getMarkerNearScreenPos(int x, int y) {
      Marker nearMarker = null;
        for (Marker marker : this.mw.markerManager.visibleMarkerList) {
          if (marker.screenPos != null) {
              if (marker.screenPos.distanceSq(x, y) < 6.0) {
                nearMarker = marker;
              }
View Full Code Here


     
      //int bX = this.mouseToBlockX(x);
    //int bZ = this.mouseToBlockZ(y);
    //int bY = this.getHeightAtBlockPos(bX, bZ);
     
      Marker marker = this.getMarkerNearScreenPos(x, y);
      Marker prevMarker = this.mw.markerManager.selectedMarker;
     
      if (button == 0) {
        if (this.dimensionLabel.posWithin(x, y)) {
          this.mc.displayGuiScreen(
              new MwGuiDimensionDialog(
View Full Code Here

      }
    }
   
    // zoom on mouse direction wheel scroll
    public void mouseDWheelScrolled(int x, int y, int direction) {
      Marker marker = this.getMarkerNearScreenPos(x, y);
      if ((marker != null) && (marker == this.mw.markerManager.selectedMarker)) {
        if (direction > 0) {
          marker.colourNext();
        } else {
          marker.colourPrev();
        }
       
      } else if (this.dimensionLabel.posWithin(x, y)) {
        int n = (direction > 0) ? 1 : -1;
        this.mapView.nextDimension(this.mw.dimensionList, n);
View Full Code Here

        this.mouseBlockX = p.x;
        this.mouseBlockZ = p.y;
        this.mouseBlockY = this.getHeightAtBlockPos(this.mouseBlockX, this.mouseBlockZ);
       
        // draw name of marker under mouse cursor
        Marker marker = this.getMarkerNearScreenPos(mouseX, mouseY);
        if (marker != null) {
          this.drawMouseOverHint(mouseX, mouseY, marker.name, marker.x, marker.y, marker.z);
        }
       
        // draw name of player under mouse cursor
View Full Code Here

TOP

Related Classes of mapwriter.map.Marker

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.