use of betterquesting.client.gui.editors.GuiQuestLineEditorA in project BetterQuesting by Funwayguy.
the class GuiQuestLines method onButtonPress.
private void onButtonPress(PEventButton event) {
Minecraft mc = Minecraft.getMinecraft();
IPanelButton btn = event.getButton();
if (// Exit
btn.getButtonID() == 0) {
mc.displayGuiScreen(this.parent);
} else if (// Quest Line Select
btn.getButtonID() == 1 && btn instanceof PanelButtonStorage) {
for (PanelButtonStorage b : qlBtns) {
if (b.getStoredValue() == selectedLine) {
b.setBtnState(true);
break;
}
}
@SuppressWarnings("unchecked") IQuestLine ql = ((PanelButtonStorage<IQuestLine>) btn).getStoredValue();
selectedLine = ql;
selectedLineId = QuestLineDatabase.INSTANCE.getKey(ql);
cvQuest.setQuestLine(ql);
paDesc.setText(I18n.format(ql.getUnlocalisedDescription()));
cvDesc.refreshScrollBounds();
scDesc.setEnabled(cvDesc.getScrollBounds().getHeight() > 0);
btn.setBtnState(false);
} else if (// Quest Instance Select
btn.getButtonID() == 2 && btn instanceof PanelButtonStorage) {
@SuppressWarnings("unchecked") IQuest quest = ((PanelButtonStorage<IQuest>) btn).getStoredValue();
GuiHome.bookmark = new GuiQuest(this, QuestDatabase.INSTANCE.getKey(quest));
this.lastScrollX = cvQuest.getScrollX();
this.lastScrollY = cvQuest.getScrollY();
this.lastZoom = cvQuest.getZoom();
mc.displayGuiScreen(GuiHome.bookmark);
} else if (btn.getButtonID() == 3) {
mc.displayGuiScreen(new GuiQuestLineEditorA(this));
}
}
Aggregations