DButton.Center

From GMod Wiki

Jump to: navigation, search

Examples

DescriptionCreates a button which is centered either on screen, or relevant to it's Parent
Used onNewerClient.png
Code
// myParent = a panel
myButton = vgui.Create("DButton", myParent)
myButton:SetText("Cheesburgers")
myButton:Center()
myButton.DoClick = function()
RunConsoleCommand('kill') 
end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox