Added Disclaimer to GuiRegister telling users that registering means they agree with ReplayMod.com's Terms of Services
This commit is contained in:
@@ -11,6 +11,8 @@ import eu.crushedpixel.replaymod.api.ApiException;
|
||||
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
|
||||
import eu.crushedpixel.replaymod.utils.EmailAddressUtils;
|
||||
import eu.crushedpixel.replaymod.utils.RegexUtils;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import org.lwjgl.util.Dimension;
|
||||
import org.lwjgl.util.ReadableColor;
|
||||
|
||||
public class GuiRegister extends AbstractGuiScreen<GuiRegister> {
|
||||
@@ -19,6 +21,7 @@ public class GuiRegister extends AbstractGuiScreen<GuiRegister> {
|
||||
private final GuiPasswordField passwordInput, passwordConfirmation;
|
||||
private final GuiButton registerButton = new GuiButton(this).setI18nLabel("replaymod.gui.register").setSize(150, 20).setDisabled();
|
||||
private final GuiButton cancelButton = new GuiButton(this).setI18nLabel("replaymod.gui.cancel").setSize(150, 20);
|
||||
private final GuiLabel disclaimerLabel = new GuiLabel(this).setI18nText(I18n.format("replaymod.gui.register.disclaimer"));
|
||||
private final GuiLabel statusLabel = new GuiLabel(this).setColor(ReadableColor.RED);
|
||||
|
||||
{
|
||||
@@ -50,6 +53,14 @@ public class GuiRegister extends AbstractGuiScreen<GuiRegister> {
|
||||
pos(registerButton, width / 2 - 152, 170);
|
||||
pos(cancelButton, width / 2 + 2, 170);
|
||||
pos(statusLabel, width / 2 - statusLabel.getMinSize().getWidth() / 2, 152);
|
||||
|
||||
int lineCount = getMinecraft().fontRendererObj
|
||||
.listFormattedStringToWidth(disclaimerLabel.getText(), width - 10).size();
|
||||
Dimension dim = new Dimension(width - 10, getMinecraft().fontRendererObj.FONT_HEIGHT*lineCount);
|
||||
disclaimerLabel.setMinSize(dim);
|
||||
disclaimerLabel.setMaxSize(dim);
|
||||
pos(disclaimerLabel, width / 2 - disclaimerLabel.getMinSize().getWidth() / 2,
|
||||
height - disclaimerLabel.getMinSize().getHeight() - 5);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -127,6 +127,8 @@ replaymod.gui.login.connectionerror=Could not connect to ReplayMod.com
|
||||
replaymod.gui.register.title=Register on ReplayMod.com
|
||||
replaymod.gui.register.confirmpw=Confirm Password
|
||||
|
||||
replaymod.gui.register.disclaimer=By registering an account, you agree to the Replay Mod's Terms of Service: https://replaymod.com/legal/terms
|
||||
|
||||
replaymod.gui.register.error.nomatch=Passwords don't match
|
||||
replaymod.gui.register.error.shortusername=Username has to be at least 5 characters long
|
||||
replaymod.gui.register.error.invalidname=Username may only contain letters and numbers
|
||||
|
||||
Reference in New Issue
Block a user