DButton.DoRightClick

From GMod Wiki

Jump to: navigation, search
Function
Syntax DButton.DoRightClick( (DButton) button )
Description:
If this is set to a function, it will be called when the button is right clicked. This function is identical to DButton.DoClick.
Returns: nil
In Object: DButton
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DButton.DoRightClick]DButton.DoRightClick [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionWhen the button is right clicked, the title of the frame is changed to "Hello World!"
Used onNewerClient.png
Code
 
window = vgui.Create( "DFrame" );
	window:SetSize( 200,70 );
	window:Center();
	window:SetTitle( "DButton Test" );
	window:MakePopup();
 
button = vgui.Create( "DButton", window );
	button:SetSize( 100, 30 );
	button:SetPos( 50, 30 );
	button:SetText( "Test Button" );
	button.DoRightClick = function( button )
		window:SetTitle( "Hello world!" );
	end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox