use of com.github.stefvanschie.inventoryframework.pane.Pane in project EmployMe by DavidTheExplorer.
the class ItemPaletteGUI method createControlPane.
/*
* Panes
*/
private Pane createControlPane() {
OutlinePane pane = new OutlinePane(0, 5, 9, 1, Priority.LOW);
pane.setOrientation(HORIZONTAL);
pane.setGap(3);
pane.addItem(createController("MHF_ArrowLeft", this.messageService.getMessage(INVENTORY_ITEM_PALETTE_BACK_ITEM_NAME).first(), currentPage -> currentPage > 0, currentPage -> --currentPage));
pane.addItem(createEnglishSearchItem());
pane.addItem(createController("MHF_ArrowRight", this.messageService.getMessage(INVENTORY_ITEM_PALETTE_NEXT_ITEM_NAME).first(), currentPage -> currentPage < (this.itemsPane.getPages() - 1), currentPage -> ++currentPage));
return pane;
}
use of com.github.stefvanschie.inventoryframework.pane.Pane in project EmployMe by DavidTheExplorer.
the class ItemsRewardPreviewGUI method createItemsPane.
private Pane createItemsPane() {
OutlinePane pane = new OutlinePane(0, 0, 9, 6, Priority.LOWEST);
this.itemsReward.getItems().stream().map(item -> new GuiItem(new ItemStack(item))).forEach(pane::addItem);
return pane;
}
use of com.github.stefvanschie.inventoryframework.pane.Pane in project EmployMe by DavidTheExplorer.
the class JobCreationGUI method createOptionsPane.
private Pane createOptionsPane() {
OutlinePane pane = new OutlinePane(2, 1, 6, 1, Priority.LOW);
pane.setOrientation(HORIZONTAL);
pane.setGap(3);
// add the money job icon
pane.addItem(new GuiItem(new ItemBuilder(Material.GOLD_INGOT).named(this.messageService.getMessage(INVENTORY_JOB_CREATION_MONEY_JOB_ICON_NAME).first()).withLore(this.messageService.getMessage(INVENTORY_JOB_CREATION_MONEY_JOB_ICON_LORE).toArray()).createCopy(), event -> {
Player player = (Player) event.getWhoClicked();
player.closeInventory();
this.moneyJobConversationFactory.buildConversation(player).begin();
}));
// add the items job icon
pane.addItem(new GuiItem(new ItemBuilder(Material.CHEST).named(this.messageService.getMessage(INVENTORY_JOB_CREATION_ITEMS_JOB_ICON_NAME).first()).withLore(this.messageService.getMessage(INVENTORY_JOB_CREATION_ITEMS_JOB_ICON_LORE).toArray()).createCopy(), event -> new ItemsRewardOfferGUI(this.jobBoard, this.messageService, this.playerContainerService, this.rewardService).show(event.getWhoClicked())));
return pane;
}
Aggregations