Package vazkii.botania.api.lexicon

Examples of vazkii.botania.api.lexicon.LexiconPage


    buttonList.add(backButton = new GuiButtonBackWithShift(0, left + guiWidth / 2 - 8, top + guiHeight + 2));
    buttonList.add(leftButton = new GuiButtonPage(1, left, top + guiHeight - 10, false));
    buttonList.add(rightButton = new GuiButtonPage(2, left + guiWidth - 18, top + guiHeight - 10, true));
    buttonList.add(shareButton = new GuiButtonShare(3, left + guiWidth - 6, top - 2));

    LexiconPage page = entry.pages.get(this.page);
    page.onOpened(this);
    updatePageButtons();
  }
View Full Code Here


    return false;
  }

  @Override
  protected void actionPerformed(GuiButton par1GuiButton) {
    LexiconPage currentPage = entry.pages.get(page);
    LexiconPage newPage;

    if(par1GuiButton.id >= BOOKMARK_START)
      handleBookmark(par1GuiButton);
    else
      switch(par1GuiButton.id) {
      case 0 :
        currentPage.onClosed(this);
        mc.displayGuiScreen(GuiScreen.isShiftKeyDown() ? new GuiLexicon() : parent);
        ClientTickHandler.notifyPageChange();
        break;
      case 1 :
        currentPage.onClosed(this);
        page--;
        newPage = entry.pages.get(page);
        newPage.onOpened(this);

        ClientTickHandler.notifyPageChange();
        break;
      case 2 :
        currentPage.onClosed(this);
        page++;
        newPage = entry.pages.get(page);
        newPage.onOpened(this);

        ClientTickHandler.notifyPageChange();
        break;
      case 3 :
        Minecraft mc = Minecraft.getMinecraft();
View Full Code Here

  @Override
  public void drawScreen(int par1, int par2, float par3) {
    super.drawScreen(par1, par2, par3);

    LexiconPage page = entry.pages.get(this.page);
    page.renderScreen(this, par1, par2);
  }
View Full Code Here

    page.renderScreen(this, par1, par2);
  }

  @Override
  public void updateScreen() {
    LexiconPage page = entry.pages.get(this.page);
    page.updateScreen(this);
  }
View Full Code Here

      prevPage();
  }

  @Override
  protected void keyTyped(char par1, int par2) {
    LexiconPage page = entry.pages.get(this.page);
    page.onKeyPressed(par1, par2);

    if(par2 == 203 || par2 == 200 || par2 == 201) // Left, Up, Page Up
      prevPage();
    else if(par2 == 205 || par2 == 208 || par2 == 209) // Right, Down Page Down
      nextPage();
View Full Code Here

TOP

Related Classes of vazkii.botania.api.lexicon.LexiconPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.