Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
dialog_multiplayer_join_termsofservice.qc
Go to the documentation of this file.
1
#include "
dialog_multiplayer_join_termsofservice.qh
"
2
3
#include "
textbox.qh
"
4
#include <
lib/urllib.qh
>
5
6
7
entity
makeXonoticServerToSTab
()
8
{
9
entity
me;
10
me =
NEW
(
XonoticServerToSTab
);
11
me.configureDialog(me);
12
return
me;
13
}
14
15
void
XonoticServerToSTab_loadToS
(
entity
me,
string
downloadurl)
16
{
17
url_single_fopen
(downloadurl,
FILE_READ
,
AdditionalServerInfo_OnGet
, me);
18
}
19
20
void
XonoticServerToSTab_fill
(
entity
me)
21
{
22
entity
e;
23
me.TR(me);
24
me.TD(me, me.rows, me.columns, e = me.textBox =
makeXonoticTextBox
());
25
e.allowColors =
true
;
26
}
27
28
void
AdditionalServerInfo_OnGet
(
entity
fh,
entity
me,
int
status)
29
{
30
switch
(status) {
31
case
URL_READY_CLOSED
:
32
{
33
break
;
34
}
35
case
URL_READY_ERROR
:
36
{
37
me.textBox.setText(me.textBox,
"Error reading ToS"
);
38
break
;
39
}
40
case
URL_READY_CANREAD
:
41
{
42
string
temp =
""
;
43
for
(
string
s; (s =
url_fgets
(fh)); )
44
{
45
if
(temp !=
""
)
46
temp =
strcat
(temp,
"\n"
, s);
47
else
48
temp = s;
49
}
50
url_fclose
(fh);
51
me.textBox.setText(me.textBox, temp);
52
break
;
53
}
54
default
:
55
{
56
break
;
57
}
58
}
59
}
entity
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
XonoticServerToSTab
Definition
dialog_multiplayer_join_termsofservice.qh:4
FILE_READ
const float FILE_READ
Definition
csprogsdefs.qc:235
AdditionalServerInfo_OnGet
void AdditionalServerInfo_OnGet(entity fh, entity me, int status)
Definition
dialog_multiplayer_join_termsofservice.qc:28
XonoticServerToSTab_fill
void XonoticServerToSTab_fill(entity me)
Definition
dialog_multiplayer_join_termsofservice.qc:20
makeXonoticServerToSTab
entity makeXonoticServerToSTab()
Definition
dialog_multiplayer_join_termsofservice.qc:7
XonoticServerToSTab_loadToS
void XonoticServerToSTab_loadToS(entity me, string downloadurl)
Definition
dialog_multiplayer_join_termsofservice.qc:15
dialog_multiplayer_join_termsofservice.qh
strcat
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
NEW
#define NEW(cname,...)
Definition
oo.qh:117
makeXonoticTextBox
entity makeXonoticTextBox()
Definition
textbox.qc:4
textbox.qh
url_fgets
ERASEABLE string url_fgets(entity e)
Definition
urllib.qc:287
url_single_fopen
ERASEABLE void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
Definition
urllib.qc:87
url_fclose
ERASEABLE void url_fclose(entity e)
Definition
urllib.qc:207
urllib.qh
URL_READY_CLOSED
const float URL_READY_CLOSED
Definition
urllib.qh:15
URL_READY_ERROR
const float URL_READY_ERROR
Definition
urllib.qh:14
URL_READY_CANREAD
const float URL_READY_CANREAD
Definition
urllib.qh:17
menu
xonotic
dialog_multiplayer_join_termsofservice.qc
Generated on
for Xonotic QuakeC by
1.14.0