use of net.minecraft.client.gui.screen.multiplayer.MultiplayerWarningScreen in project KiwiClient by TangyKiwi.
the class MainMenu method mouseClicked.
public boolean mouseClicked(double mouseX, double mouseY, int button) {
for (int i = 0; i < 6; i++) {
String b = BUTTONS[i];
GuiButton guiButton = buttonList.get(i);
float x = guiButton.x;
float y = guiButton.y;
if (mouseX >= x - guiButton.width / 2 && mouseY >= y && mouseX <= x + guiButton.width / 2 && mouseY <= y + 60) {
this.client.getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F));
switch(b) {
case "Singleplayer":
this.client.setScreen(new SelectWorldScreen(this));
break;
case "Multiplayer":
Screen screen = this.client.options.skipMultiplayerWarning ? new MultiplayerScreen(this) : new MultiplayerWarningScreen(this);
this.client.setScreen(screen);
break;
case "Realms":
this.client.setScreen(new RealmsMainScreen(this));
break;
case "Options":
this.client.setScreen(new OptionsScreen(this, this.client.options));
break;
case "Language":
this.client.setScreen(new LanguageOptionsScreen(this, this.client.options, this.client.getLanguageManager()));
break;
case "Quit":
this.client.scheduleStop();
break;
}
}
}
return super.mouseClicked(mouseX, mouseY, button);
}
Aggregations