added font to repo and simplified inv desc

This commit is contained in:
2025-11-30 17:28:11 +01:00
parent bbeba11fb9
commit 02d6672114
3 changed files with 3 additions and 9 deletions

Binary file not shown.

View File

@@ -195,23 +195,23 @@ public class UI {
// DESCRIPTION FRAME
int itemIndex = getItemIndex();
if(panel.player.inventory.size()-1 < itemIndex || panel.player.inventory.get(itemIndex).description == null) return;
int dFrameX = frameX;
int dFrameY = frameY + frameHeight+2;
int dFrameWidth = frameWidth;
int dFrameHeight = panel.tileSize*3;
drawSubWindow(dFrameX, dFrameY, dFrameWidth, dFrameHeight);
// DRAW DESCRIPTION
int textX = dFrameX + 20;
int textY = dFrameY + panel.tileSize;
graphics2d.setFont(graphics2d.getFont().deriveFont(28F));
if(itemIndex < panel.player.inventory.size())
if(itemIndex < panel.player.inventory.size()) {
drawSubWindow(dFrameX, dFrameY, dFrameWidth, dFrameHeight);
for(String line : panel.player.inventory.get(itemIndex).description.split("\n")) {
graphics2d.drawString(line, textX, textY);
textY += 32;
}
}
}
// GAME STATES
public void drawPauseScreen() {

View File

@@ -245,12 +245,6 @@ public class Player extends Entity {
// INVENTORY
inventory.add(currentWeapon);
inventory.add(currentShield);
inventory.add(new KeyObj(panel));
inventory.add(new KeyObj(panel));
inventory.add(new KeyObj(panel));
inventory.add(new KeyObj(panel));
inventory.add(new KeyObj(panel));
inventory.add(new KeyObj(panel));
}
public int getAttack() {
return attack = strength * currentWeapon.attackValue;