use of binnie.core.gui.Widget in project Binnie by ForestryMC.
the class WindowAnalyst method initialiseClient.
@Override
@SideOnly(Side.CLIENT)
public void initialiseClient() {
setTitle(isDatabase ? (isMaster ? I18N.localise("genetics.gui.registry.master.title") : I18N.localise("genetics.gui.registry.title")) : I18N.localise("genetics.gui.analyst.title"));
getWindowInventory().createSlot(0);
baseWidget = new Widget(this);
int x = 16;
int y = 28;
Collection<IBreedingSystem> activeSystems = Binnie.GENETICS.getActiveSystems();
if (isDatabase) {
for (IBreedingSystem syst : activeSystems) {
new ControlSystemButton(x, y, this, syst);
x += 22;
}
} else {
new ControlSlot.Builder(this, x, y + 1).assign(InventoryType.WINDOW, 0);
x += 22;
new ControlSlot.Builder(this, x, y + 1).assign(InventoryType.WINDOW, 1);
x += 26;
setupValidators();
}
tabBar = new Control(this, x, 28, getWidth() - 16 - x, 20);
analystPanel = new AnalystPanel(this);
if (!isDatabase) {
slideUpInv = new ControlSlide(this, (getSize().xPos() - 244) / 2, getSize().yPos() - 80 + 1, 244, 80, Alignment.BOTTOM);
new ControlPlayerInventory(slideUpInv, true);
slideUpInv.setSlide(false);
}
addEventHandler(EventKey.Down.class, event -> {
if (event.getKey() == 205) {
shiftPages(true);
}
if (event.getKey() == 203) {
shiftPages(false);
}
});
if (!isDatabase) {
analystNone = new AnalystNoneControl(this);
}
setIndividual(null);
IBreedingSystem first = Binnie.GENETICS.getFirstActiveSystem();
setSystem(first);
}
Aggregations