diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/BookletUtils.java b/src/main/java/ellpeck/actuallyadditions/booklet/BookletUtils.java index f0b1623e4..1c7d1c29b 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/BookletUtils.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/BookletUtils.java @@ -66,17 +66,10 @@ public class BookletUtils{ * Draws the Title of the current chapter, current index entry or just "Actually Additions" if neither is present */ public static void drawTitle(GuiBooklet booklet){ - if(booklet.currentIndexEntry != null){ - if(booklet.currentChapter == null){ - booklet.drawCenteredString(booklet.getFontRenderer(), booklet.currentIndexEntry.getLocalizedName(), booklet.guiLeft+booklet.xSize/2, booklet.guiTop-8, StringUtil.DECIMAL_COLOR_WHITE); - } - else{ - booklet.drawCenteredString(booklet.getFontRenderer(), booklet.currentChapter.getLocalizedName(), booklet.guiLeft+booklet.xSize/2, booklet.guiTop-8, StringUtil.DECIMAL_COLOR_WHITE); - } - } - else{ - booklet.drawCenteredString(booklet.getFontRenderer(), StringUtil.localize("itemGroup."+ModUtil.MOD_ID_LOWER), booklet.guiLeft+booklet.xSize/2, booklet.guiTop-8, StringUtil.DECIMAL_COLOR_WHITE); - } + booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize/2-142/2, booklet.guiTop-12, 0, 240, 142, 12); + + String strg = booklet.currentChapter == null ? (booklet.currentIndexEntry == null ? StringUtil.localize("itemGroup."+ModUtil.MOD_ID_LOWER) : booklet.currentIndexEntry.getLocalizedName()) : booklet.currentChapter.getLocalizedName(); + booklet.drawCenteredString(booklet.getFontRenderer(), strg, booklet.guiLeft+booklet.xSize/2, booklet.guiTop-9, StringUtil.DECIMAL_COLOR_WHITE); } /** diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java index eeeb8be15..7b3fdc518 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java @@ -98,27 +98,28 @@ public class GuiBooklet extends GuiScreen{ //Draws Achievement Info BookletUtils.drawAchievementInfo(this, true, x, y); - //Pre-Renders the current page's content etc. - BookletUtils.renderPre(this, x, y, this.ticksElapsed, this.mousePressed); - //Draws the title this.fontRendererObj.setUnicodeFlag(false); BookletUtils.drawTitle(this); this.fontRendererObj.setUnicodeFlag(true); + //Pre-Renders the current page's content etc. + BookletUtils.renderPre(this, x, y, this.ticksElapsed, this.mousePressed); + //Does vanilla drawing stuff super.drawScreen(x, y, f); this.searchField.drawTextBox(); - //Renders the current page's content - if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){ - this.currentPage.render(this, x, y, this.ticksElapsed, this.mousePressed); - } - //Draws hovering texts for buttons this.fontRendererObj.setUnicodeFlag(false); BookletUtils.doHoverTexts(this, x, y); BookletUtils.drawAchievementInfo(this, false, x, y); + this.fontRendererObj.setUnicodeFlag(true); + + //Renders the current page's content + if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){ + this.currentPage.render(this, x, y, this.ticksElapsed, this.mousePressed); + } this.fontRendererObj.setUnicodeFlag(unicodeBefore); //Resets mouse diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png index 9a9378711..750daf899 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png and b/src/main/resources/assets/actuallyadditions/textures/gui/booklet/guiBooklet.png differ