Library vgui
VGUI library. Used to create basic VGUI controls. Only available to HUDs.
Functions
| create( class, parent ) |
Creates and returns a VGUI control. |
| isCursorVisible() |
Returns whether the mouse cursor is currently visible or not. |
| isSupportedControl( class ) |
Indicates whether the given class is supported and valid to pass to vgui.create(). |
Fields
Functions
- vgui.create( class, parent )
-
Creates and returns a VGUI control. Available classes are:
* AvatarImage
* DAdjustableModelPanel
* DAlphaBar
* DButton
* DCollapsibleCategory
* DCategoryList
* DCheckBox
* DCheckBoxLabel
* DColorButton
* DColorCombo
* DColorCube
* DColorMixer
* DColumnSheet
* DComboBox
* DDrawer
* DFileBrowser
* DForm
* DFrame
* DGrid
* DHorizontalDivider
* DHorizontalScroller
* DIconBrowser
* DIconLayout
* DImage
* DImageButton
* DLabel
* DLabelEditable
* DListView
* DMenu
* DMenuBar
* DModelPanel
* DNumberScratch
* DNumberWang
* DNumPad
* DNumSlider
* DPanel
* DProgress
* DProperties
* DPropertySheet
* DRGBPicker
* DScrollPanel
* DTextEntry
* DTree
* DVerticalDivider
* DVScrollBar
Environment:
Client
Parameters:
-
(string) class: The class name of the control you want to create.
-
(Panel?) parent: Optional parent object.
Return value:
(Panel | nil)
The created object, or nil if it could not be created (i.e the local player isn't linked or the object doesn't exist).
- vgui.isCursorVisible()
-
Returns whether the mouse cursor is currently visible or not.
Environment:
Client
- vgui.isSupportedControl( class )
-
Indicates whether the given class is supported and valid to pass to vgui.create().
Note that this does not check any additional required permissions, it only indicates whether the class is globally whitelisted for use.
Environment:
Client
Parameters:
-
(string) class: The class name of the control to check.
Return value:
(boolean)
True if the given class name is supported, false otherwise.