G.ScrW
From GMod Wiki
Revision as of 09:46, 16 December 2010 by Wizard of Ass (Talk | contribs)
Function | |
Syntax |
ScrW( ) Where is this used? |
Description: | |
Returns the width of the currently used used viewport (Mostly fits to the screen resolution) | |
Returns: | Number width |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.ScrW]G.ScrW [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Prints the width of the currently used resolution |
---|---|
Used on | |
Code | print("Your resolution width is "..ScrW()) |
Output | Your resolution width is 1280. |
Addition Notes
- This function is (when not localized) about 3 times slower than surface.ScreenWidth(), however this will not make a big difference if you don't call the function like 10000 times per second.