Jump to content

Adding more to a GUI screen


Alawnah

Recommended Posts

Hi, I just want to start off by same I'm not the best coder by a long-shot, but I have a decent understand of coding as I took 2 computer science classes in college.

 

One thing I never worked much with was GUIs, and I'm stuck with this one.

 

I have a drawScreen method that works just fine, it opens the background resource I have and draw's a texturedmodalrect, as well as some text.

 

I also have a initGui method that works fine, it adds six buttons on top of the GUI.

 

 

What I want to do is, in an actionPerformed method, have a method called drawFavorite() called, inside a switch statement.

 

In the drawFavorite method, I want to be able to draw another texturedmodalrect, as well as drawing some strings and text boxes, but I cannot figure out how to draw from another method that isn't drawScreen. So how do I?

 

Help appreciated! :)

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.

Announcements



×
×
  • Create New...

Important Information

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