/
main.menu
149 lines (129 loc) · 4.47 KB
/
main.menu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#include "ui/menudef.h"
#include "ui/menumacros.h"
// Defines //
#define WINDOW_X 16
#define WINDOW_Y 16
#define WINDOW_WIDTH 128
#define WINDOW_HEIGHT 248
#define GROUP_NAME "grpMain"
// Opener //
menuDef {
name "main_opener"
visible 0
fullscreen 0
rect WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
onOpen {
open fadebox_black ;
open background_1 ;
setmenuitemcolor fadebox_black fadebox backcolor 0 0 0 1 ;
fadeoutmenu fadebox_black ;
open main ;
clearcvar ui_profile_create_error ;
close main_opener
}
}
// Main Menu //
menuDef {
name "main"
visible 0
fullscreen 0
rect WINDOW_X WINDOW_Y 624 464
style WINDOW_STYLE_FILLED
onOpen {
exec "set cl_noprint 1; exec etlegacy.cfg; set cl_noprint 0"
conditionalscript cl_profile 1
( "clearFocus" )
( "close main ; open profile_create_initial_opener" ) // do we want an abort here?
conditionalscript ROldModeCheck 2
( "clearFocus ; open vid_confirm" )
( "clearFocus" )
conditionalscript cl_autoupdate 1
( "checkautoupdate" )
( "clearFocus" )
}
onEsc {
clearFocus ;
open quit
}
// Background Logo //
itemDef {
name "etl_logo"
rect 204 124 200 200 // 16, 16 offset!!
style WINDOW_STYLE_SHADER
background "ui/assets/etl_logo_huge"
visible 1
decoration
}
// Company Logos //
itemDef {
name "sd_logo"
rect 4 394 54 54 // 16, 16 offset!!
style WINDOW_STYLE_SHADER
background "ui/assets/logo_sd_dark"
forecolor 1 1 1 1
visible 1
decoration
}
itemDef {
name "atvi_logo"
rect $evalfloat(640-(2*WINDOW_X)-48-4-108) 421 108 27 // 16, 16 offset!! (note offset to left a little as well)
style WINDOW_STYLE_SHADER
background "ui/assets/logo_atvi_dark"
forecolor 1 1 1 1
visible 1
decoration
}
itemDef {
name "id_logo"
rect $evalfloat(640-(2*WINDOW_X)-48) 400 48 48 // 16, 16 offset!!
style WINDOW_STYLE_SHADER
background "ui/assets/logo_id_dark"
forecolor 1 1 1 1
visible 1
decoration
}
// Window //
WINDOW( _("MENU"), 50 )
execKey "c" { close main ; open main_quickconnect }
// Buttons //
BUTTON( 6, 32, WINDOW_WIDTH-12, 18, _("PLAY ONLINE"), .3, 14, close main ; /*close backgroundmusic ; open backgroundmusic_server ;*/ uiScript UpdateFilter ; uiScript ServerSortDown 4 ; open playonline )
BUTTON( 6, 56, WINDOW_WIDTH-12, 18, _("HOST GAME"), .3, 14, close main ; /*close backgroundmusic ; open backgroundmusic_server ;*/ uiScript loadArenas ; uiScript initHostGameFeatures ; open hostgame )
BUTTON( 6, 80, WINDOW_WIDTH-12, 18, _("REPLAYS"), .3, 14, close main ; open viewreplay )
BUTTON( 6, 104, WINDOW_WIDTH-12, 18, _("OPTIONS"), .3, 14, close main ; open options )
BUTTON( 6, 128, WINDOW_WIDTH-12, 18, _("PROFILE"), .3, 14, close main ; open profile )
BUTTON( 6, 152, WINDOW_WIDTH-12, 18, _("MODS"), .3, 14, close main ; open mods )
BUTTON( 6, 176, WINDOW_WIDTH-12, 18, _("CREDITS"), .3, 14, close main ; open credits_etlegacy )
BUTTON( 6, 200, WINDOW_WIDTH-12, 18, _("ETLEGACY.COM"), .3, 14, clearFocus ; open etlegacywebsite )
BUTTON( 6, 224, WINDOW_WIDTH-12, 18, _("EXIT GAME"), .3, 14, clearFocus ; open quit )
// Vanilla client warning //
#ifndef LEGACY
#define SECURITY_WIDTH 200
LABEL( 80, 368, SECURITY_WIDTH, 18, _("^1SECURITY INFORMATION"), .3, ITEM_ALIGN_CENTER, .5*SECURITY_WIDTH, 8 )
LABELWHITE( 80, 384, SECURITY_WIDTH, 9, _("You are running old software"), .2, ITEM_ALIGN_CENTER, .5*SECURITY_WIDTH, 8 )
LABEL( 80, 398, SECURITY_WIDTH, 9, _("We do recommend to\nupgrade your ET client"), .2, ITEM_ALIGN_CENTER, .5*SECURITY_WIDTH, 8 )
BUTTON( 80+6, 428, SECURITY_WIDTH-12, 18, _("UPGRADE NOW"), .3, 14, clearFocus; uiScript validate_openURL )
//LABEL( 80, 440, SECURITY_WIDTH, 18, _("Join ET Legacy and keep the game alive"), .2, ITEM_ALIGN_CENTER, .5*SECURITY_WIDTH, 8 )
#endif
// Version //
LABEL( 6, 450, WINDOW_WIDTH, 18, "^1"ETLEGACY_VERSION, .2, ITEM_ALIGN_LEFT, 0, 8 )
// profile info //
SUBWINDOW( 0, 260, WINDOW_WIDTH, 40, _("CURRENT PROFILE") )
CVARLABEL( 6, 276, WINDOW_WIDTH, WINDOW_WIDTH, "cl_profile", .2, ITEM_ALIGN_LEFT, 0, 8 )
CVARLABEL( 6, 288, WINDOW_WIDTH, WINDOW_WIDTH, "name", .2, ITEM_ALIGN_LEFT, 0, 8 )
// message of the day?
// SUBWINDOW( WINDOW_WIDTH+6, 0, 640-WINDOW_WIDTH -6, 28, _("MESSAGE OF THE DAY") )
// itemDef {
// name "messageOfTheDay"
// group GROUP_NAME
// rect 0 340 640 10
// ownerDraw UI_SERVERMOTD
// textfont UI_FONT_COURBD_21
// textstyle ITEM_TEXTSTYLE_SHADOWED
// textscale .2
// textalignx 4
// textaligny 8
// forecolor .6 .6 .6 1
// visible 1
// decoration
// }
}