DFrame.OnMouseReleased

From GMod Wiki

Jump to: navigation, search
Function
Syntax DFrame:OnMouseReleased( MouseCode button )
Description:
Gets called when someone releases his mouse after clicking on or around the DFrame. Button is an integer indicating what mouse button was released
Returns: Function
In Object: DPropertySheet
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DFrame.OnMouseReleased]DFrame.OnMouseReleased [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionDemonstration of how DFrame:OnMouseReleased works
Used onNewerClient.png
Code
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 1000, 900 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
DermaPanel.OnMouseReleased = function( mcode )
	if mcode == MOUSE_LEFT then
		print("You released your left mouse button on the DFrame")
	end
end
OutputPrints "You released your left mouse button on the DFrame" in console when you release your left mouse button on DFrame


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox