ScrH

From Garry's Mod
Jump to: navigation, search
 ScrH( )

Contents

Description

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

Returns

number

The height of the game's window in pixels

Examples

Example

Prints the Height of the window.

print(ScrH())

Output:

1080 (Depends on your screen)

Examples

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
Personal tools
Navigation