use of slimeknights.tconstruct.library.client.book.elements.ListingCenteredElement in project TinkersConstruct by SlimeKnights.
the class ContentListingCentered method build.
@Override
public void build(BookData book, ArrayList<BookElement> list, boolean rightSide) {
int yOff = 0;
if (this.title != null) {
this.addTitle(list, this.title, false);
yOff = getTitleHeight();
}
int y = yOff;
int x = 0;
int w = BookScreen.PAGE_WIDTH;
for (TextData data : this.entries) {
int ex = x + w / 2 - book.fontRenderer.width(data.text) / 2;
list.add(new ListingCenteredElement(ex, y, w, 9, data));
y += 9;
}
}
Aggregations