Jump to content

DrawRect-Method not working / Rect invisible


JustixDeveloper

Recommended Posts

Hey guys,

I am about to code a Minecraft-Mod and I would like to display a rect in the screen.

 

My Code (Text is visible, but the rect not):

			ArrayList<String> display = new ArrayList<String>();			
			int count = 0;
              
			for (String name : display) {
				int mwidth = new ScaledResolution(this.mc).getScaledWidth() - Minecraft.getMinecraft.fontRenderObj.getStringWidth(name) - 2;
				int mheight = 11 * count + 2;
				
				Gui.drawRect(0x99101010, mheight - 1, mwidth - 1, mheight + 5, sr2.getScaledWidth() - 1);
              			Minecraft.getMinecraft.fontRenderObj.drawString(name, mwidth, mheight, ColorUtils.rainbowEffect(index + x2 * 200000000, 1.0f).getRGB());
              
              			count++;
			}
              
         		display.clear();

 

Edited by JustixDeveloper
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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