-
Notifications
You must be signed in to change notification settings - Fork 89
stefvanschie edited this page May 20, 2022
·
2 revisions
Languages: Dutch (Nederlands)
Example code for a PIN gui. Players can enter their PIN code by clicking on the numbers in the top part of the gui.
DropperGui gui = new DropperGui("PIN");
gui.setOnGlobalClick(event -> event.setCancelled(true));
Label input = new Label(0, 0, 3, 3, Font.LIGHT_GRAY);
input.setText("123456789", (character, item) -> new GuiItem(item, event -> {
//player clicked on character
}));
gui.getContentsComponent().addPane(input);
<droppergui title="PIN" onGlobalClick="cancelClick">
<component name="contents">
<label x="0" y="0" length="3" height="3" font="light_gray" text="123456789" onClick="characterClick" />
</components>
</droppergui>