void XonoticServerToSTab_fill(entity me)
{
entity e;
- me.TR(me);
- me.TD(me, me.rows, me.columns, e = makeXonoticTextBox());
- me.textBox = e;
+ me.TR(me);
+ me.TD(me, me.rows, me.columns, e = makeXonoticTextBox());
+ me.textBox = e;
}
void AdditionalServerInfo_OnGet(entity fh, entity me, int status)
{
break;
}
- case URL_READY_ERROR:
- {
- me.text = strzone("Error reading ToS");
- me.textBox.setText(me.textBox, me.text);
- break;
- }
+ case URL_READY_ERROR:
+ {
+ me.text = strzone("Error reading ToS");
+ me.textBox.setText(me.textBox, me.text);
+ break;
+ }
case URL_READY_CANREAD:
{
- strfree(me.text);
- string temp = "";
+ strfree(me.text);
+ string temp = "";
for (string s; (s = url_fgets(fh)); )
{
- if (temp != "")
- {
- temp = strcat(temp, "\n", s);
- }
- else
- {
- temp = s;
- }
+ if (temp != "")
+ temp = strcat(temp, "\n", s);
+ else
+ temp = s;
}
url_fclose(fh);
- me.text = strzone(temp);
- me.textBox.setText(me.textBox, me.text);
+ me.text = strzone(temp);
+ me.textBox.setText(me.textBox, me.text);
break;
}
default:
void Close_Clicked(entity btn, entity me)
{
- LOG_INFOF("Accepted ToS version %d", _Nex_ExtResponseSystem_NewToS);
- cvar_set("_termsofservice_accepted", ftos(_Nex_ExtResponseSystem_NewToS));
- localcmd("saveconfig");
- if (main.firstRunDialog.shouldShow())
- main.firstDraw = true;
- Dialog_Close(btn, me);
+ LOG_INFOF("Accepted ToS version %d", _Nex_ExtResponseSystem_NewToS);
+ cvar_set("_termsofservice_accepted", ftos(_Nex_ExtResponseSystem_NewToS));
+ localcmd("saveconfig");
+ if (main.firstRunDialog.shouldShow())
+ main.firstDraw = true;
+ Dialog_Close(btn, me);
}
void DontAccept_Clicked(entity btn, entity me)
{
- localcmd("quit");
+ localcmd("quit");
}
void XonoticToSDialog_loadXonoticToS(entity me)
{
break;
}
- case URL_READY_ERROR:
- {
- me.text = strzone("Error reading ToS");
- me.textBox.setText(me.textBox, me.text);
- break;
- }
+ case URL_READY_ERROR:
+ {
+ me.text = strzone("Error reading ToS");
+ me.textBox.setText(me.textBox, me.text);
+ break;
+ }
case URL_READY_CANREAD:
{
- strfree(me.text);
- string temp = "";
+ strfree(me.text);
+ string temp = "";
for (string s; (s = url_fgets(fh)); )
{
- if (temp != "")
- {
- temp = strcat(temp, "\n", s);
- }
- else
- {
- temp = s;
- }
+ if (temp != "")
+ temp = strcat(temp, "\n", s);
+ else
+ temp = s;
}
url_fclose(fh);
- me.text = strzone(temp);
- me.textBox.setText(me.textBox, me.text);
+ me.text = strzone(temp);
+ me.textBox.setText(me.textBox, me.text);
break;
}
default:
subtitle = _("Welcome to Xonotic! Please read the following Terms of Service:");
me.TR(me);
- me.TD(me, 1, 5, e = makeXonoticTextLabel(0, subtitle));
- e.allowWrap = 1;
+ me.TD(me, 1, 5, e = makeXonoticTextLabel(0, subtitle));
+ e.allowWrap = 1;
- me.TR(me);
me.TR(me);
- me.TD(me, me.rows - 4, me.columns, me.textBox = makeXonoticTextBox());
- me.loadXonoticToS(me);
+ me.TR(me);
+ me.TD(me, me.rows - 4, me.columns, me.textBox = makeXonoticTextBox());
+ me.loadXonoticToS(me);
- me.TR(me);
+ me.TR(me);
me.gotoRC(me, me.rows - 1, 0);
- me.TD(me, 1, me.columns/2, e = makeXonoticButton(_("Accept"), '0 0 0'));
- e.onClick = Close_Clicked;
- e.onClickEntity = me;
- me.TD(me, 1, me.columns/2, e = makeXonoticButton(_("Don't accept (quit the game)"), '0 0 0'));
- e.onClick = DontAccept_Clicked;
- e.onClickEntity = me;
+
+ me.TD(me, 1, me.columns/2, e = makeXonoticButton(_("Accept"), '0 0 0'));
+ e.onClick = Close_Clicked;
+ e.onClickEntity = me;
+
+ me.TD(me, 1, me.columns/2, e = makeXonoticButton(_("Don't accept (quit the game)"), '0 0 0'));
+ e.onClick = DontAccept_Clicked;
+ e.onClickEntity = me;
}