From: z411 Date: Thu, 2 Dec 2021 02:29:11 +0000 (-0300) Subject: Fixed formatting issues X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fheads%2Fz411%2Ftos_test;p=xonotic%2Fxonotic-data.pk3dir.git Fixed formatting issues --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc index 8a26235fd..81d089785 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join_termsofservice.qc @@ -20,9 +20,9 @@ void XonoticServerToSTab_loadToS(entity me, string downloadurl) 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) @@ -32,30 +32,26 @@ 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: diff --git a/qcsrc/menu/xonotic/dialog_termsofservice.qc b/qcsrc/menu/xonotic/dialog_termsofservice.qc index 0c28fddf2..885330d93 100644 --- a/qcsrc/menu/xonotic/dialog_termsofservice.qc +++ b/qcsrc/menu/xonotic/dialog_termsofservice.qc @@ -10,17 +10,17 @@ 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) @@ -36,30 +36,26 @@ void XonoticToS_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: @@ -85,21 +81,23 @@ void XonoticToSDialog_fill(entity me) 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; }