@Override protected void actionPerformed(GuiButton button) throws IOException { if (button.id == 200) { if (list.selected != -1) { IGuiListEntry e = list.getListEntry(list.selected); Research res = null; if (e instanceof ResearchEntry) { res = ((ResearchEntry) e).button.research; } sendButtonUpdate(5, te, ResearchHandler.getId(res)); } this.mc.displayGuiScreen(this.parent); } else if (button.id == 201) { this.mc.displayGuiScreen(this.parent); } }
@Override protected void actionPerformed(GuiButton button) { IGuiListEntry entry = alarmList.getListEntry(alarmList.getSelected()); if (button.enabled) { switch (button.id) { case 0: if (entry == null) break; case 1: mc.displayGuiScreen(new GuiScreenEditAlarm(this, ((button.id == 0 && entry instanceof GuiAlarmEntry) ? (((GuiAlarmEntry) entry).getAlarm()) : null), button.id == 1)); break; case 2: if (entry instanceof GuiAlarmEntry) mc.displayGuiScreen(new GuiYesNo( this, StatCollector.translateToLocal("gui.alarmConfig.delete.question"), StatCollector.translateToLocalFormatted(((GuiAlarmEntry) entry).getAlarm().getTitle()), alarmList.getSelected())); break; default: mc.displayGuiScreen(parent); } } }
private ServerData getServerData(final GuiMultiplayer mpgui, final int index) { if (index<0) return null; final IGuiListEntry guilistextended$iguilistentry = this.compat.getListEntry(mpgui, index); if (guilistextended$iguilistentry instanceof ServerListEntryNormal) return this.compat.getServerData((ServerListEntryNormal) guilistextended$iguilistentry); return null; }
@Override public IGuiListEntry getListEntry(final GuiMultiplayer mpgui, final int index) { return mpgui.serverListSelector.getListEntry(index); }
@Override public IGuiListEntry getListEntry(final GuiMultiplayer mpgui, final int index) { return mpgui.field_146803_h.getListEntry(index); }
@Override public IGuiListEntry getListEntry(int index) { return this.researchList.get(index); }
@Override public IGuiListEntry getListEntry(int slot) { return entries.get(slot); }
IGuiListEntry getListEntry(GuiMultiplayer mpgui, int index);