surface.ScreenWidth

From GMod Wiki

Jump to: navigation, search
Function
Syntax surface.ScreenWidth( )
Where is this used?
Description:
This function returns the screen width if the game is fullscreen, or returns the interior width of the user's game window if the game is windowed.
Returns: Integer
Part of Library: surface
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Surface.ScreenWidth]Surface.ScreenWidth [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the local client's screen width, same as ScrW()
Used onNewerClient.png
Code
width = surface.ScreenWidth
OutputScreen width.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox