Search in sources :

Example 6 with GuiScrollingButtons

use of betterquesting.api.client.gui.lists.GuiScrollingButtons 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")));
}
Also used : GuiButtonStorage(betterquesting.api.client.gui.controls.GuiButtonStorage) GuiButtonThemed(betterquesting.api.client.gui.controls.GuiButtonThemed) IImporter(betterquesting.api.client.importers.IImporter) GuiScrollingButtons(betterquesting.api.client.gui.lists.GuiScrollingButtons)

Example 7 with GuiScrollingButtons

use of betterquesting.api.client.gui.lists.GuiScrollingButtons in project BetterQuesting by Funwayguy.

the class GuiQuestLineEditorA method initGui.

@Override
public void initGui() {
    super.initGui();
    int btnWidth = sizeX / 2 - 16;
    int sx = sizeX - 32;
    lineTitle = new GuiTextField(0, mc.fontRenderer, guiLeft + sizeX / 2 + 9, guiTop + sizeY / 2 - 59, btnWidth - 18, 18);
    lineTitle.setMaxStringLength(Integer.MAX_VALUE);
    lineDesc = new GuiBigTextField(mc.fontRenderer, guiLeft + sizeX / 2 + 9, guiTop + sizeY / 2 - 19, btnWidth - 18, 18).enableBigEdit(this);
    lineDesc.setMaxStringLength(Integer.MAX_VALUE);
    this.buttonList.add(new GuiButtonThemed(1, guiLeft + 16, guiTop + sizeY - 48, (btnWidth - 16) / 2, 20, I18n.format("betterquesting.btn.new"), true));
    GuiButtonThemed btnImport = new GuiButtonThemed(3, guiLeft + 16 + (btnWidth - 16) / 2, guiTop + sizeY - 48, (btnWidth - 16) / 2, 20, I18n.format("betterquesting.btn.import"), true);
    this.buttonList.add(btnImport);
    this.buttonList.add(new GuiButtonThemed(2, guiLeft + 16 + sx / 4 * 3 - 75, guiTop + sizeY / 2 + 20, 150, 20, I18n.format("betterquesting.btn.add_remove_quests"), true));
    btnDesign = new GuiButtonThemed(4, guiLeft + 16 + sx / 4 * 3 - 75, guiTop + sizeY / 2 + 40, 150, 20, I18n.format("betterquesting.btn.designer"), true);
    this.buttonList.add(btnDesign);
    btnList = new GuiScrollingButtons(mc, guiLeft + 16, guiTop + 32, btnWidth - 8, sizeY - 80);
    this.embedded.add(btnList);
    if (selected != null) {
        lineTitle.setText(selected.getUnlocalisedName());
        lineDesc.setText(selected.getUnlocalisedDescription());
    }
    RefreshColumns();
}
Also used : GuiBigTextField(betterquesting.api.client.gui.controls.GuiBigTextField) GuiButtonThemed(betterquesting.api.client.gui.controls.GuiButtonThemed) GuiTextField(net.minecraft.client.gui.GuiTextField) GuiScrollingButtons(betterquesting.api.client.gui.lists.GuiScrollingButtons)

Aggregations

GuiScrollingButtons (betterquesting.api.client.gui.lists.GuiScrollingButtons)7 GuiBigTextField (betterquesting.api.client.gui.controls.GuiBigTextField)4 GuiButtonThemed (betterquesting.api.client.gui.controls.GuiButtonThemed)4 GuiButtonStorage (betterquesting.api.client.gui.controls.GuiButtonStorage)1 IImporter (betterquesting.api.client.importers.IImporter)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1 ResourceLocation (net.minecraft.util.ResourceLocation)1