Jump to content

Recommended Posts

Posted (edited)

Hi, im trying to make a new pause gui and I wand to make a button called "shaders" and when you pressed on it, it will open the shaders gui (class of the shader gui: GuiShaders) and I don't know how to link my mod with shader's mod. And when i do a "if(Loader.isModLoaded("shadersmod"))" it return false but shader is installed and "shadersmod" is the right mod_id. Thanks.

 

Also how can i set the font size in this code (Modifiying the debug menu)

@SideOnly(Side.CLIENT)
	@SubscribeEvent
	public void onRenderPre(RenderGameOverlayEvent.Pre event){
		if(event.type == RenderGameOverlayEvent.ElementType.DEBUG){
			event.setCanceled(true);
			String fpsString = mc.debug.split(",", 2)[0]; 
			this.drawString(Minecraft.getMinecraft().fontRenderer, fpsString, 5, 5, 14737632);
			
			

		}
	}
	public void drawString(FontRenderer par1FrontRenderer, String par2Str, int par3, int par4, int par5){
		
		
		par1FrontRenderer.drawStringWithShadow(par2Str, par3, par4, par5);
		
		
	}

 

Edited by Olivier062001
Posted
1 minute ago, diesieben07 said:

Please clarify what you mean and what you tried.

Well i have a method to write the text and  when I add in the GL11.glScalef(); it doesn't only change the size of the font it change the size of every menu.

public void drawString(FontRenderer par1FrontRenderer, String par2Str, int par3, int par4, int par5){	
		par1FrontRenderer.drawStringWithShadow(par2Str, par3, par4, par5);
		GL11.glScalef(2, 2, 0);
		
}

 

Posted
1 minute ago, diesieben07 said:

First, don't call the native GL functions, use GlStateManager.

Then, do you actually know how OpenGL works? Calling glScale will scale everything beyond that point. You need to push and pop the matrix.

No i don't know how to use it.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.