SetTextDrawScale: Difference between revisions

From Onset Developer Wiki
m (BlueMountains moved page SetDrawScale to SetTextDrawScale without leaving a redirect)
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Sets the draw scale for the DrawText function.}}


{{FuncSyntax|SetDrawScale(sx, sy)}}
{{FuncSyntax|SetTextDrawScale(sx, sy)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|sx|__EDIT_ME__}}
{{FuncParam|sx|Draw X scale between 0.0 and 128.0}}
{{FuncParam|sy|__EDIT_ME__}}
{{FuncParam|sy|Draw Y scale between 0.0 and 128.0}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|Returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua">
AddEvent("OnRenderHUD", function()
SetTextDrawScale(2.0, 2.0)
DrawText(4, 400, "WTF ACTIVE LOL")
SetTextDrawScale(1.0, 1.0)
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
* [[DrawText]]
* [[SetDrawColor]]
* [[SetTextDrawScale]]
* [[GetTextSize]]
* [[DrawLine]]
* [[DrawLine3D]]
* [[DrawPoint3D]]
* [[DrawCircle3D]]
* [[DrawBox]]
* [[DrawRect]]
* [[DrawTexture]]
* [[DrawTextureEx]]
* [[DrawMaterial]]

Latest revision as of 09:54, 5 October 2020

SetTextDrawScale

Type: Function
Context: Client
Introduced: v1.0

Description

Sets the draw scale for the DrawText function.

Syntax

SetTextDrawScale(sx, sy)

Parameters

  • sx
    Draw X scale between 0.0 and 128.0
  • sy
    Draw Y scale between 0.0 and 128.0

Return Value

  • Returns nothing.

Example

AddEvent("OnRenderHUD", function()
	SetTextDrawScale(2.0, 2.0)
	DrawText(4, 400, "WTF ACTIVE LOL")
	SetTextDrawScale(1.0, 1.0)
end)

See also