use of net.minecraftforge.fml.client.config.GuiCheckBox in project Cavern2 by kegare.
the class GuiSelectItem method initGui.
@Override
public void initGui() {
if (itemList == null) {
itemList = new ItemList();
}
itemList.setDimensions(width, height, 32, height - 28);
if (doneButton == null) {
doneButton = new GuiButtonExt(0, 0, 0, 145, 20, I18n.format("gui.done"));
}
doneButton.x = width / 2 + 10;
doneButton.y = height - doneButton.height - 4;
if (detailInfo == null) {
detailInfo = new GuiCheckBox(1, 0, 5, I18n.format(Config.LANG_KEY + "detail"), true);
}
detailInfo.setIsChecked(CaveConfigGui.detailInfo);
detailInfo.x = width / 2 + 95;
if (instantFilter == null) {
instantFilter = new GuiCheckBox(2, 0, detailInfo.y + detailInfo.height + 2, I18n.format(Config.LANG_KEY + "instant"), true);
}
instantFilter.setIsChecked(CaveConfigGui.instantFilter);
instantFilter.x = detailInfo.x;
buttonList.clear();
buttonList.add(doneButton);
buttonList.add(detailInfo);
buttonList.add(instantFilter);
if (filterTextField == null) {
filterTextField = new GuiTextField(0, fontRenderer, 0, 0, 150, 16);
filterTextField.setMaxStringLength(100);
}
filterTextField.x = width / 2 - filterTextField.width - 5;
filterTextField.y = height - filterTextField.height - 6;
selectedHoverChecker = new HoverChecker(0, 20, 0, 100, 800);
detailHoverChecker = new HoverChecker(detailInfo, 800);
instantHoverChecker = new HoverChecker(instantFilter, 800);
}
Aggregations