The gui library is similar to the input but features functions that are more focused on the mouse's interaction with GUI panels.
Opens the game menu overlay.
gui.EnableScreenClicker( boolean enabled )
Enables the mouse cursor without restricting player movement, like using Sandbox's context menu. Some CUserCmd functions will return incorrect values when this function is active.
Hides the game menu overlay.
gui.InternalCursorMoved( number deltaX, number deltaY )
Simulates a mouse move with the given deltas.
gui.InternalKeyTyped( number code )
Simulates an ASCII symbol writing. Use to write text in the chat or in VGUI. Doesn't work while the main menu is open!
gui.InternalMouseDoublePressed( number key )
Simulates a double mouse key press for the given mouse key.
number, number gui.MousePos()
We advise against using this. It may be changed or removed in a future update. Use input.GetCursorPos instead. Returns the cursor's position on the screen, or 0, 0 if cursor is not visible.
gui.OpenURL( string url )
Opens specified URL in the steam overlay browser. The URL has to start with either http:// or https:// When called clientside, user will be asked for confirmation before the website will open.You can't click the confirmation if a model panel has focus.Issue Tracker: 3383Will silently fail if the URL is more than 512 characters long.Issue Tracker: 4663
Vector gui.ScreenToVector( number x, number y )
Converts the specified screen position to a direction vector local to the player's view. A related function is Vector:ToScreen, which translates a 3D position to a screen coordinate. util.AimVector is a more generic version of this, using a custom view instead of the player's current view.
gui.SetMousePos( number mouseX, number mouseY )
We advise against using this. It may be changed or removed in a future update. Use input.SetCursorPos instead. Sets the cursor's position on the screen, relative to the topleft corner of the window
Shows console in the game UI.