File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -358,6 +358,23 @@ function input_library.selectWeapon(weapon)
358358 input .SelectWeapon ( ent )
359359end
360360
361+ --- Sets the position of your cursor. Your cursor must be enabled.
362+ -- @client
363+ -- @param number X
364+ -- @param number Y
365+ function input_library .setCursorPos (x , y )
366+ checkpermission (instance , nil , " input.emulate" )
367+
368+ if not vgui .CursorVisible () then
369+ SF .Throw (" Your cursor is not visible" , 2 )
370+ end
371+
372+ checkluatype (x , TYPE_NUMBER )
373+ checkluatype (y , TYPE_NUMBER )
374+
375+ input .SetCursorPos (x , y )
376+ end
377+
361378--- Locks game controls for typing purposes. Alt will unlock the controls. Has a 10 second cooldown.
362379-- @client
363380-- @param boolean enabled Whether to lock or unlock the controls
You can’t perform that action at this time.
0 commit comments