-
Minecraft InGameHud scaling
Oh ok, thanks for sending the link i will look over it right now, thanks!
-
Minecraft InGameHud scaling
I forgot to add, i have it called in another class package com.callumcarmicheal.galacticfrontier.render; import com.callumcarmicheal.galacticfrontier.gui.Logo; import com.callumcarmicheal.galacticfrontier.init.GalacticFrontier; import net.minecraft.client.Minecraft; import net.minecraftforge.client.event.RenderGameOverlayEvent; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.eventhandler.EventPriority; import cpw.mods.fml.common.eventhandler.SubscribeEvent; import cpw.mods.fml.common.gameevent.TickEvent.RenderTickEvent; public class Init { Logo logo = new Logo(); @SubscribeEvent public void onRenderTick(RenderTickEvent event) { renderTick.tick(event); GalacticFrontier.logger.info("renderTick"); } @SubscribeEvent(priority = EventPriority.NORMAL) public void overlayRender(RenderGameOverlayEvent event) { logo.renderLogoText(event); } } also i had it extentending guiscreen because i was using an example code but i deleted it, it was the guiBuffBar on the wiki.
-
Minecraft InGameHud scaling
I am trying to make an Scaling UI Hud Element, I want it so scale with the screen size but i haven't gotten an clue how to, ive looked online but all i found was code that would change the size of the picture but it would be black and would tile, this is the code i have package com.callumcarmicheal.galacticfrontier.gui; import java.awt.Color; import org.lwjgl.opengl.GL11; import com.callumcarmicheal.galacticfrontier.init.ModInfo; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiIngame; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.texture.ITextureObject; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.RenderGameOverlayEvent; public class Logo extends GuiScreen { public ResourceLocation TEXTURE = new ResourceLocation(ModInfo.Mod_ID, "textures/gui/base.png"); TextureManager renderEngine = Minecraft.getMinecraft().renderEngine; private static GuiIngame gig = new GuiIngame(Minecraft.getMinecraft()); FontRenderer fontRender; ScaledResolution scale; public void renderLogoText(RenderGameOverlayEvent event) { GL11.glDisable(GL11.GL_LIGHTING); fontRender = Minecraft.getMinecraft().fontRenderer; scale = new ScaledResolution( Minecraft.getMinecraft().getMinecraft(), Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight ); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE); int width = scale.getScaledWidth(); int height = scale.getScaledHeight(); int posX = 1; int posY = 1; int sizeX = 176; int sizeY = 88; this.drawTexturedModalRect(posX, posY, 0,0, sizeX, sizeY); String Version = "Developer Edition"; drawText("§fGlactical Frontier", 1, true); drawText("§b(§2" + Version + "§b)", 2, true); drawText("§fPress §4Enter §fto §aContinue", 2, 7, true); //GL11.glEnable(GL11.GL_LIGHTING); } public void drawText(String text, int WidthOffset, int Line, boolean Shaddow) { fontRender.drawString( text, 10 * WidthOffset, 10 * Line, Color.white.getRGB(), true); } public void drawText(String text, int Line, boolean Shaddow) { fontRender.drawString( text, 10, 10 * Line, Color.white.getRGB(), true); } } This is the image i have for the base.png: http://i.imgur.com/LxK33.png
-
How to create an Minecraft Styled Box?
Edit: I found one on http://i.imgur.com/LxK33.png Thanks for your help
-
How to create an Minecraft Styled Box?
Yes i know of that but i mean where could i find the base for the image?
-
How to create an Minecraft Styled Box?
[sOLVED] found texture at: http://i.imgur.com/LxK33.png Hello i am kinda new Forge, i know most of all the basics and some advanced but i cant figure out how to create an minecraft styled box like in the furnaces but just plane styled, i got the idea from this post and i want to replicate it: http://www.minecraftforge.net/forum/index.php?topic=18372.0 Does anyone know how i can do this, also how would i create gui's with the styled box (i mean the png's)
IPS spam blocked by CleanTalk.