-
Notifications
You must be signed in to change notification settings - Fork 9
Menu Button Location
SamJakob edited this page Dec 16, 2017
·
1 revision
Description: This guide will show you how to set an exact location for a button in the GUI
Time: less than 1 minute
Difficulty: 1/5 (Very Easy)
- Let's say you want to put your button in a certain location. Fear not - this is incredibly simple.
// Assuming menu is your PaginatedGUI and button is your GUIButton
menu.setButton(4, button);
- But what if you wanted to but your GUI on the second page?
// Assuming menu is your PaginatedGUI and button is your GUIButton
menu.setButton(48, button);
// This will put the GUIButton in the middle of the top of the second page.
You may have noticed that 48 is larger than the inventory's default size of 45 (the actual size is 54 but the bottom row of 9 is reserved for the pagination items.)
As the slots automatically overflow onto pages, this will place the GUIButton on page 2, slot 4.