added font to repo and simplified inv desc
This commit is contained in:
BIN
assets/font/x12y16pxMaruMonica.ttf
Normal file
BIN
assets/font/x12y16pxMaruMonica.ttf
Normal file
Binary file not shown.
@@ -195,23 +195,23 @@ public class UI {
|
|||||||
|
|
||||||
// DESCRIPTION FRAME
|
// DESCRIPTION FRAME
|
||||||
int itemIndex = getItemIndex();
|
int itemIndex = getItemIndex();
|
||||||
if(panel.player.inventory.size()-1 < itemIndex || panel.player.inventory.get(itemIndex).description == null) return;
|
|
||||||
int dFrameX = frameX;
|
int dFrameX = frameX;
|
||||||
int dFrameY = frameY + frameHeight+2;
|
int dFrameY = frameY + frameHeight+2;
|
||||||
int dFrameWidth = frameWidth;
|
int dFrameWidth = frameWidth;
|
||||||
int dFrameHeight = panel.tileSize*3;
|
int dFrameHeight = panel.tileSize*3;
|
||||||
drawSubWindow(dFrameX, dFrameY, dFrameWidth, dFrameHeight);
|
|
||||||
|
|
||||||
// DRAW DESCRIPTION
|
// DRAW DESCRIPTION
|
||||||
int textX = dFrameX + 20;
|
int textX = dFrameX + 20;
|
||||||
int textY = dFrameY + panel.tileSize;
|
int textY = dFrameY + panel.tileSize;
|
||||||
graphics2d.setFont(graphics2d.getFont().deriveFont(28F));
|
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")) {
|
for(String line : panel.player.inventory.get(itemIndex).description.split("\n")) {
|
||||||
graphics2d.drawString(line, textX, textY);
|
graphics2d.drawString(line, textX, textY);
|
||||||
textY += 32;
|
textY += 32;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// GAME STATES
|
// GAME STATES
|
||||||
public void drawPauseScreen() {
|
public void drawPauseScreen() {
|
||||||
|
|||||||
@@ -245,12 +245,6 @@ public class Player extends Entity {
|
|||||||
// INVENTORY
|
// INVENTORY
|
||||||
inventory.add(currentWeapon);
|
inventory.add(currentWeapon);
|
||||||
inventory.add(currentShield);
|
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() {
|
public int getAttack() {
|
||||||
return attack = strength * currentWeapon.attackValue;
|
return attack = strength * currentWeapon.attackValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user