Panel.SetPaintedManually
From GMod Wiki
Function | |
Syntax | Panel:SetPaintedManually( Boolean isPaintedManually ) ) |
Description: | |
Determines if the panel is painted by a user defined function set by calling Panel.SetPaintFunction. | |
Returns: | nil |
In Object: | Panel |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Panel.SetPaintedManually]Panel.SetPaintedManually [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This function will make the panel invisible as if you had called the Panel.SetVisible(false) function however, it will still function as though it were visible. |
---|---|
Used on | |
Code | Panel = vgui.Create("Panel") Panel.SetPaintedManually(true) |
Output | N/A |
Additional Notes
- In order to override the default paint function, you must change it via the Panel.SetPaintFunction function.
- This is useful for having multiple paint functions for one VGui element, and dynamically swapping them after creating the element, or for allowing the user to interact with the VGui element while not being able to see it.