Simplified position calculations

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
main
Nic0Nic0Nii 3 years ago
parent 2d87ced8c4
commit 79b4a29ff7
  1. 8
      src/sig/objects/EditorRenderer.java

@ -99,9 +99,11 @@ public class EditorRenderer extends LevelRenderer{
@Override
protected void drawMapTileForEditorMode(int x, int y) {
if (x==RabiClone.p.highlightedSquare.getX()&&y==RabiClone.p.highlightedSquare.getY()) {
DrawTransparentTile(x*Tile.TILE_WIDTH-this.getX(),y*Tile.TILE_HEIGHT-this.getY(),selectedTile,Alpha.ALPHA160);
Draw_Text(x*Tile.TILE_WIDTH-this.getX()+2,y*Tile.TILE_HEIGHT-this.getY()-Font.PROFONT_12.getGlyphHeight()-2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12);
Draw_Text_Ext(x*Tile.TILE_WIDTH-this.getX()+2,y*Tile.TILE_HEIGHT-this.getY()+Tile.TILE_HEIGHT+2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12,Alpha.ALPHA0,PaletteColor.CRIMSON);
double tileX = x*Tile.TILE_WIDTH-this.getX();
double tileY = y*Tile.TILE_HEIGHT-this.getY();
DrawTransparentTile(tileX,tileY,selectedTile,Alpha.ALPHA160);
Draw_Text(tileX+2,tileY-Font.PROFONT_12.getGlyphHeight()-2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12);
Draw_Text_Ext(tileX+2,tileY+Tile.TILE_HEIGHT+2,new StringBuilder(selectedTile.toString()),Font.PROFONT_12,Alpha.ALPHA0,PaletteColor.CRIMSON);
}
}
}

Loading…
Cancel
Save