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 =
NEW
(
XonoticServerToSTab
);
10
me.configureDialog(me);
11
return
me;
12
}
13
14
void
XonoticServerToSTab_loadToS
(
entity
me,
string
downloadurl)
15
{
16
url_single_fopen
(downloadurl,
FILE_READ
,
AdditionalServerInfo_OnGet
, me);
17
}
18
19
void
XonoticServerToSTab_fill
(
entity
me)
20
{
21
entity
e;
22
me.TR(me);
23
me.TD(me, me.rows, me.columns, e = me.textBox =
makeXonoticTextBox
());
24
e.allowColors =
true
;
25
}
26
27
void
AdditionalServerInfo_OnGet
(
entity
fh,
entity
me,
int
status)
28
{
29
switch
(status) {
30
case
URL_READY_CLOSED
:
31
{
32
break
;
33
}
34
case
URL_READY_ERROR
:
35
{
36
me.textBox.setText(me.textBox,
"Error reading ToS"
);
37
break
;
38
}
39
case
URL_READY_CANREAD
:
40
{
41
string
temp =
""
;
42
for
(
string
s; (s =
url_fgets
(fh)); )
43
{
44
if
(temp !=
""
)
45
temp =
strcat
(temp,
"\n"
, s);
46
else
47
temp = s;
48
}
49
url_fclose
(fh);
50
me.textBox.setText(me.textBox, temp);
51
break
;
52
}
53
default
:
54
{
55
break
;
56
}
57
}
58
}
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:27
XonoticServerToSTab_fill
void XonoticServerToSTab_fill(entity me)
Definition
dialog_multiplayer_join_termsofservice.qc:19
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:14
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:285
url_single_fopen
ERASEABLE void url_single_fopen(string url, int mode, url_ready_func rdy, entity pass)
Definition
urllib.qc:86
url_fclose
ERASEABLE void url_fclose(entity e)
Definition
urllib.qc:205
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