Jump to content

Recommended Posts

Posted

Okay, Ive tried to make a 'paged' gui. And it works kinda. I cant really explain what happens, so im going to explain through code and images.  But basically when the second 'page' should show up on the gui the old page is still there, even though ive re-initGui()

 

 

  Reveal hidden contents

 

 

And heres what happens in picture form

gyazo.com/1a3aab6fe967fa10c4c259cfd931154e First page looking fine.

http://gyazo.com/8c70583b9b93ee65f9bc34ae38b4f54e second page, where the buttons should of been re-inited but havent fully.

 

Posted

by a "paged" gui , do you mean like theres transition. click on 1 button and everything change ?

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted
  On 6/28/2013 at 5:43 PM, hydroflame said:

by a "paged" gui , do you mean like theres transition. click on 1 button and everything change ?

Yep, like click on one button and it will cause others to disappears giving the effect that a new gui has came up.

Posted

actually i think i know where is your problem,

 

add

 

buttonList = new ArrayList();

to the first line of "initGui()"

 

thsi will clear the previous button and elements you inserted in the list ( by using buttonList.add(button) )

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Posted

Calling initgui() doesn't re-create the object, so all the old buttons are still in the buttonList. In this case, I would call buttonList.clear() at the start of initgui().

 

EDIT: Ninja'd, ha. Re-initialising the object will work too.

Posted
  On 6/28/2013 at 5:45 PM, hydroflame said:

actually i think i know where is your problem,

 

add

 

buttonList = new ArrayList();

to the first line of "initGui()"

 

thsi will clear the previous button and elements you inserted in the list ( by using buttonList.add(button) )

Thankyou so much!!!!!

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.