Merge pull request #9 from Fretuks/enhance-screen-appearance
Polish shrine and stats screen styling
This commit is contained in:
@@ -143,26 +143,29 @@ public class ShrineScreen extends Screen {
|
||||
public void render(GuiGraphics gui, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(gui);
|
||||
RenderSystem.enableBlend();
|
||||
gui.fill(leftPos - 6, topPos - 6, leftPos + WIDTH + 6, topPos + HEIGHT + 6, 0xCC000000);
|
||||
gui.fill(leftPos - 8, topPos - 8, leftPos + WIDTH + 8, topPos + HEIGHT + 8, 0xDD0D0B14);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + HEIGHT + 4, 0xE01A1424);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + 20, 0xFF2A1F3A);
|
||||
gui.fill(leftPos - 4, topPos + 20, leftPos + WIDTH + 4, topPos + 21, 0x66FFFFFF);
|
||||
RenderSystem.disableBlend();
|
||||
|
||||
int titleColor = 0xAA55FF;
|
||||
gui.drawCenteredString(this.font, "Shrine of Remembrance", this.width / 2, topPos, 0xFFFFFF);
|
||||
int titleColor = 0xCDA1FF;
|
||||
gui.drawCenteredString(this.font, "Shrine of Remembrance", this.width / 2, topPos + 6, 0xFFFFFF);
|
||||
|
||||
gui.drawCenteredString(this.font, "Knowledge: " + playerKnowledge, this.width / 2, topPos + 20, 0x55FFAA);
|
||||
gui.drawCenteredString(this.font, "Knowledge: " + playerKnowledge, this.width / 2, topPos + 28, 0x8FEBD2);
|
||||
|
||||
switch (dialogueStage) {
|
||||
case 0 -> {
|
||||
gui.drawCenteredString(this.font, "SPEAK, LITTLE ONE.", this.width / 2, topPos + 40, titleColor);
|
||||
gui.drawCenteredString(this.font, "WHAT IS IT YOU SEEK TO UNMAKE?", this.width / 2, topPos + 55, titleColor);
|
||||
gui.drawCenteredString(this.font, "SPEAK, LITTLE ONE.", this.width / 2, topPos + 46, titleColor);
|
||||
gui.drawCenteredString(this.font, "WHAT IS IT YOU SEEK TO UNMAKE?", this.width / 2, topPos + 62, titleColor);
|
||||
}
|
||||
case 1 -> {
|
||||
gui.drawCenteredString(this.font, "THE TERMS ARE AS FOLLOWS:", this.width / 2, topPos + 40, titleColor);
|
||||
gui.drawCenteredString(this.font, "I WILL CONSUME YOUR KNOWLEDGE.", this.width / 2, topPos + 55, titleColor);
|
||||
gui.drawCenteredString(this.font, "YOU WILL REAP A BENEFIT.", this.width / 2, topPos + 70, titleColor);
|
||||
gui.drawCenteredString(this.font, "THE TERMS ARE AS FOLLOWS:", this.width / 2, topPos + 46, titleColor);
|
||||
gui.drawCenteredString(this.font, "I WILL CONSUME YOUR KNOWLEDGE.", this.width / 2, topPos + 62, titleColor);
|
||||
gui.drawCenteredString(this.font, "YOU WILL REAP A BENEFIT.", this.width / 2, topPos + 78, titleColor);
|
||||
}
|
||||
case 2 -> {
|
||||
gui.drawCenteredString(this.font, "SPEAK YOUR DESIRE, FOOLISH ONE.", this.width / 2, topPos + 40, titleColor);
|
||||
gui.drawCenteredString(this.font, "SPEAK YOUR DESIRE, FOOLISH ONE.", this.width / 2, topPos + 52, titleColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,9 +71,12 @@ public class StatsScreen extends Screen {
|
||||
public void render(GuiGraphics gui, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(gui);
|
||||
RenderSystem.enableBlend();
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + HEIGHT + 4, 0xAA000000);
|
||||
gui.fill(leftPos - 8, topPos - 8, leftPos + WIDTH + 8, topPos + HEIGHT + 8, 0xDD0C0B12);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + HEIGHT + 4, 0xE0181422);
|
||||
gui.fill(leftPos - 4, topPos - 4, leftPos + WIDTH + 4, topPos + 20, 0xFF2A2036);
|
||||
gui.fill(leftPos - 4, topPos + 20, leftPos + WIDTH + 4, topPos + 21, 0x66FFFFFF);
|
||||
RenderSystem.disableBlend();
|
||||
gui.drawCenteredString(this.font, Component.translatable("ascend.stats.title"), this.width / 2, topPos + 8, 0xFFFFFF);
|
||||
gui.drawCenteredString(this.font, Component.translatable("ascend.stats.title"), this.width / 2, topPos + 6, 0xFFFFFF);
|
||||
hoveredAttributeKey = null;
|
||||
if (mc.player != null) {
|
||||
mc.player.getCapability(PlayerStatsProvider.PLAYER_STATS).ifPresent(stats -> {
|
||||
@@ -81,22 +84,25 @@ public class StatsScreen extends Screen {
|
||||
int xp = stats.getAscendXP();
|
||||
int xpNext = stats.getXPToNextAscendLevel();
|
||||
int unspent = stats.getUnspentPoints();
|
||||
gui.drawString(font, Component.translatable("ascend.stats.level", level, 20), leftPos + 10, topPos + 24, 0xFFFF55);
|
||||
gui.drawString(font, Component.translatable("ascend.stats.level", level, 20), leftPos + 10, topPos + 28, 0xFFE27D);
|
||||
if (level < 20) {
|
||||
gui.drawString(font, Component.translatable("ascend.stats.xp", xp, xpNext), leftPos + 10, topPos + 36, 0xAAAAAA);
|
||||
gui.drawString(font, Component.translatable("ascend.stats.xp", xp, xpNext), leftPos + 10, topPos + 40, 0xB4B4C8);
|
||||
} else {
|
||||
gui.drawString(font, Component.translatable("ascend.stats.xp_max"), leftPos + 10, topPos + 36, 0xAAAAAA);
|
||||
gui.drawString(font, Component.translatable("ascend.stats.xp_max"), leftPos + 10, topPos + 40, 0xB4B4C8);
|
||||
}
|
||||
int unspentLabelWidth = font.width("Unspent Points: " + unspent);
|
||||
int unspentX = leftPos + WIDTH - 10 - unspentLabelWidth;
|
||||
gui.fill(unspentX - 6, topPos + 24, leftPos + WIDTH - 4, topPos + 38, 0x662D3B1E);
|
||||
gui.drawString(font, Component.translatable("ascend.stats.unspent", unspent),
|
||||
leftPos + WIDTH - 10 - font.width("Unspent Points: " + unspent), topPos + 24, 0x55FF55);
|
||||
int y = topPos + 55;
|
||||
unspentX, topPos + 28, 0x8CFF8C);
|
||||
int y = topPos + 64;
|
||||
for (String key : ATTRIBUTES) {
|
||||
int attrLevel = stats.getAttributeLevel(key);
|
||||
int cost = stats.getCostToUpgrade(key);
|
||||
Component name = Component.translatable("ascend.attribute." + key);
|
||||
Component label = Component.translatable("ascend.attribute.display", name, attrLevel);
|
||||
int labelX = leftPos + 10;
|
||||
gui.drawString(font, label, labelX, y, 0xFFFFFF);
|
||||
gui.drawString(font, label, labelX, y, 0xE6E6F2);
|
||||
|
||||
Button plus = plusButtons.get(key);
|
||||
if (plus != null) {
|
||||
|
||||
Reference in New Issue
Block a user