Search in sources :

Example 1 with GuiBook

use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.

the class GuiCategoryButton method openCategory.

public void openCategory() {
    GuiBook guiBook = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
    guiBook.clearList();
    guiBook.setCurrentGui(this.category);
    Minecraft.getMinecraft().displayGuiScreen(this.category);
}
Also used : GuiBook(com.mart.solar.client.gui.GuiBook)

Example 2 with GuiBook

use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.

the class GuiPage method mouseClicked.

@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
    super.mouseClicked(mouseX, mouseY, mouseButton);
    if (mouseButton == 1) {
        GuiBook playerGui = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
        Minecraft.getMinecraft().displayGuiScreen(playerGui.getPreviousGui());
    }
    this.pageComponents.forEach(pg -> pg.mouseClicked(mouseX, mouseY));
}
Also used : GuiBook(com.mart.solar.client.gui.GuiBook)

Example 3 with GuiBook

use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.

the class PageRitualComponent method mouseClicked.

@Override
public void mouseClicked(int mouseX, int mouseY) {
    if (!this.hovered) {
        return;
    }
    GuiRitualVisualizer ritualVisualizer = new GuiRitualVisualizer(this.ritual);
    GuiBook book = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
    book.setCurrentGui(ritualVisualizer);
    Minecraft.getMinecraft().displayGuiScreen(ritualVisualizer);
}
Also used : GuiRitualVisualizer(com.mart.solar.client.gui.GuiRitualVisualizer) GuiBook(com.mart.solar.client.gui.GuiBook)

Example 4 with GuiBook

use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.

the class BookButton method openPage.

public void openPage() {
    GuiPage newPage = page.getNewInstance();
    GuiBook guiBook = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
    guiBook.setCurrentGui(newPage);
    Minecraft.getMinecraft().displayGuiScreen(newPage);
}
Also used : GuiPage(com.mart.solar.client.gui.pages.GuiPage) GuiBook(com.mart.solar.client.gui.GuiBook)

Aggregations

GuiBook (com.mart.solar.client.gui.GuiBook)4 GuiRitualVisualizer (com.mart.solar.client.gui.GuiRitualVisualizer)1 GuiPage (com.mart.solar.client.gui.pages.GuiPage)1