use of betterquesting.api.client.importers.IImporter in project BetterQuesting by Funwayguy.
the class GuiImporters method mouseClicked.
@Override
public void mouseClicked(int mx, int my, int click) throws IOException {
super.mouseClicked(mx, my, click);
GuiButtonThemed btn = this.btnList.getButtonUnderMouse(mx, my);
if (click == 0 && btn != null && btn.mousePressed(mc, mx, my)) {
btn.playPressSound(mc.getSoundHandler());
@SuppressWarnings("unchecked") IImporter imp = ((GuiButtonStorage<IImporter>) btn).getStored();
this.selected = imp;
if (impGui != null) {
this.embedded.remove(impGui);
}
impGui = new GuiImporterEmbedded(imp, guiLeft + sizeX / 2 + 8, guiTop + 32, sizeX / 2 - 24, sizeY - 84);
this.embedded.add(impGui);
}
}
use of betterquesting.api.client.importers.IImporter in project BetterQuesting by Funwayguy.
the class GuiImporters method initGui.
@Override
public void initGui() {
super.initGui();
btnList = new GuiScrollingButtons(mc, guiLeft + 16, guiTop + 32, sizeX / 2 - 24, sizeY - 64);
for (IImporter imp : ImporterRegistry.INSTANCE.getImporters()) {
GuiButtonStorage<IImporter> btnImp = new GuiButtonStorage<IImporter>(0, 0, 0, btnList.getListWidth(), 20, I18n.format(imp.getUnlocalisedName()));
btnImp.setStored(imp);
btnList.addButtonRow(btnImp);
}
this.embedded.add(btnList);
int btnX = guiLeft + 16 + ((sizeX - 32) / 4) * 3 - 50;
this.buttonList.add(new GuiButtonThemed(1, btnX, guiTop + sizeY - 52, 100, 20, I18n.format("betterquesting.btn.import")));
}
Aggregations