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..." |
No edit summary |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Client|1.0}} | {{Info|Function|Client|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Get the client's screen size}} | ||
{{FuncSyntax|GetScreenSize()}} | {{FuncSyntax|GetScreenSize()}} | ||
Line 8: | Line 8: | ||
{{FuncNoParam}} | {{FuncNoParam}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Get the client's screen size}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua"> | |||
AddEvent("OnRenderHUD", function() | |||
local ScreenX, ScreenY = GetScreenSize() | |||
AddPlayerChat("Your screen size: "..ScreenX..", "..ScreenY) | |||
end) | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
* [[DrawText]] | |||
* [[SetDrawColor]] | |||
* [[SetTextDrawScale]] | |||
* [[GetTextSize]] | |||
* [[DrawLine]] | |||
* [[DrawLine3D]] | |||
* [[DrawPoint3D]] | |||
* [[DrawCircle3D]] | |||
* [[DrawBox]] | |||
* [[DrawRect]] | |||
* [[DrawTexture]] | |||
* [[DrawTextureEx]] | |||
* [[DrawMaterial]] |
Latest revision as of 20:42, 30 August 2020
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)