Garry's Mod Wiki

DForm:PropSelect

DForm:PropSelect

  Panel DForm:PropSelect( string label, string convar, table models, number height = 2 )

Just Added

This was just added in the latest version (2021.12.15). It might only be available on the Dev Branch right now.

Description

Creates a PropSelect panel and docks it to the top of the DForm.

Arguments

1 string label
The label to display above the prop select.
2 string convar
The convar to set the selected model to.
3 table models
A table of models to display for selection. Supports 2 formats:

  1. Key is the model and value are the convars to set when that model is selected in format convar=value
  2. An table of tables where each table must have the following keys:
  • string model - The model.
  • number skin - Model's skin. Defaults to 0
  • string tooltip - Displayed when user hovers over the model. Defaults to the model path.
  • The key of the table is the value of the convar.
4 number height = 2
The height of the prop select panel, in 64px icon increments.

Returns

1 Panel
The created PropSelect panel.

Special Pages


Wikis

?

Render Time: 67ms

DB GetPage 30
Generate Html 11
SaveChanges (1) 17
Render Body 0
Render Sidebar 6