-
Notifications
You must be signed in to change notification settings - Fork 0
/
VGUI keyvalues.txt
235 lines (186 loc) · 8.03 KB
/
VGUI keyvalues.txt
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
NOTE: move this stuff into a wiki on github, and maybe put it into the valve dev wiki as well
Shared keyvalues for controls
==================================================================
"ControlName" The Type of Control this is
"fieldName" What is shown in VGUI Draw Tree?
You can put these lines at the end of some controls for what it will be when they are enabled
_minmode, _lodef, _hidef
"xpos" (Down - Up) Sets the position of the control along the X axis
"xpos_minmode" (Down - Up) Same as above, but is used when TF2 Min Mode is On
"ypos" (Left - Right) Sets the position of the control along the Y axis
"ypos_minmode"
"zpos" (Backward - Forward) Sets the position of the control along the Z axis
"zpos_minmode"
"wide"
"wide_minmode"
"tall"
"tall_minmode"
"visible" "1"
"enabled" "1"
"font" "font name"
"font_minmode" "font name"
"font_hidef" "font name"
"font_lodef" "font name"
"textAlignment" "west, north-west, north, center, north-east, east, south-east, south, south-west" apparently Left as well
"textinsetx" "x units" How many units far the text will be from the side along the X axis
"textinsety" "y units" How many units far the text will be from the side along the Y axis
"wrap" (boolean) Whether to have the text wrap when it hits the side. NOTE: when this is on, text alignment doesnt work
"centerwrap" boolean l4d2 gameui only?
// this looks like ass
"tooltiptext" (text) When you hover your mouse over something with this keyvalue, this shows up. NOT the one TF2 uses though (i think)
"disabled_tooltiptext" (text) Same as above, shows if the control is disabled
// only on ImagePanel?
"rotation" (0, 1, 2, 3)
"RoundedCorners" (0, 1, 5, 15) Whether to have sharp corners (0) or rounded corners
"proportionaltoparent" (boolean) Whether to set variables proportional to the full window or the parent control
"mouseinputenabled" (boolean) Whether to take control of the mouse when hovered over, or to ignore it, useful when this is an overlay
"keyboardinputenabled"? (boolean) Whether to take control of the keyboard or to ignore it
// ----------------------------------------------------------------------------
// Pinning, one of the most useful things and now i wish i knew about it when i started making this hud
// any xpos or ypos value will be offset from the corner you pin to
// Pin codes
PIN_TOPLEFT
PIN_TOPRIGHT
PIN_BOTTOMLEFT
PIN_BOTTOMRIGHT
PIN_CENTER_TOP
PIN_CENTER_RIGHT
PIN_CENTER_BOTTOM
PIN_CENTER_LEFT
// commands
"pin_to_sibling" "Element fieldName"
// choose the corner of the current element you want to pin
"pin_corner_to_sibling" "PIN_TOPLEFT"
// and then pin that corner to this corner of the selected element
"pin_to_sibling_corner" "PIN_TOPLEFT"
// idk what this does just yet
"pinCorner" "3"
// Colors, all use "R G B Alpha", though alpha doesnt seem to work on images, use the "alpha" keyvalue instead
-------------------------------------------------------------------------------
"bgcolor_override"
"fgcolor_override" This Generally controls the color of any text value
"image_drawcolor" "117 107 94 255"
"noitem_textcolor" idk what this is "117 107 94 255"
-------------------------------------------------------------------------------
"PaintBackgroundType" (1, 2) idk what this does yet
"paintbackground" (boolean) Whether to draw the background or not
"paintborder" "1"
"border" "MainMenuBGBorder"
"auto_wide_tocontents" (boolean) Whether the control size will auto adjust to the size of the content inside
// navigation on keyboard (or controller?)
"navUp" Name of any Control Above
"navDown" Name of any Control Below
"navLeft" Name of any Control to the Left
"navRight" Name of any Control to the Right
"navToRelay" Name of any Control idk
-------------------------------------------------------------------------------
// idk yet
"autoResize" "0"
"tabPosition" "0"
"use_proportional_insets" "1"
"dulltext" "0"
"brighttext" "0"
"default" "1"
"TFFont" "HudFontSmall"
"TextColor" "HudOffWhite"
"x_offset" "40"
"x_offset_minmode" "0"
"MeterFG" "White"
"MeterBG" "Gray"
"textAlignment_minmode" "west"
"eatmouseinput" "0"
"smallcheckimage" "1"
"skip_autoresize" "1"
// EditablePanel -----------------------------------
"infocus_bgcolor_override" "Background"
"outoffocus_bgcolor_override" "Background"
"title" "#CharInfoAndSetup"
"title_font" "HudFontMediumSmallBold"
"titletextinsetX" "40"
"titletextinsetY" "0"
"titlebarfgcolor_override" "200 187 161 100" // 255
"titlebardisabledfgcolor_override" "200 187 161 255"
"titlebarbgcolor_override" "46 43 42 255"
"clientinsetx_override" "0"
"sheetinset_bottom" "40"
======================================================================================
Button keyvalues
======================================================================================
"command" you can use "engine" in this keyvalue to enter a command in the console, only works on the menu screen though
"stay_armed_on_click" "1" Button will remain armed after you click it (it will keep that highlight on hover after clicking it)
// 0 - allows you to hold the button down and have a depressed color show
// BUG: if you hold down, move the mouse off of it and let go and you have "stay_armed_on_click" enabled
// it will stay armed even though you're cursor isn't on it
// 1 - click it to preform action, no holding down button
// 2 - default? same as 0, but no depressed color change
"button_activation_type" "0"
// Colors, all use "R G B Alpha", alpha doesnt work on images, use the "alpha" keyvalue instead
// also bg/fgcolor_override does not work here
-------------------------------------------------------------------------------
"defaultBgcolor_override"
"armedBgcolor_override"
"depressedBgcolor_override"
"defaultFgcolor_override"
"armedFgcolor_override"
"depressedFgcolor_override"
"image_armedcolor"
-------------------------------------------------------------------------------
"sound_depressed" "UI/buttonclick.wav" Sound played when button is armed (like mouse over)
"sound_released" "UI/buttonclickrelease.wav" Sound played when button is pressed
// border doesnt work, use these instead
"border_default" "MainMenuButtonDefault"
"border_armed" "MainMenuButtonArmed"
======================================================================================
Image keyvalues
======================================================================================
"image" (image directory) Directory to image relative to vgui folder
"scaleImage" (boolean) Whether to resize/scale the image to fit the entire panel, or leave unchanged in size
======================================================================================
Fonts Only
======================================================================================
"FontName"
{
"1"
{
"name" "name of font"
"tall" "24"
"tall_hidef" "80"
"tall_lodef" "80"
"weight" "500" Width i think?
"additive" "0"
"antialias" "1"
"yres" "480 599"
"underline" "1"
"outline" "1" Dont use this, looks like ass because its not affected by antialias (antialias on this is broken in tf2)
"dropshadow" "1"
"blur" "1"
"bitmap" "1"
"scalex" "0.5"
"scalex_lodef" "0.75"
"scaley" "0.5"
"scaley_lodef" "0.75"
}
}
======================================================================================
CItemModelPanel keyvalues
======================================================================================
"text_ypos" "20"
"text_center" "1"
"model_hide" "1"
"resize_to_text" "1"
"padding_height" "15"
======================================================================================
CEmbeddedItemModelPanel keyvalues
======================================================================================
"useparentbg" "1"
"inset_eq_x" "2"
"inset_eq_y" "2"
"fov" "54"
"start_framed" "1"
"disable_manipulation" "1"
"model"
{
"angles_x" "10"
"angles_y" "130"
"angles_z" "0"
}