Im changing the main menu by adding 1 custom button but I cannot connect that button with the click event!
Im trying to add a result by clicking! Any help?
My init class:
public class MainMenuGUI extends GuiMainMenu {
private GuiScreenEvent.InitGuiEvent event;
public static GuiButtonExt mod_button;
public MainMenuGUI(GuiScreenEvent.InitGuiEvent e) {
event = e;
run();
}
private void run() {
mod_button = new GuiButtonExt(12, Minecraft.getMinecraft().currentScreen.width / 2 - 100, Minecraft.getMinecraft().currentScreen.height / 2 -55, 200, 20, "Hypixel Party Helper");
if(event.buttonList.size() != 0) {
// 0 IS SINGLEPLAYER
// 1 IS MULTIPLAYER
event.buttonList.get(0).yPosition = 150;
event.buttonList.get(1).yPosition = 175;
event.buttonList.add(mod_button);
}
}
}
But Im trying to add a event to that button but how do I do that?