use of forestry.core.gui.widgets.WidgetManager in project ForestryMC by ForestryMC.
the class TreeAlyzerPlugin method drawAnalyticsPage3.
@SideOnly(Side.CLIENT)
@Override
public void drawAnalyticsPage3(GuiScreen gui, ItemStack itemStack) {
if (gui instanceof GuiAlyzer) {
GuiAlyzer guiAlyzer = (GuiAlyzer) gui;
ITree tree = TreeManager.treeRoot.getMember(itemStack);
if (tree == null) {
return;
}
TextLayoutHelper textLayout = guiAlyzer.getTextLayout();
WidgetManager widgetManager = guiAlyzer.getWidgetManager();
textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2);
textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.produce") + ":", GuiAlyzer.COLUMN_0);
textLayout.newLine();
int x = GuiAlyzer.COLUMN_0;
for (ItemStack stack : tree.getProducts().keySet()) {
widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack));
x += 18;
if (x > 148) {
x = GuiAlyzer.COLUMN_0;
textLayout.newLine();
}
}
textLayout.newLine();
textLayout.newLine();
textLayout.newLine();
textLayout.newLine();
textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.specialty") + ":", GuiAlyzer.COLUMN_0);
textLayout.newLine();
x = GuiAlyzer.COLUMN_0;
for (ItemStack stack : tree.getSpecialties().keySet()) {
Minecraft.getMinecraft().getRenderItem().renderItemIntoGUI(stack, guiAlyzer.getGuiLeft() + x, guiAlyzer.getGuiTop() + textLayout.getLineY());
x += 18;
if (x > 148) {
x = GuiAlyzer.COLUMN_0;
textLayout.newLine();
}
}
textLayout.endPage();
}
}
use of forestry.core.gui.widgets.WidgetManager in project ForestryMC by ForestryMC.
the class BeeAlyzerPlugin method drawAnalyticsPage3.
@SideOnly(Side.CLIENT)
@Override
public void drawAnalyticsPage3(GuiScreen gui, ItemStack itemStack) {
if (gui instanceof GuiAlyzer) {
GuiAlyzer guiAlyzer = (GuiAlyzer) gui;
IBee bee = BeeManager.beeRoot.getMember(itemStack);
if (bee == null) {
return;
}
TextLayoutHelper textLayout = guiAlyzer.getTextLayout();
WidgetManager widgetManager = guiAlyzer.getWidgetManager();
textLayout.startPage(GuiAlyzer.COLUMN_0, GuiAlyzer.COLUMN_1, GuiAlyzer.COLUMN_2);
textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.produce") + ":", GuiAlyzer.COLUMN_0);
textLayout.newLine();
int x = GuiAlyzer.COLUMN_0;
for (ItemStack stack : bee.getProduceList()) {
widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack));
x += 18;
if (x > 148) {
x = GuiAlyzer.COLUMN_0;
textLayout.newLine();
}
}
textLayout.newLine();
textLayout.newLine();
textLayout.newLine();
textLayout.newLine();
textLayout.drawLine(Translator.translateToLocal("for.gui.beealyzer.specialty") + ":", GuiAlyzer.COLUMN_0);
textLayout.newLine();
x = GuiAlyzer.COLUMN_0;
for (ItemStack stack : bee.getSpecialtyList()) {
widgetManager.add(new ItemStackWidget(widgetManager, x, textLayout.getLineY(), stack));
x += 18;
if (x > 148) {
x = GuiAlyzer.COLUMN_0;
textLayout.newLine();
}
}
textLayout.endPage();
}
}
Aggregations