Include text showing currently selected tile and currently hovered tile

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

Binary file not shown.

@ -88,7 +88,6 @@ public class EditorRenderer extends LevelRenderer{
int tempIndex = selectedTile.ordinal()+down-up;
int selectedIndex = tempIndex<0?Tile.values().length-1:tempIndex%Tile.values().length;
selectedTile = Tile.values()[selectedIndex];
System.out.println(selectedTile);
}
@Override
@ -101,6 +100,8 @@ public class EditorRenderer extends LevelRenderer{
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);
}
}
}

Loading…
Cancel
Save