Custom GUI tabs

Started by luckys25 on Wed, 05/12/2021 - 17:35

Topic category: User side tutorials

Last seen on 08:10, 26. Jul 2021
Joined Jul 2018

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom GUI tabs
Wed, 05/12/2021 - 17:35

Hi. I want to share with you the way I made custom GUI tabs in my Worm Industries mod. There is no custom coding, just vanilla MCreator procedures. Originally I made it in MCreator 2020.5 but this tutorial was made in 2021.1.


The principle is very simple. You have several GUIs and clicking the button switch between them.


1. Create the block/item you want to bound the GUI to.

2. Design your custom GUI.

I created a GUI where I want to use 3 tabs (Soup, Bell and Clock). I added pictures and buttons. This is your template GUI you will work with.


The "tab area" on the left side is just a custom picture.

I set it as the main GUI for my block so when I right click the block, this GUI opens.

3. Create your "tab" GUIs.

For each tab create its own GUI. To keep the same layout just duplicate the main (template) GUI and modify it.


I created three tab GUIs (Soup, Bell and Clock). Changed the text field in the top and added a picture in the midle. But you can add/remove whatever you want.

Also I changed the pictures in the tab area to black and white variants. Only the one that refers to actual open tab is coloured.

The easiest way to change a picture for another one is to double-click it and from the pop-up menu you choose different one.


4. Make switching procedures.

For each tab button you have to make its own procedure. But it's very simple. Just choose from Player procedure blocks "Open screen for entity..." Then select the GUI you want to open.

Here I want to open Soup GUI after Soup Button clicking.


5. Connect the procedures to the buttons.

Now connect the procedures you made with the right buttons in each GUI. Here I'll connect SoupButton procedure to each button "Soup" in my GUIs. Then I'll continue with connecting BellButton procedure to Bell button, etc.


Leave the button procedure empty if the button you press opens the tab you currently are in. For example I'm in the Bell tab and I click Bell button. Nothing happens because it is useless to open a GUI I'm in again.


In the end I have got 8 mod elements:

Now if you connected everything correctly you can see the result in the game. :)


Last seen on 18:34, 28. Jul 2021
Joined May 2021

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
   Thank you so much for…
Fri, 05/21/2021 - 10:45


 Thank you so much for this. This has made my traders/gui much more interesting.