Search in sources :

Example 6 with GuiBigTextField

use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.

the class GuiJsonEntitySelection method initGui.

@Override
public void initGui() {
    super.initGui();
    for (ResourceLocation name : EntityList.getEntityNameList()) {
        entityNames.add(name.toString());
    }
    Collections.sort(entityNames);
    this.searchField = new GuiBigTextField(mc.fontRenderer, guiLeft + sizeX / 2 + 1, guiTop + 33, sizeX / 2 - 18, 14);
    this.searchField.setWatermark(I18n.format("betterquesting.gui.search"));
    this.searchField.setMaxStringLength(Integer.MAX_VALUE);
    btnList = new GuiScrollingButtons(mc, guiLeft + sizeX / 2, guiTop + 48, sizeX / 2 - 16, sizeY - 80);
    this.embedded.add(btnList);
    this.searching = entityNames.iterator();
    this.updateSearch();
}
Also used : ResourceLocation(net.minecraft.util.ResourceLocation) GuiBigTextField(betterquesting.api.client.gui.controls.GuiBigTextField) GuiScrollingButtons(betterquesting.api.client.gui.lists.GuiScrollingButtons)

Example 7 with GuiBigTextField

use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.

the class GuiJsonFluidSelection method initGui.

@Override
public void initGui() {
    super.initGui();
    this.searchBox = new GuiBigTextField(fontRenderer, guiLeft + sizeX / 2 + 9, guiTop + 33, sizeX / 2 - 26, 14);
    this.searchBox.setWatermark(I18n.format("betterquesting.gui.search"));
    this.searchBox.setMaxStringLength(Integer.MAX_VALUE);
    this.fluidGrid = new GuiScrollingFluidGrid(mc, guiLeft + sizeX / 2 + 8, guiTop + 48, sizeX / 2 - 24, sizeY - 80);
    this.embedded.add(fluidGrid);
    numberBox = new GuiNumberField(fontRenderer, guiLeft + 76, guiTop + 57, 100, 16);
    if (stackSelect != null) {
        numberBox.setText("" + stackSelect.amount);
    }
    searching = FluidRegistry.getRegisteredFluids().values().iterator();
}
Also used : GuiNumberField(betterquesting.api.client.gui.controls.GuiNumberField) GuiBigTextField(betterquesting.api.client.gui.controls.GuiBigTextField) GuiScrollingFluidGrid(betterquesting.client.gui.editors.json.scrolling.GuiScrollingFluidGrid)

Example 8 with GuiBigTextField

use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.

the class GuiQuestEditor method initGui.

@Override
public void initGui() {
    super.initGui();
    this.setTitle(I18n.format("betterquesting.title.edit_quest", I18n.format(quest.getUnlocalisedName())));
    if (lastEdit != null) {
        NBTTagCompound prog = new NBTTagCompound();
        quest.writeToNBT(prog, EnumSaveType.PROGRESS);
        quest.readFromNBT(lastEdit, EnumSaveType.CONFIG);
        quest.readFromNBT(prog, EnumSaveType.PROGRESS);
        lastEdit = null;
        SendChanges();
    }
    titleField = new GuiTextField(0, this.fontRenderer, width / 2 - 99, height / 2 - 68 + 1, 198, 18);
    titleField.setMaxStringLength(Integer.MAX_VALUE);
    titleField.setText(quest.getUnlocalisedName());
    descField = new GuiBigTextField(this.fontRenderer, width / 2 - 99, height / 2 - 28 + 1, 198, 18).enableBigEdit(this);
    descField.setMaxStringLength(Integer.MAX_VALUE);
    descField.setText(quest.getUnlocalisedDescription());
    GuiButtonThemed btn = new GuiButtonThemed(1, width / 2, height / 2 + 28, 100, 20, I18n.format("betterquesting.btn.rewards"), true);
    this.buttonList.add(btn);
    btn = new GuiButtonThemed(2, width / 2 - 100, height / 2 + 28, 100, 20, I18n.format("betterquesting.btn.tasks"), true);
    this.buttonList.add(btn);
    btn = new GuiButtonThemed(3, width / 2 - 100, height / 2 + 48, 100, 20, I18n.format("betterquesting.btn.requirements"), true);
    this.buttonList.add(btn);
    btn = new GuiButtonThemed(4, width / 2, height / 2 + 68, 100, 20, I18n.format("betterquesting.btn.advanced"), true);
    this.buttonList.add(btn);
    btnMain = new GuiButtonThemed(5, width / 2 - 100, height / 2 + 8, 200, 20, I18n.format("betterquesting.btn.is_main") + ": " + quest.getProperties().getProperty(NativeProps.MAIN), true);
    this.buttonList.add(btnMain);
    btnLogic = new GuiButtonThemed(6, width / 2, height / 2 + 48, 100, 20, I18n.format("betterquesting.btn.logic") + ": " + quest.getProperties().getProperty(NativeProps.LOGIC_QUEST), true);
    this.buttonList.add(btnLogic);
    btnVis = new GuiButtonThemed(7, width / 2 - 100, height / 2 + 68, 100, 20, I18n.format("betterquesting.btn.show") + ": " + quest.getProperties().getProperty(NativeProps.VISIBILITY), true);
    this.buttonList.add(btnVis);
}
Also used : NBTTagCompound(net.minecraft.nbt.NBTTagCompound) GuiBigTextField(betterquesting.api.client.gui.controls.GuiBigTextField) GuiButtonThemed(betterquesting.api.client.gui.controls.GuiButtonThemed) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 9 with GuiBigTextField

use of betterquesting.api.client.gui.controls.GuiBigTextField 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

GuiBigTextField (betterquesting.api.client.gui.controls.GuiBigTextField)9 GuiButtonThemed (betterquesting.api.client.gui.controls.GuiButtonThemed)7 GuiScrollingButtons (betterquesting.api.client.gui.lists.GuiScrollingButtons)4 GuiNumberField (betterquesting.api.client.gui.controls.GuiNumberField)3 GuiTextField (net.minecraft.client.gui.GuiTextField)2 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)2 GuiButtonJson (betterquesting.api.client.gui.controls.GuiButtonJson)1 TextCallbackJsonArray (betterquesting.client.gui.editors.json.TextCallbackJsonArray)1 TextCallbackJsonObject (betterquesting.client.gui.editors.json.TextCallbackJsonObject)1 GuiScrollingFluidGrid (betterquesting.client.gui.editors.json.scrolling.GuiScrollingFluidGrid)1 GuiScrollingItemGrid (betterquesting.client.gui.editors.json.scrolling.GuiScrollingItemGrid)1 NetHandlerPlayClient (net.minecraft.client.network.NetHandlerPlayClient)1 NetworkPlayerInfo (net.minecraft.client.network.NetworkPlayerInfo)1 NBTPrimitive (net.minecraft.nbt.NBTPrimitive)1 NBTTagString (net.minecraft.nbt.NBTTagString)1 ResourceLocation (net.minecraft.util.ResourceLocation)1