Xonotic
dialog_multiplayer_join_termsofservice.qc File Reference
+ Include dependency graph for dialog_multiplayer_join_termsofservice.qc:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void AdditionalServerInfo_OnGet (entity fh, entity me, int status)
 
entity makeXonoticServerToSTab ()
 
void XonoticServerToSTab_fill (entity me)
 
void XonoticServerToSTab_loadToS (entity me, string downloadurl)
 

Function Documentation

◆ AdditionalServerInfo_OnGet()

void AdditionalServerInfo_OnGet ( entity  fh,
entity  me,
int  status 
)

Definition at line 28 of file dialog_multiplayer_join_termsofservice.qc.

References strcat(), strfree, strzone(), url_fclose(), url_fgets(), URL_READY_CANREAD, URL_READY_CLOSED, and URL_READY_ERROR.

Referenced by XonoticServerToSTab_loadToS().

29 {
30  switch (status) {
31  case URL_READY_CLOSED:
32  {
33  break;
34  }
35  case URL_READY_ERROR:
36  {
37  me.text = strzone("Error reading ToS");
38  me.textBox.setText(me.textBox, me.text);
39  break;
40  }
41  case URL_READY_CANREAD:
42  {
43  strfree(me.text);
44  string temp = "";
45  for (string s; (s = url_fgets(fh)); )
46  {
47  if (temp != "")
48  temp = strcat(temp, "\n", s);
49  else
50  temp = s;
51  }
52  url_fclose(fh);
53  me.text = strzone(temp);
54  me.textBox.setText(me.textBox, me.text);
55  break;
56  }
57  default:
58  {
59  break;
60  }
61  }
62 }
const float URL_READY_CANREAD
Definition: urllib.qh:17
const float URL_READY_CLOSED
Definition: urllib.qh:15
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
ERASEABLE void url_fclose(entity e)
Definition: urllib.qc:207
const float URL_READY_ERROR
Definition: urllib.qh:14
#define strfree(this)
Definition: string.qh:56
ERASEABLE string url_fgets(entity e)
Definition: urllib.qc:287
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ makeXonoticServerToSTab()

entity makeXonoticServerToSTab ( )

Definition at line 7 of file dialog_multiplayer_join_termsofservice.qc.

References entity(), and NEW.

8 {
9  entity me;
11  me.configureDialog(me);
12  return me;
13 }
#define NEW(cname,...)
Definition: oo.qh:105
entity() spawn
+ Here is the call graph for this function:

◆ XonoticServerToSTab_fill()

void XonoticServerToSTab_fill ( entity  me)

Definition at line 20 of file dialog_multiplayer_join_termsofservice.qc.

References entity(), and makeXonoticTextBox().

21 {
22  entity e;
23  me.TR(me);
24  me.TD(me, me.rows, me.columns, e = makeXonoticTextBox());
25  me.textBox = e;
26 }
entity() spawn
entity makeXonoticTextBox()
Definition: textbox.qc:4
+ Here is the call graph for this function:

◆ XonoticServerToSTab_loadToS()

void XonoticServerToSTab_loadToS ( entity  me,
string  downloadurl 
)

Definition at line 15 of file dialog_multiplayer_join_termsofservice.qc.

References AdditionalServerInfo_OnGet(), FILE_READ, and url_single_fopen().

16 {
18 }
const float FILE_READ
Definition: csprogsdefs.qc:231
void AdditionalServerInfo_OnGet(entity fh, entity me, int status)
ERASEABLE void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
Definition: urllib.qc:87
+ Here is the call graph for this function: