Search in sources :

Example 1 with PageWrapper

use of amerifrance.guideapi.wrapper.PageWrapper in project Guide-API by TeamAmeriFrance.

the class GuiEntry method initGui.

@Override
public void initGui() {
    super.initGui();
    entry.onInit(book, category, null, player, bookStack);
    this.buttonList.clear();
    this.pageWrapperList.clear();
    guiLeft = (this.width - this.xSize) / 2;
    guiTop = (this.height - this.ySize) / 2;
    this.buttonList.add(buttonBack = new ButtonBack(0, guiLeft + xSize / 6, guiTop, this));
    this.buttonList.add(buttonNext = new ButtonNext(1, guiLeft + 4 * xSize / 6, guiTop + 5 * ySize / 6, this));
    this.buttonList.add(buttonPrev = new ButtonPrev(2, guiLeft + xSize / 5, guiTop + 5 * ySize / 6, this));
    for (IPage page : this.entry.pageList) {
        page.onInit(book, category, entry, player, bookStack, this);
        pageWrapperList.add(new PageWrapper(this, book, category, entry, page, guiLeft, guiTop, player, this.fontRenderer, bookStack));
    }
}
Also used : ButtonBack(amerifrance.guideapi.button.ButtonBack) IPage(amerifrance.guideapi.api.IPage) PageWrapper(amerifrance.guideapi.wrapper.PageWrapper) ButtonPrev(amerifrance.guideapi.button.ButtonPrev) ButtonNext(amerifrance.guideapi.button.ButtonNext)

Aggregations

IPage (amerifrance.guideapi.api.IPage)1 ButtonBack (amerifrance.guideapi.button.ButtonBack)1 ButtonNext (amerifrance.guideapi.button.ButtonNext)1 ButtonPrev (amerifrance.guideapi.button.ButtonPrev)1 PageWrapper (amerifrance.guideapi.wrapper.PageWrapper)1