GetScreenSize: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|GetScreenSize()}} {{FuncParameters}} {{FuncNoParam}} {{FuncReturnValue|__EDIT_ME__}} == Example..."
 
28days (talk | contribs)
No edit summary
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Get the client's screen size}}


{{FuncSyntax|GetScreenSize()}}
{{FuncSyntax|GetScreenSize()}}
Line 8: Line 8:
{{FuncNoParam}}
{{FuncNoParam}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Get the client's screen size}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
AddEvent("OnRenderHUD", function()
local ScreenX, ScreenY = GetScreenSize()
AddPlayerChat("Your screen size: "..ScreenX..", "..ScreenY)
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
__EDIT_ME__

Revision as of 14:39, 14 November 2019

GetScreenSize

Type: Function
Context: Client
Introduced: v1.0

Description

Get the client's screen size

Syntax

GetScreenSize()

Parameters

  • This function has no parameters.

Return Value

  • Get the client's screen size

Example

AddEvent("OnRenderHUD", function()
	local ScreenX, ScreenY = GetScreenSize()
	AddPlayerChat("Your screen size: "..ScreenX..", "..ScreenY)
end)

See also

__EDIT_ME__