use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.
the class GuiRequestPopup method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
buttonList.clear();
buttonList.add(new GuiButton(0, xCenter - 55, bottom - 25, 50, 20, "OK"));
buttonList.add(new GuiButton(1, xCenter + 5, bottom - 25, 50, 20, "Log"));
}
use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.
the class GuiAdvancedExtractor method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
//Default item toggle:
buttonList.clear();
buttonList.add(new GuiStringHandlerButton(0, width / 2 + 20, height / 2 - 34, 60, 20, () -> _advancedExtractor.areItemsIncluded() ? "Included" : "Excluded"));
buttonList.add(new GuiButton(1, width / 2 - 25, height / 2 - 34, 40, 20, "Sneaky"));
}
use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.
the class GuiProvider method initGui.
@SuppressWarnings("unchecked")
@Override
public void initGui() {
super.initGui();
buttonList.clear();
buttonList.add(new GuiStringHandlerButton(0, width / 2 + 40, height / 2 - 59, 45, 20, () -> _provider.isExcludeFilter() ? "Exclude" : "Include"));
/*
buttonList.add(new GuiStringHandlerButton(2, width / 2 + 50, height / 2 - 38, 45, 20, new GuiStringHandlerButton.StringHandler() {
@Override
public String getContent() {
return _provider.isActive() ? "Send" : "Hold";
}
}));
*/
buttonList.add(new GuiButton(1, width / 2 - 90, height / 2 - 41, 38, 20, "Switch"));
}
use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.
the class RequestMonitorPopup method initGui.
@Override
@SuppressWarnings("unchecked")
public void initGui() {
super.initGui();
buttonList.clear();
buttonList.add(new GuiButton(0, width / 2 - 90, height / 2 + 74, 80, 20, "Close"));
buttonList.add(new GuiButton(1, width / 2 + 10, height / 2 + 74, 80, 20, "Save as Image"));
}
use of net.minecraft.client.gui.GuiButton in project AgriCraft by AgriCraft.
the class GuiPeripheral method updateButtons.
private void updateButtons() {
for (int i = 1; i < buttonList.size(); i++) {
Object obj = buttonList.get(i);
if (obj == null) {
continue;
}
GuiButton button = (GuiButton) obj;
if (button instanceof GuiButtonMethod) {
if (!guideActive) {
((GuiButtonMethod) button).disable();
} else {
int index = i - BUTTON_ID_SCROLL_TOP - 1;
if (index >= scrollPosition && index < scrollPosition + BUTTON_AMOUNT) {
((GuiButtonMethod) button).enable(this.guiTop + 8 + 16 * (index - scrollPosition));
} else {
((GuiButtonMethod) button).disable();
}
}
} else {
button.visible = guideActive;
}
}
}
Aggregations