Skip to content

Commit

Permalink
fix alignment of item font
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdecker0001 committed Oct 23, 2023
1 parent 29f9410 commit 6d98e45
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/engine/DrawManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ public void drawItems(final Screen screen, Item[] ItemQ, final int inventory) {
backBufferGraphics.setFont(fontRegular);
backBufferGraphics.setColor(Color.WHITE);

backBufferGraphics.drawString(Integer.toString(inventory), 205, screen.getHeight() + 20);
backBufferGraphics.drawString(Integer.toString(inventory), 205, screen.getHeight() + 25);

Ship bombItem = new Ship(0, 0, Color.red, SpriteType.BombShape, false);
Ship invincibleItem = new Ship(0, 0, Color.yellow, SpriteType.InvincibleShape, false);
Expand All @@ -374,16 +374,16 @@ public void drawItems(final Screen screen, Item[] ItemQ, final int inventory) {

for (int i = 0; i < inventory; i++) {
if (ItemQ[i].getItemType() == Item.ItemType.BombItem) {
drawEntity(bombItem, 100 + 35 * i, screen.getHeight() + 10);
drawEntity(bombItem, 100 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.InvincibleItem) {
drawEntity(invincibleItem, 100 + 35 * i, screen.getHeight() + 10);
drawEntity(invincibleItem, 100 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.SpeedUpItem) {
drawEntity(SpeedUpItem, 100 + 35 * i, screen.getHeight() + 10);
drawEntity(SpeedUpItem, 100 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.SubPlaneItem) {
drawEntity(SubPlaneItem, 100 + 35 * i, screen.getHeight() + 10);
drawEntity(SubPlaneItem, 100 + 35 * i, screen.getHeight() + 15);
}
}
}
Expand All @@ -393,7 +393,7 @@ public void drawItems2(final Screen screen, Item[] ItemQ, final int inventory) {

backBufferGraphics.setFont(fontRegular);
backBufferGraphics.setColor(Color.WHITE);
backBufferGraphics.drawString(Integer.toString(inventory), 415, screen.getHeight() + 20);
backBufferGraphics.drawString(Integer.toString(inventory), 415, screen.getHeight() + 25);


Ship bombItem = new Ship(0, 0, Color.red, SpriteType.BombShape, false);
Expand All @@ -403,16 +403,16 @@ public void drawItems2(final Screen screen, Item[] ItemQ, final int inventory) {
for (int i = 0; i < inventory; i++) {
if (ItemQ[i].getItemType() == Item.ItemType.BombItem) {

drawEntity(bombItem, 310 + 35 * i, screen.getHeight() + 10);
drawEntity(bombItem, 310 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.InvincibleItem) {
drawEntity(invincibleItem, 310 + 35 * i, screen.getHeight() + 10);
drawEntity(invincibleItem, 310 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.SpeedUpItem) {
drawEntity(SpeedUpItem, 310 + 35 * i, screen.getHeight() + 10);
drawEntity(SpeedUpItem, 310 + 35 * i, screen.getHeight() + 15);
}
else if (ItemQ[i].getItemType() == Item.ItemType.SubPlaneItem) {
drawEntity(SubPlaneItem, 310 + 35 * i, screen.getHeight() + 10);
drawEntity(SubPlaneItem, 310 + 35 * i, screen.getHeight() + 15);

}
}
Expand Down

0 comments on commit 6d98e45

Please sign in to comment.