DButton
Description
Parent
Derives methods, etc not listed on this page from DLabel.
Implements
Implements or overrides the following hooks/methods. If you want to override these, you probably want to call the original function too.
Methods
boolean DButton:GetDrawBorder()
We advise against using this. It may be changed or removed in a future update.
An AccessorFunc that returns value set by DButton:SetDrawBorder. See that page for more info.
Returns true if the DButton is currently depressed (a user is clicking on it).
Sets a console command to be called when the button is clicked.
This overrides the button's DoClick method.
DButton:SetDrawBorder( boolean draw )
We advise against using this. It may be changed or removed in a future update.
Does absolutely nothing at all. Default value is automatically set to true.
Sets an image to be displayed as the button's background. Alias of DButton:SetImage
Sets an image to be displayed as the button's background.
See DButton:SetMaterial for equivalent function that uses IMaterial instead.
Also see: DImageButton
DButton:SetMaterial( IMaterial img = nil )
Sets an image to be displayed as the button's background.
See DButton:SetImage for equivalent function that uses file paths instead. Also see DImageButton.
DButton:UpdateColours( table skin )
A hook called from within DLabel's PANEL:ApplySchemeSettings to determine the color of the text on display.
Example
The DButton is exactly what you think it is - a button!