use of net.minecraft.client.gui.GuiYesNo in project Minestuck by mraof.
the class SylladexGuiHandler method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) throws IOException {
if (button == emptySylladex) {
mc.currentScreen = new GuiYesNo(this, I18n.format("gui.emptySylladex1"), I18n.format("gui.emptySylladex2"), 0);
mc.currentScreen.setWorldAndResolution(mc, width, height);
}
}
use of net.minecraft.client.gui.GuiYesNo in project BetterQuesting by Funwayguy.
the class GuiGameOverBQ method actionPerformed.
protected void actionPerformed(GuiButton button) {
switch(button.id) {
case 0:
this.mc.player.respawnPlayer();
this.mc.displayGuiScreen(null);
break;
case 1:
if (this.mc.world.getWorldInfo().isHardcoreModeEnabled()) {
this.mc.displayGuiScreen(new GuiMainMenu());
} else {
GuiYesNo guiyesno = new GuiYesNo(this, I18n.format("deathScreen.quit.confirm"), "", I18n.format("deathScreen.titleScreen"), I18n.format("deathScreen.respawn"), 0);
this.mc.displayGuiScreen(guiyesno);
guiyesno.setButtonDelay(20);
}
}
}
use of net.minecraft.client.gui.GuiYesNo in project Wurst-MC-1.12 by Wurst-Imperium.
the class AltManagerScreen method initGui.
@Override
public void initGui() {
altList = new GuiAltList(mc, this);
altList.registerScrollButtons(7, 8);
altList.elementClicked(-1, false, 0, 0);
if (GuiAltList.alts.isEmpty() && shouldAsk)
mc.displayGuiScreen(new GuiYesNo(this, "Your alt list is empty.", "Would you like some random alts to get started?", 0));
buttonList.clear();
buttonList.add(new GuiButton(0, width / 2 - 154, height - 52, 100, 20, "Use"));
buttonList.add(new GuiButton(1, width / 2 - 50, height - 52, 100, 20, "Direct Login"));
buttonList.add(new GuiButton(2, width / 2 + 54, height - 52, 100, 20, "Add"));
buttonList.add(new GuiButton(3, width / 2 - 154, height - 28, 75, 20, "Star"));
buttonList.add(new GuiButton(4, width / 2 - 76, height - 28, 74, 20, "Edit"));
buttonList.add(new GuiButton(5, width / 2 + 2, height - 28, 74, 20, "Delete"));
buttonList.add(new GuiButton(6, width / 2 + 80, height - 28, 75, 20, "Cancel"));
buttonList.add(new GuiButton(7, 8, 8, 100, 20, "Import Alts"));
}
use of net.minecraft.client.gui.GuiYesNo in project Wurst-MC-1.12 by Wurst-Imperium.
the class GuiMessage method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) throws IOException {
if (button.id == buttons.entrySet().size()) {
if (cancel.equals("allowed"))
mc.displayGuiScreen(new GuiWurstMainMenu());
else if (cancel.equals("prompt"))
mc.displayGuiScreen(new GuiYesNo(this, "Are you sure you want to cancel?", "", 0));
} else {
MiscUtils.openLink(buttons.get(button.displayString).getAsString());
WurstClient.INSTANCE.analytics.trackEvent("message", "click", "v" + WurstClient.VERSION, button.id);
}
}
use of net.minecraft.client.gui.GuiYesNo in project Wurst-MC-1.12 by Wurst-Imperium.
the class GuiWurstMainMenu method updateScreen.
@Override
public void updateScreen() {
super.updateScreen();
// updater
if (startupMessageDisabled)
return;
if (WurstClient.INSTANCE.updater.isOutdated()) {
WurstClient.INSTANCE.analytics.trackEvent("updater", "update to v" + WurstClient.INSTANCE.updater.getLatestVersion(), "from " + WurstClient.VERSION);
WurstClient.INSTANCE.updater.update();
startupMessageDisabled = true;
}
// emergency message
if (startupMessageDisabled)
return;
try {
HttpsURLConnection connection = (HttpsURLConnection) new URL("https://www.wurstclient.net/api/v1/messages.json").openConnection();
connection.connect();
JsonObject json = JsonUtils.jsonParser.parse(new InputStreamReader(connection.getInputStream(), "UTF-8")).getAsJsonObject();
if (json.get(WurstClient.VERSION) != null) {
System.out.println("Emergency message found!");
mc.displayGuiScreen(new GuiMessage(json.get(WurstClient.VERSION).getAsJsonObject()));
startupMessageDisabled = true;
}
} catch (Exception e) {
e.printStackTrace();
}
// changelog
if (startupMessageDisabled)
return;
if (!WurstClient.VERSION.equals(WurstClient.INSTANCE.options.lastLaunchedVersion)) {
mc.displayGuiScreen(new GuiYesNo(this, "Successfully updated to Wurst v" + WurstClient.VERSION, "", "Go Play", "View Changelog", 64));
WurstClient.INSTANCE.options.lastLaunchedVersion = WurstClient.VERSION;
ConfigFiles.OPTIONS.save();
}
startupMessageDisabled = true;
}
Aggregations