vgui_screen

A vgui_screen shows a menu panel on a rectangle in the world, called a world screen, and players aim at it and click
its buttons with fire (the left click). The screen can also show a video. See World
screens for layouts, surfaces and animations.
Attributes
The entity also has these common keys:
- Naming and triggering: Name and Target
- Position: Pitch Yaw Roll
Names the parent, an entity that this one moves and turns with. The entity keeps the place and the angles it has on the parent in the editor. If several entities have the name, the first one counts. A name ending in .1 to .4 puts a sprite or a model that isn't solid on that attachment point of the model of the parent. A solid brush on a parent that turns needs its own origin brush. Moving objects explains it all.
If you leave this key empty, the entity doesn't move with anything.
parentflagsKeeps some of the entity's own position or angles instead of following the parent. Add up the values of the axes to keep: 2 for X, 4 for Y, 8 for Z, 16 for pitch, 32 for yaw and 64 for roll. So 112 keeps the entity level. 0 follows the parent on every axis.
0panelnameNames the layout file ui/scripts/screens/<name>.res, from the game folder or the map's files. The file's WorldScreen section sets the panel's size in pixels, and without a size, the panel is 512 x 256. The entity ignores this key if it has a Movie File.
If you leave this key empty, the game removes the entity, unless it plays a Movie File.
example_screenmoviefilenameNames an Ogg Theora video, a .ogv file in video/. The screen shows the video instead of a panel, with no cursor and no clicks.
loopingSets whether the video starts over at its end or stops on its last frame.
- No (stops on its last frame) (0)
- Yes (1)
No (stops on its last frame) (0)healthSets how loud the video's sound is, from 0 for silent up to 10 for full volume.
If you leave this key empty or set 0, it is 10.
10radiusSets the distance from the screen at which the video's sound fades out completely, in units.
1250surfaceNames a brush entity, such as a func_wall, a func_door, a func_train or a func_rotating. The screen is then drawn on the faces of that entity that have the {screen texture, and it moves with the entity. The vgui_screen then ignores Angles, Width, Height and its own origin.
widthWithout a Surface, sets the width of the screen in units, to the viewer's right of the origin.
32heightWithout a Surface, sets the height of the screen in units, above the origin.
32inputdistanceSets how far from the screen's surface a player can click it, in units, up to 4096.
128showcursorSets whether players see a mouse cursor on the screen while they aim at it.
- Default (yes) (-1)
- No (0)
- Yes (1)
Default (yes) (-1)Flags
1Start InactiveThe screen is hidden and can't be used until you trigger the entity
2Input DisabledThe screen only shows things, so it has no cursor and fire works as usual
4Movie sound everywhereEvery player hears the video's sound at the same volume, from no direction
8Movie without soundThe video plays without sound
Notes
- Without a Surface, the origin is the screen's lower-left corner as seen from the front, and the screen faces along its angles
- With a Surface, one repeat of the
{screentexture is the whole panel, and the texture's top-left corner is the panel's top-left corner. If you scale, rotate or shear the texture, the panel stretches the same way. The{screenfaces are invisible in the game, and the other faces of the brush entity look as usual - A click on a button fires Target, with the player who clicked as the activator. It also fires the target that
the key
~<command>names for the command of that button, for example the key~hellowith the valuemy_relay - Secondary fire is the right click, and buttons ignore it
- A click only counts from a living player who isn't spectating, who is in front of the screen and within Input Distance. Each player's clicks count up to 10 a second
- On makes the screen active, Off hides it so nobody can use it, and Toggle switches between the two
- A video plays from the start of the map, or from its beginning each time the screen turns on, and it stops when the screen turns off. Players who join later see it at the same point as the others
- With Move with, a screen without a Surface rides along and turns with its parent, and each player's game draws it there. A screen with a Surface moves with its brush, so to put it on a moving object, give the brush Move with. See Moving objects
See also
vgui_control_proxy- changes a control on the screenpoint_worldtext- text in the world- World screens - layouts, surfaces and animations
- Video - video files
Changes since 1.38
vgui_screenis new
