When initially asked to Log in, rename "Cancel" to "Skip" button to indicate that the user doesn't have to log in in order to use the mod
This commit is contained in:
@@ -78,10 +78,16 @@ public class GuiLoginPrompt extends AbstractGuiScreen<GuiLoginPrompt> {
|
||||
password.onTextChanged(contentValidation);
|
||||
}
|
||||
|
||||
public GuiLoginPrompt(net.minecraft.client.gui.GuiScreen parent, net.minecraft.client.gui.GuiScreen successScreen) {
|
||||
public GuiLoginPrompt(net.minecraft.client.gui.GuiScreen parent,
|
||||
net.minecraft.client.gui.GuiScreen successScreen, boolean manuallyTriggered) {
|
||||
this.parent = parent;
|
||||
this.successScreen = successScreen;
|
||||
|
||||
//if the login prompt was opened automatically (on mod startup), show a "skip" instead of "cancel" button
|
||||
if(!manuallyTriggered) {
|
||||
cancelButton.setI18nLabel("replaymod.gui.login.skip");
|
||||
}
|
||||
|
||||
setLayout(new CustomLayout<GuiLoginPrompt>() {
|
||||
@Override
|
||||
protected void layout(GuiLoginPrompt container, int width, int height) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
||||
|
||||
if(!initialized) {
|
||||
if(!AuthenticationHandler.isAuthenticated()) {
|
||||
mc.displayGuiScreen(new GuiLoginPrompt(new GuiMainMenu(), this).toMinecraft());
|
||||
mc.displayGuiScreen(new GuiLoginPrompt(new GuiMainMenu(), this, true).toMinecraft());
|
||||
}
|
||||
|
||||
//Top Button Bar
|
||||
|
||||
@@ -135,7 +135,7 @@ public class GuiUploadFile extends GuiScreen implements ProgressUpdateListener {
|
||||
}
|
||||
|
||||
if(!AuthenticationHandler.isAuthenticated()) {
|
||||
mc.displayGuiScreen(new GuiLoginPrompt(parent, this).toMinecraft());
|
||||
mc.displayGuiScreen(new GuiLoginPrompt(parent, this, true).toMinecraft());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user