use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.
the class GuiPrerequisiteEditor method initGui.
@Override
public void initGui() {
super.initGui();
if (quest == null) {
mc.displayGuiScreen(parent);
}
int btnWidth = sizeX / 2 - 16;
int sx = sizeX - 32;
this.searchBox = new GuiBigTextField(mc.fontRenderer, guiLeft + sizeX / 2 + 8, guiTop + 48, btnWidth - 16, 20);
this.searchBox.setWatermark(I18n.format("betterquesting.gui.search"));
this.buttonList.add(new GuiButtonThemed(1, guiLeft + 16 + sx / 4 * 3 - 50, guiTop + sizeY - 48, 100, 20, I18n.format("betterquesting.btn.new"), true));
prBtnList = new GuiScrollingButtons(mc, guiLeft + 16, guiTop + 48, btnWidth - 8, sizeY - 96);
dbBtnList = new GuiScrollingButtons(mc, guiLeft + sizeX / 2 + 8, guiTop + 68, btnWidth - 8, sizeY - 116);
this.embedded.add(prBtnList);
this.embedded.add(dbBtnList);
RefreshSearch();
RefreshColumns();
}
use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.
the class GuiQuestLineEditorB method initGui.
@Override
public void initGui() {
super.initGui();
int btnWidth = sizeX / 2 - 16;
int sx = sizeX - 32;
this.searchBox = new GuiBigTextField(mc.fontRenderer, guiLeft + sizeX / 2 + 9, guiTop + 49, btnWidth - 18, 18);
this.searchBox.setWatermark(I18n.format("betterquesting.gui.search"));
this.buttonList.add(new GuiButtonThemed(1, guiLeft + 16 + sx / 4 * 3 - 50, guiTop + sizeY - 48, 100, 20, I18n.format("betterquesting.btn.new"), true));
qlBtnList = new GuiScrollingButtons(mc, guiLeft + 16, guiTop + 48, btnWidth - 8, sizeY - 96);
dbBtnList = new GuiScrollingButtons(mc, guiLeft + sizeX / 2 + 8, guiTop + 68, btnWidth - 8, sizeY - 116);
this.embedded.add(qlBtnList);
this.embedded.add(dbBtnList);
RefreshSearch();
RefreshColumns();
}
use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.
the class GuiPartyInvite method initGui.
@Override
public void initGui() {
super.initGui();
maxRows = (sizeY - 92) / 20;
NetHandlerPlayClient nethandlerplayclient = mc.player.connection;
playerList.clear();
playerList.addAll(NameCache.INSTANCE.getAllNames());
for (NetworkPlayerInfo info : nethandlerplayclient.getPlayerInfoMap()) {
if (!playerList.contains(info.getGameProfile().getName())) {
playerList.add(info.getGameProfile().getName());
}
}
this.txtManual = new GuiBigTextField(this.fontRenderer, guiLeft + sizeX / 2 - 149, guiTop + 33, 198, 18);
this.txtManual.setWatermark("Username");
this.btnManual = new GuiButtonThemed(this.buttonList.size(), guiLeft + sizeX / 2 + 50, guiTop + 32, 100, 20, I18n.format("betterquesting.btn.party_invite"), true);
this.buttonList.add(btnManual);
for (int i = 0; i < maxRows * 3; i++) {
GuiButtonThemed btn = new GuiButtonThemed(this.buttonList.size(), guiLeft + sizeX / 2 - 150 + ((i % 3) * 100), guiTop + 68 + (i / 3 * 20), 100, 20, "Username", true);
this.buttonList.add(btn);
}
RefreshColumns();
}
use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.
the class ScrollingJsonEntry method setupEntry.
public void setupEntry(int px, int width) {
btnList.clear();
int margin = px + (width / 3);
int ctrlSpace = MathHelper.ceil((width / 3F) * 2F);
int n = 0;
if (allowEdit && je != null) {
n = 20;
btnDel = new GuiButtonThemed(3, px + width - n, 0, 20, 20, "x");
btnDel.packedFGColour = Color.RED.getRGB();
btnList.add(btnDel);
}
if (allowEdit) {
n = 40;
btnAdd = new GuiButtonThemed(2, px + width - n, 0, 20, 20, "+");
btnAdd.packedFGColour = Color.GREEN.getRGB();
btnList.add(btnAdd);
}
if (je == null) {
return;
} else if (je.getId() == 9) {
btnMain = new GuiButtonJson<NBTTagList>(0, margin, 0, ctrlSpace - n, 20, (NBTTagList) je, false);
btnList.add(btnMain);
} else if (je.getId() == 10) {
NBTTagCompound jo = (NBTTagCompound) je;
if (JsonHelper.isItem(jo) || JsonHelper.isFluid(jo) || JsonHelper.isEntity(jo)) {
n += 20;
btnAdv = new GuiButtonThemed(1, px + width - n, 0, 20, 20, "...");
btnList.add(btnAdv);
}
btnMain = new GuiButtonJson<NBTTagCompound>(0, margin, 0, ctrlSpace - n, 20, jo, false);
btnList.add(btnMain);
} else if (je instanceof NBTPrimitive) {
NBTPrimitive jp = (NBTPrimitive) je;
/*if(jp.isBoolean())
{
btnMain = new GuiButtonJson<JsonPrimitive>(0, margin, 0, ctrlSpace - n, 20, jp, false);
btnList.add(btnMain);
} else if(jp.isNumber())*/
{
GuiNumberField num = new GuiNumberField(mc.fontRenderer, margin + 1, 0, ctrlSpace - n - 2, 18);
num.setMaxStringLength(Integer.MAX_VALUE);
num.setText("" + jp.getDouble());
txtMain = num;
}
// else
} else if (je.getId() == 8) {
NBTTagString jp = (NBTTagString) je;
GuiBigTextField txt = new GuiBigTextField(mc.fontRenderer, margin + 1, 1, ctrlSpace - n - 2, 18);
txt.setMaxStringLength(Integer.MAX_VALUE);
txt.setText(jp.getString());
if (json.getId() == 10) {
txt.enableBigEdit(new TextCallbackJsonObject((NBTTagCompound) json, key));
} else if (json.getId() == 9) {
txt.enableBigEdit(new TextCallbackJsonArray((NBTTagList) json, idx));
}
txtMain = txt;
}
}
use of betterquesting.api.client.gui.controls.GuiBigTextField in project BetterQuesting by Funwayguy.
the class GuiJsonItemSelection method initGui.
@Override
public void initGui() {
super.initGui();
this.searchBox = new GuiBigTextField(this.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.itemGrid = new GuiScrollingItemGrid(mc, guiLeft + sizeX / 2 + 8, guiTop + 48, sizeX / 2 - 24, sizeY - 80);
this.embedded.add(itemGrid);
numberBox = new GuiNumberField(fontRenderer, guiLeft + 77, guiTop + 49, 98, 14);
if (stackSelect != null) {
numberBox.setText("" + stackSelect.stackSize);
}
searching = Item.REGISTRY.iterator();
btnOreDict = new GuiButtonThemed(3, guiLeft + 76, guiTop + 64, 100, 20, "OreDict: " + (stackSelect.oreDict.length() <= 0 ? "NONE" : stackSelect.oreDict), true);
this.buttonList.add(btnOreDict);
}
Aggregations