mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Made the Zoom text in Rune and Mana Infusion pages more clear. Also added a "SHIFT to stop animation" tidbit to Rune and Petal pages.
This commit is contained in:
1 parent
6a3c929abe
commit
9e035a7cf4
4 files changed
+28
-8
No files matched your search
@@ -115,7 +115,7 @@ public class PageManaInfusionRecipe extends PageRecipe {
|
||||
hoveringOverDrop = true;
|
||||
|
||||
font.drawString(dropString, dx, dy, 0x77000000);
|
||||
font.drawString(ratioString, x + 100 - font.getStringWidth(ratioString), y + 5, 0x99000000);
|
||||
font.drawString(ratioString, x + 50 - font.getStringWidth(ratioString) / 2, y + 15, 0x99000000);
|
||||
font.setUnicodeFlag(unicode);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
@@ -15,10 +15,12 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -97,7 +99,20 @@ public class PagePetalRecipe<T extends RecipePetals> extends PageRecipe {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderManaBar(IGuiLexiconEntry gui, T recipe, int mx, int my) {
|
||||
// NO-OP
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
int x = gui.getLeft() + gui.getWidth() / 2 - 50;
|
||||
int y = gui.getTop() + 120;
|
||||
|
||||
boolean unicode = font.getUnicodeFlag();
|
||||
font.setUnicodeFlag(true);
|
||||
String stopStr = StatCollector.translateToLocal("botaniamisc.shiftToStopSpin");
|
||||
font.drawString(stopStr, x + 50 - font.getStringWidth(stopStr) / 2, y + 15, 0x99000000);
|
||||
font.setUnicodeFlag(unicode);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,11 +49,11 @@ public class PageRuneRecipe extends PagePetalRecipe<RecipeRuneAltar> {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
String manaUsage = StatCollector.translateToLocal("botaniamisc.manaUsage");
|
||||
font.drawString(manaUsage, gui.getLeft() + gui.getWidth() / 2 - font.getStringWidth(manaUsage) / 2, gui.getTop() + 115, 0x66000000);
|
||||
font.drawString(manaUsage, gui.getLeft() + gui.getWidth() / 2 - font.getStringWidth(manaUsage) / 2, gui.getTop() + 110, 0x66000000);
|
||||
|
||||
int ratio = 10;
|
||||
int x = gui.getLeft() + gui.getWidth() / 2 - 50;
|
||||
int y = gui.getTop() + 125;
|
||||
int y = gui.getTop() + 120;
|
||||
|
||||
if(mx > x + 1 && mx <= x + 101 && my > y - 14 && my <= y + 11)
|
||||
ratio = 1;
|
||||
@@ -61,11 +61,14 @@ public class PageRuneRecipe extends PagePetalRecipe<RecipeRuneAltar> {
|
||||
HUDHandler.renderManaBar(x, y, 0x0000FF, 0.75F, recipe.getManaUsage(), TilePool.MAX_MANA / ratio);
|
||||
|
||||
String ratioString = String.format(StatCollector.translateToLocal("botaniamisc.ratio"), ratio);
|
||||
|
||||
String stopStr = StatCollector.translateToLocal("botaniamisc.shiftToStopSpin");
|
||||
|
||||
boolean unicode = font.getUnicodeFlag();
|
||||
font.setUnicodeFlag(true);
|
||||
font.drawString(ratioString, x + 100 - font.getStringWidth(ratioString), y + 5, 0x99000000);
|
||||
font.setUnicodeFlag(unicode); GL11.glDisable(GL11.GL_BLEND);
|
||||
font.drawString(stopStr, x + 50 - font.getStringWidth(stopStr) / 2, y + 15, 0x99000000);
|
||||
font.drawString(ratioString, x + 50 - font.getStringWidth(ratioString) / 2, y + 5, 0x99000000);
|
||||
font.setUnicodeFlag(unicode);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user