Garry's Mod Wiki

ScrH

Description

Gets the height of the game's window (in pixels).

Returns

1 number
The height of the game's window in pixels

Example

Prints the Height of the window.

print(ScrH())
Output: 1080 (Depends on your screen)

Example

Draws a white box on the top left corner of your screen

hook.Add("HUDPaint", "WhiteBox", function() surface.SetDrawColor(Color(255,255,255,255)) surface.DrawRect(0, 0, ScrW() / 2, ScrH() / 2) end)
Output: A white box on the top left corner of your screen

Page Links


Special Pages


Wikis

?

Render Time: 33ms

DB GetPage 3
Generate Html 4
SaveChanges 9
Render Body 0
Render Sidebar 14