Jump to content

Recommended Posts

Posted

How would I render text and blocks of color onto the player's screen? For example a sentence colored red with a blue background highlight? I want to something like the intro to Fez, with the glitchy screen and stuff.

Posted

I think it is supposed to be RenderGameOverlayEvent. How would I draw stuff to the screen? I have only used the paint(Graphics g) method for drawing to screen before.

Posted

Sorry, my bad. I didn't even see that I switched Game and Overlay around. That was my fault.

 

If you still need further help, then re-read my first post.

 

use the in-game Minecraft fontrenderer and bind a string to the screen / draw a rectangle.

To put it in-depth:

Get the Minecraft instance, and get the fontRenderer of that instance, use that to draw a string, or you can use drawRect (only if you create your own Gui class)

 

Note: If you don't create a new GUI when you draw string or anything else it will override the entire screen forcing the exp/hp/armor bar to not successfully load-creating a graphic glitch with renders all textures useless unless you create a custom GUI.

 

TL;DR -

Use Minecraft's fontRenderer to draw the string or use Gui's drawRect (create own GUI).

Be sure to create your own GUI class (place the event in there, too) to draw your string and crap if you don't want the game to glitch up because you overwritten the entire GUI for minecraft.

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.