GUI with switchable buttons

Started by Dreamforcer on

Topic category: Help with modding (Java Edition)

Last seen on 19:43, 24. Dec 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
GUI with switchable buttons

I want to make a GUI with some "statements" and a switchable button on the right of it. The button should then have two values: true and false. And if you click on the button the value switches.

My first idea was to make two buttons at the same place. One "true" button and one "false" button. I know how to make button conditions etc., but if I update the value of my "statement" the value does not switch.

 

I hope I was able to explain my problem to you well enough and you could help me! :D

Last seen on 13:29, 30. May 2022
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can makde a onn and off…
Thu, 04/15/2021 - 07:35

You can makde a onn and off texture for the switch, put them both at the same position in the GUI, make a invisible button behind it, and make a condition, that only shows the on/ off texture if a variable (SwitchOn) is true/false.

Last seen on 19:43, 24. Dec 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! But how do I make…
Thu, 04/15/2021 - 08:02

Thanks!

But how do I make/implement Textures for my Button?

And you make an invisible button by "placing" a button and then making a condition that is always false, right?

Last seen on 19:43, 24. Dec 2023
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey again! I managed the…
Fri, 04/16/2021 - 12:32

Hey again! I managed the textures and have one "true" and one "false" button texture. My condition procedure for the textures work but they dont change. I don't why. Maybe someone could help me... :|