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

Hey so I'm trying to make an Option Button for my GUI that toggles invisibility. I need to know how to set up the Option Button, as it seems very complicated from the vanilla code I've looked at. After looking at the vanilla code and getting nowhere, I decided to come ask. If you have a video or post that teaches how to do it just link it and I'll figure it out from there. If you know how to do it I would be very thankful for your help.

What do you mean by option button? Just a normal button?

I require Java, both the coffee and the code :)

  • Author

No I know how to make a button, but I need the button that once you press it, turns on. Then the button changes to the turn off button and you can press it again to turn it off. An example would be the clouds button in the option menu. It toggles clouds on and off, that's what I'm trying to make, only for something other than clouds :).

  • Author

Hey so I made this in my actionPerformed method:

boolean on = guiButton.displayString == "On";
	if(on)
	{
		guiButton.displayString = "Off";

	}
	else if(!on)
	{
		guiButton.displayString = "On";
	}

It toggles just the way I want it to but now I have 1 problem. How do I save what the text is? If I set it to on and leave the GUI, when I come back its back to off.

 

Hey so I made this in my actionPerformed method:

boolean on = guiButton.displayString == "On";
	if(on)
	{
		guiButton.displayString = "Off";

	}
	else if(!on)
	{
		guiButton.displayString = "On";
	}

It toggles just the way I want it to but now I have 1 problem. How do I save what the text is? If I set it to on and leave the GUI, when I come back its back to off.

 

This really is just basic java.

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.