mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
Looking at something with a lexica botania shows you its tagline.
This commit is contained in:
1 parent
0c6e895944
commit
6197e48dab
4 files changed
+34
-11
No files matched your search
@@ -335,6 +335,7 @@ public final class HUDHandler {
|
||||
FontRenderer font = mc.fontRenderer;
|
||||
boolean draw = false;
|
||||
String drawStr = "";
|
||||
String secondLine = "";
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
@@ -348,6 +349,7 @@ public final class HUDHandler {
|
||||
font = mc.standardGalacticFontRenderer;
|
||||
|
||||
drawStr = StatCollector.translateToLocal(entry.getUnlocalizedName());
|
||||
secondLine = EnumChatFormatting.ITALIC + StatCollector.translateToLocal(entry.getTagline());
|
||||
draw = true;
|
||||
}
|
||||
}
|
||||
@@ -370,12 +372,20 @@ public final class HUDHandler {
|
||||
if(draw) {
|
||||
if(!mc.thePlayer.isSneaking()) {
|
||||
drawStr = "?";
|
||||
secondLine = "";
|
||||
font = mc.fontRenderer;
|
||||
}
|
||||
|
||||
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.lexicon), sx, sy);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
font.drawStringWithShadow(drawStr, sx + 10, sy + 8, 0xFFFFFFFF);
|
||||
font.drawStringWithShadow(secondLine, sx + 10, sy + 18, 0xFFAAAAAA);
|
||||
|
||||
if(!mc.thePlayer.isSneaking()) {
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
mc.fontRenderer.drawStringWithShadow(EnumChatFormatting.BOLD + "Shift", (sx + 10) * 2 - 16, (sy + 8) * 2 + 20, 0xFFFFFFFF);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
@@ -108,7 +108,7 @@ public final class PersistentVariableHelper {
|
||||
|
||||
firstLoad = cmp.hasKey(TAG_FIRST_LOAD) ? cmp.getBoolean(TAG_FIRST_LOAD) : firstLoad;
|
||||
if(firstLoad) {
|
||||
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(LexiconData.welcome, new GuiLexicon());
|
||||
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(LexiconData.welcome, new GuiLexiconEntry(LexiconData.tutorial, new GuiLexicon()));
|
||||
lastBotaniaVersion = LibMisc.VERSION;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,7 +175,22 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
if(isShiftKeyDown()) {
|
||||
if(currentButton != null)
|
||||
infoTime = Math.min(animationTime, infoTime + timeDelta);
|
||||
} else infoTime = Math.max(0, infoTime - timeDelta);
|
||||
} else {
|
||||
infoTime = Math.max(0, infoTime - timeDelta);
|
||||
|
||||
if(currentButton != null && infoTime == 0) {
|
||||
int x = par1 + 10;
|
||||
int y = par2;
|
||||
|
||||
x = currentButton.xPosition - 20;
|
||||
y = currentButton.yPosition;
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow("?", x, y, 0xFFFFFF);
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
mc.fontRenderer.drawStringWithShadow(EnumChatFormatting.BOLD + "Shift", x * 2 - 6, y * 2 + 20, 0xFFFFFF);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
if(currentButton != null && infoTime > 0) {
|
||||
float fract = infoTime / animationTime;
|
||||
@@ -201,8 +216,8 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, paper, 14, -28);
|
||||
RenderItem.getInstance().renderItemOverlayIntoGUI(mc.fontRenderer, mc.renderEngine, paper, 14, -28);
|
||||
|
||||
List<ItemStack> stacks = currentEntry.getDisplayedRecipes();
|
||||
|
||||
if(stacks.size() > 0) {
|
||||
int spaceForEach = Math.min(18, (width - 30) / stacks.size());
|
||||
for(int i = 0; i < stacks.size(); i++) {
|
||||
@@ -214,8 +229,9 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
setHoveredButton(null);
|
||||
}
|
||||
|
||||
setHoveredButton(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user