Exemplo n.º 1
0
 @Override
 public void onDraw(int mouseX, int mouseY, float partialTicks) {
   if (isVisibleBackground()) {
     drawGridBackground();
   }
   drawGridContent(mouseX, mouseY);
   super.onDraw(mouseX, mouseY, partialTicks);
 }
Exemplo n.º 2
0
 @Override
 public boolean onMouseClicked(int posX, int posY, int mouseButtonIndex, boolean overlap) {
   super.onMouseClicked(posX, posY, mouseButtonIndex, overlap);
   boolean clickedOnGrid =
       !overlap && Geometry.isDotInArea(getX(), getY(), this.width, this.height, posX, posY);
   if (clickedOnGrid) {
     handleMouseClickGrid(posX, posY);
   }
   return clickedOnGrid;
 }