Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi, I wanted to remove a button and a string from an exisiting gui. "event.buttonList.remove(2);" worked perfectly fine to remove the button but is there a similar code to remove a string? :)

And also, is there a way to change the state of a button? For instance when I click on "Create World" it's usually set to "Survivial" and I would like it to be set to "Creative" without having to click on it :)

  • Author
1 hour ago, diesieben07 said:

No. Text drawing is usually hardcoded in the GUIs drawScreen method.

 

There is no uniform way. You need to check what the button does when clicked on and then perform a similar action when the GUI is opened.

Oh okay. And is there a way to "hide" buttons instead of removing them with "event.buttonList.remove(2);"? That one seems to crash my game :L

If you can get the GuiButton variable

possibly event.buttonList.get(number) or something like that

You can set the visible variable to true/false

  • Author
3 minutes ago, hiotewdew said:

If you can get the GuiButton variable

possibly event.buttonList.get(number) or something like that

You can set the visible variable to true/false

But where am I supposed to get that variable? :L

Just now, weeeee said:

But where am I supposed to get that variable? :L

Quote

possibly event.buttonList.get(number) or something like that

 

 

If you want a lot of control to change a gui, you can replace the GUI with one of your own that basically copies the original code but with the modifications you want. Then handle the gui open event and if the gui is the one you want to replace, replace it.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.