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:
@@ -46,7 +46,7 @@ public class GuiEventHandler {
|
|||||||
if(ReplayMod.firstMainMenu) {
|
if(ReplayMod.firstMainMenu) {
|
||||||
ReplayMod.firstMainMenu = false;
|
ReplayMod.firstMainMenu = false;
|
||||||
if(!AuthenticationHandler.isAuthenticated()) {
|
if(!AuthenticationHandler.isAuthenticated()) {
|
||||||
event.gui = new GuiLoginPrompt(event.gui, event.gui).toMinecraft();
|
event.gui = new GuiLoginPrompt(event.gui, event.gui, false).toMinecraft();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -179,7 +179,7 @@ public class GuiEventHandler {
|
|||||||
if(AuthenticationHandler.isAuthenticated()) {
|
if(AuthenticationHandler.isAuthenticated()) {
|
||||||
mc.displayGuiScreen(new GuiReplayCenter());
|
mc.displayGuiScreen(new GuiReplayCenter());
|
||||||
} else {
|
} else {
|
||||||
mc.displayGuiScreen(new GuiLoginPrompt(event.gui, new GuiReplayCenter()).toMinecraft());
|
mc.displayGuiScreen(new GuiLoginPrompt(event.gui, new GuiReplayCenter(), true).toMinecraft());
|
||||||
}
|
}
|
||||||
} else if(event.button.id == GuiConstants.REPLAY_EDITOR_BUTTON_ID) {
|
} else if(event.button.id == GuiConstants.REPLAY_EDITOR_BUTTON_ID) {
|
||||||
mc.displayGuiScreen(new GuiReplayEditor());
|
mc.displayGuiScreen(new GuiReplayEditor());
|
||||||
|
|||||||
@@ -78,10 +78,16 @@ public class GuiLoginPrompt extends AbstractGuiScreen<GuiLoginPrompt> {
|
|||||||
password.onTextChanged(contentValidation);
|
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.parent = parent;
|
||||||
this.successScreen = successScreen;
|
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>() {
|
setLayout(new CustomLayout<GuiLoginPrompt>() {
|
||||||
@Override
|
@Override
|
||||||
protected void layout(GuiLoginPrompt container, int width, int height) {
|
protected void layout(GuiLoginPrompt container, int width, int height) {
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class GuiReplayCenter extends GuiScreen implements GuiYesNoCallback {
|
|||||||
|
|
||||||
if(!initialized) {
|
if(!initialized) {
|
||||||
if(!AuthenticationHandler.isAuthenticated()) {
|
if(!AuthenticationHandler.isAuthenticated()) {
|
||||||
mc.displayGuiScreen(new GuiLoginPrompt(new GuiMainMenu(), this).toMinecraft());
|
mc.displayGuiScreen(new GuiLoginPrompt(new GuiMainMenu(), this, true).toMinecraft());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Top Button Bar
|
//Top Button Bar
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class GuiUploadFile extends GuiScreen implements ProgressUpdateListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!AuthenticationHandler.isAuthenticated()) {
|
if(!AuthenticationHandler.isAuthenticated()) {
|
||||||
mc.displayGuiScreen(new GuiLoginPrompt(parent, this).toMinecraft());
|
mc.displayGuiScreen(new GuiLoginPrompt(parent, this, true).toMinecraft());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -124,6 +124,8 @@ replaymod.gui.login.logging=Logging in...
|
|||||||
replaymod.gui.login.incorrect=Incorrect username or password
|
replaymod.gui.login.incorrect=Incorrect username or password
|
||||||
replaymod.gui.login.connectionerror=Could not connect to ReplayMod.com
|
replaymod.gui.login.connectionerror=Could not connect to ReplayMod.com
|
||||||
|
|
||||||
|
replaymod.gui.login.skip=Skip
|
||||||
|
|
||||||
replaymod.gui.register.title=Register on ReplayMod.com
|
replaymod.gui.register.title=Register on ReplayMod.com
|
||||||
replaymod.gui.register.confirmpw=Confirm Password
|
replaymod.gui.register.confirmpw=Confirm Password
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user