This commit is contained in:
samuncle 2014-11-13 18:02:49 +01:00
commit bd9823dbbe
3 changed files with 28 additions and 32 deletions

View File

@ -8,70 +8,57 @@
<box proportion="1" width="100%" height="100%" layout="vertical-row">
<div width="90%" align="center" layout="vertical-row" height="80%">
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Local Username"/>
<textbox id="local_username" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_online" proportion="1" height="100%" text_align="left"
I18N="In the login screen" text="Create online account"/>
<checkbox id="online" I18N="In the login screen" text_align="left"/>
</div>
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_username" proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Online Username"/>
<textbox id="username" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<spacer height="20" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_password" proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Password"/>
<textbox id="password" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<spacer height="20" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_password_confirm" proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Confirm"/>
<textbox id="password_confirm" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<spacer height="20" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_email" proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Email"/>
<textbox id="email" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<spacer height="20" width="20"/>
<div width="100%" height="fit" layout="horizontal-row" >
<!--
<div width="100%" height="12%" layout="horizontal-row" >
<label id="label_email_confirm" proportion="1" height="100%" text_align="left"
I18N="In the registration dialog" text="Confirm"/>
<textbox id="email_confirm" proportion="2" height="fit" I18N="In the registration dialog"/>
</div>
<spacer height="30" width="50"/>
-->
<label id="info" height="20%" width="100%" align="center" text_align="center" word_wrap="true"
I18N="In the registration dialog"
text="You can play without creating an online account by unchecking the online checkbox, though then you can not connect to friends, vote for addons etc. You can also use an existing SuperTuxKart Addons account in the next screen if you already have one. Please read our privacy statement at http://privacy.supertuxkart.net"/>
<spacer height="20" width="50"/>
</div>
<spacer height="20" width="50"/>
<buttonbar id="options" width="25%" height="14%" align="center">
<icon-button id="next" width="64" height="64" icon="gui/green_check.png"
<buttonbar id="options" width="40%" height="15%" align="center">
<icon-button id="next" width="50%" height="90%" icon="gui/green_check.png"
I18N="Registration dialog" text="OK" label_location="none"/>
<icon-button id="cancel" width="64" height="64" icon="gui/main_quit.png"
<icon-button id="cancel" width="50%" height="90%" icon="gui/main_quit.png"
I18N="Registration dialog" text="Cancel" label_location="none"/>
</buttonbar>
</box>

View File

@ -213,10 +213,10 @@ void IrrDriver::renderLightsScatter(unsigned pointlightcount)
glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, pointlightcount);
glDisable(GL_BLEND);
m_post_processing->renderGaussian6Blur(getFBO(FBO_HALF1), getFBO(FBO_HALF2), 5., 5.);
// glDisable(GL_BLEND);
// m_post_processing->renderGaussian6Blur(getFBO(FBO_HALF1), getFBO(FBO_HALF2), 5., 5.);
glEnable(GL_BLEND);
// glEnable(GL_BLEND);
getFBO(FBO_COLORS).Bind();
m_post_processing->renderPassThrough(getRenderTargetTexture(RTT_HALF1));
}

View File

@ -137,8 +137,11 @@ void RegisterScreen::makeEntryFieldsVisible(bool online)
getWidget<LabelWidget >("label_password_confirm")->setVisible(online);
getWidget<TextBoxWidget>("email")->setVisible(online);
getWidget<LabelWidget >("label_email")->setVisible(online);
getWidget<TextBoxWidget>("email_confirm")->setVisible(online);
getWidget<LabelWidget >("label_email_confirm")->setVisible(online);
if(getWidget<TextBoxWidget>("email_confirm"))
{
getWidget<TextBoxWidget>("email_confirm")->setVisible(online);
getWidget<LabelWidget >("label_email_confirm")->setVisible(online);
}
} // makeEntryFieldsVisible
// -----------------------------------------------------------------------------
@ -208,9 +211,14 @@ void RegisterScreen::doRegister()
stringw password_confirm = getWidget<TextBoxWidget>("password_confirm")
->getText().trim();
stringw email = getWidget<TextBoxWidget>("email")->getText().trim();
stringw email_confirm = getWidget<TextBoxWidget>("email_confirm")
->getText().trim();
// If there is an email_confirm field, use it and check if the email
// address is correct. If there is no such field, set the confirm email
// address to email address (so the test below will be passed).
stringw email_confirm = getWidget<TextBoxWidget>("email_confirm")
? getWidget<TextBoxWidget>("email_confirm")->getText()
: getWidget<TextBoxWidget>("email")->getText();
email_confirm.trim();
m_info_widget->setErrorColor();
if (password != password_confirm)
@ -306,6 +314,7 @@ void RegisterScreen::onUpdate(float dt)
else
{
// Error signing up, display error message
m_info_widget->setErrorColor();
m_info_widget->setText(m_signup_request->getInfo(), false);
}
delete m_signup_request;