Garry's Mod Wiki

Revision Difference

GM:GUIMousePressed#517819

<function name="GUIMousePressed" parent="GM" type="hook"> <ishook>yes</ishook> <description> Called whenever a players presses a mouse key on the context menu in Sandbox or on any panel derived from CGModBase, such as the panel used by <page>gui.EnableScreenClicker</page> and the panel used by <page>Panel:ParentToHUD</page>. See <page>GM:VGUIMousePressed</page> for a hook that is called on all VGUI elements. </description> <realm>Client</realm> <predicted>No</predicted> <hidepredictionwarning>No</hidepredictionwarning> <args> <arg name="mouseCode" type="number">The key that the player pressed using &lt;page&gt;MOUSE&lt;/page&gt;.</arg> <arg name="aimVector" type="Vector">A normalized direction vector local to the camera. Internally, this is &lt;page&gt;gui.ScreenToVector&lt;/page&gt;( &lt;page&gt;gui.MousePos&lt;/page&gt;() ).</arg> <arg name="mouseCode" type="number">The key that the player pressed using <page>MOUSE</page>.</arg> <arg name="aimVector" type="Vector">A normalized direction vector local to the camera. Internally, this is <page>gui.ScreenToVector</page>( <page>gui.MousePos</page>() ).</arg> </args> </function>