接口 BrowserPagingAPI


public interface BrowserPagingAPI
Gives insight into current states related to GuiResearchBrowser tabs paging. Can also move between pages.
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    getCurrentPage(thaumcraft.client.gui.GuiResearchBrowser gui)
    Get the page index we are currently on.
    Map<String,thaumcraft.api.research.ResearchCategoryList>
    getTabsOnCurrentPage(thaumcraft.client.gui.GuiResearchBrowser gui, String player)
    Get all research tabs on current page
    int
    getTabsPerPage(thaumcraft.client.gui.GuiResearchBrowser gui)
    Get max number of tabs on each page.
    int
    getTotalPages(thaumcraft.client.gui.GuiResearchBrowser gui)
    Get total number of pages available.
    void
    moveNextPage(thaumcraft.client.gui.GuiResearchBrowser gui)
    Move to next page if possible.
    void
    movePreviousPage(thaumcraft.client.gui.GuiResearchBrowser gui)
    Move to previous page if possible.
    void
    setPage(thaumcraft.client.gui.GuiResearchBrowser gui, int page)
    Set the current page to given page.
  • 方法详细资料

    • getTabsOnCurrentPage

      Map<String,thaumcraft.api.research.ResearchCategoryList> getTabsOnCurrentPage(thaumcraft.client.gui.GuiResearchBrowser gui, String player)
      Get all research tabs on current page
      参数:
      gui - gui instance
      player - player name
      返回:
      an unmodifiable view on actual tabs visible. safe to be cached for a given instance of gui.
    • setPage

      void setPage(thaumcraft.client.gui.GuiResearchBrowser gui, int page)
      Set the current page to given page. Page index start at 0.
      参数:
      gui - gui instance
      page - new page index
    • moveNextPage

      void moveNextPage(thaumcraft.client.gui.GuiResearchBrowser gui)
      Move to next page if possible.
      参数:
      gui - gui instance
    • movePreviousPage

      void movePreviousPage(thaumcraft.client.gui.GuiResearchBrowser gui)
      Move to previous page if possible.
      参数:
      gui - gui instance
    • getCurrentPage

      int getCurrentPage(thaumcraft.client.gui.GuiResearchBrowser gui)
      Get the page index we are currently on.
      参数:
      gui - gui instance
      返回:
      current page index
    • getTotalPages

      int getTotalPages(thaumcraft.client.gui.GuiResearchBrowser gui)
      Get total number of pages available. This value might change based on player knowledge.
      参数:
      gui - gui instance
      返回:
      total number of pages
    • getTabsPerPage

      int getTabsPerPage(thaumcraft.client.gui.GuiResearchBrowser gui)
      Get max number of tabs on each page. This value does not change as player switches page, but might change as player resize his game window.
      参数:
      gui - gui instance
      返回:
      tabs per page