Vgui slideshow display: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{wrongtitle|title=vgui_slideshow_display}}
{{wrongtitle|title=vgui_slideshow_display}}
{{base_hud}}
{{base_point}}[[Category:GUI Entities]][[Category:VGUI|S]]
[[Category:VGUI|S]]


==Entity Description==
==Entity Description==

Revision as of 07:47, 12 April 2008

Template:Wrongtitle Template:Base point

Entity Description

A VGUI screen the displays images in a slideshow.

Creation Notes

  • Place it in the lower left corner of where you want the screen and rotate it so that the red axis points which way you want the screen to face.
  • You'll need to move it slightly away from the surface it sits on to avoid Z-fighting. 1 unit is enough.
  • Images in sub directories will NOT be included.

Adding Slides to Slideshow

  • Keywords are added in the vmt like so: "%keywords" "test1, test2, another_sample_keyword, cow, animal"
  • AddSlides can be used up to 16 times in succession to add addition slides. So you can add "cow" slides and then add "chicken" slides if you want both cows and chickens to be in the shuffle.
  • Slides are first shuffled by keyword. So if you have 400 "cow" slides and 10 "chicken" slides there's still a 1 out of 2 chance that you'll see a chicken. Then if "chicken" is selected for display there's a 1 out of 10 chance that you'll see any specific chicken.
  • The same keyword can be added multiple times to weight which slides are more common. So you could add "cow", "cow", "cow", "chicken" and you'll be 3 times more likely to see a cow in the shuffle than a chicken.
  • Setting the cycle type to forward will display all the added images in order by keyword (in the order that the keywords were added), then in alphabetical order for each slide in the keyword.

Key values

  • displaytext <string>
Text to display on top of the image.
  • directory <string>
Directory where images are located (materials/vgui/[directory]).
  • minslidetime <string>
Minimum amount of random time that a slide is displayed.
  • maxslidetime <string>
Maximum amount of random time that a slide is displayed.
  • cycletype <choices>
Order that images are displayed (0 - random, 1 - forward, 2 - backward).
  • width <integer>
Width of the panel in units.
  • height <integer>
Height of the panel in units.

Inputs

Make the vgui screen visible.
  • Disable
Make the vgui screen invisible.
  • SetDisplayText <string>
Sets the text displayed over the image.
  • RemoveAllSlides
Removes all slides from slideshow.
  • AddSlides <string>
Add all slides that contain this keyword. If no keyword parameter is provided, ALL the slides are added.
  • SetMinSlideTime
Sets the minimum random time between slides.
  • SetMaxSlideTime
Sets the maximimum random time between slides.
  • SetCycleType
Sets the order that images are displayed (0 - random, 1 - forward, 2 - backward).
  • SetNoListRepeat
When set, the random list choser will never choose the same list twice in a row.

Outputs

Template:O targetname

See also