День добрый. Трабл в том что в созданное гуи не добавляются кнопки (точнее просто не отображаются).
Файл гуи:
Так это выглядит в игре:
В чем ошибка?
Файл гуи:
Код:
public class chooseGodGui extends GuiScreen
{
public chooseGodGui(){
super();
}
@Override
public void initGui() {
super.initGui();
this.buttonList.add(new GuiButton(1, width / 2 + 2, height / 2 + 2, 98, 20, "First" ));
this.buttonList.add(new GuiButton(2, width / 2 + 100, height / 2 + 2, 98, 20, "Second" ));
}
protected void actionPerformed(GuiButton guibutton)
{
}
@Override
public boolean doesGuiPauseGame()
{
return false;
}
protected void keyTyped(char par1, int par2){
if (par2 == 1 || par2 == this.mc.gameSettings.keyBindInventory.keyCode)
{
this.mc.thePlayer.closeScreen();
}
}
public void drawScreen(int par1, int par2, float par3){
drawDefaultBackground();
drawCenteredString(fontRenderer, "Test", width / 2, 45, 0x99FF00);
}
}
В чем ошибка?