Posted September 29, 201510 yr Hi, I have some noob questions. Problem #1 solved itself somehow!? To identify the buttons in the GUI I can do something like this: if(button.displayString.contains("Difficulty")) { button.enabled = false; } But this fails when the user has changed his language. How can I identify the buttons more reliably? Forge version is 1517 so I'm still in 1.7.10.
September 30, 201510 yr Could you not just save the buttons as variables? or use the button id's? No signature for you!
September 30, 201510 yr Buttons have IDs. this.buttonList.add(new GuiButton(id, x, y, width, height, "NameOrLangLink")); You can: if (guiButton.id == 1) { do } 1.7.10 is no longer supported by forge, you are on your own.
September 30, 201510 yr Author Thank you for your answers. I don't try to access my own button (that would be easier), I want to access the regular Minecraft GUI. The ID of the buttons are not unique so I cannot use "button.id". Nevermind, I just did it wrong! It works now, thank you!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.