DestroyTextBox: Difference between revisions

From Onset Developer Wiki
Created page with "{{Info|Function|Client|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|DestroyGuiText(textid)}} {{FuncParameters}} {{FuncParam|textid|__EDIT_ME__}} {{FuncReturnValue|__..."
 
28days (talk | contribs)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Info|Function|Client|1.0}}
{{Info|Function|Client|1.0}}


{{FuncDescription|__EDIT_ME__}}
{{FuncDescription|Destroy a text box created with [[CreateTextBox]].}}


{{FuncSyntax|DestroyGuiText(textid)}}
{{FuncSyntax|DestroyTextBox(textid)}}


{{FuncParameters}}
{{FuncParameters}}
{{FuncParam|textid|__EDIT_ME__}}
{{FuncParam|textid|The text identifier.}}


{{FuncReturnValue|__EDIT_ME__}}
{{FuncReturnValue|This function returns nothing.}}


== Example ==
== Example ==
__EDIT_ME__
<syntaxhighlight lang="Lua>
-- client side
CashText = 0
 
AddEvent("OnPackageStart", function()
CashText = CreateTextBox(-15, 180, 'CASH', "right")
SetTextBoxAnchors(CashText, 1.0, 0.0, 1.0, 0.0)
SetTextBoxAlignment(CashText, 1.0, 0.0)
end)
 
AddEvent("OnPackageStop", function()
DestroyTextBox(CashText)
end)
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
__EDIT_ME__
{{Template:TextFunctions}}

Latest revision as of 13:03, 20 November 2019

DestroyTextBox

Type: Function
Context: Client
Introduced: v1.0

Description

Destroy a text box created with CreateTextBox.

Syntax

DestroyTextBox(textid)

Parameters

  • textid
    The text identifier.

Return Value

  • This function returns nothing.

Example

-- client side
CashText = 0

AddEvent("OnPackageStart", function()
	CashText = CreateTextBox(-15, 180, 'CASH', "right")
	SetTextBoxAnchors(CashText, 1.0, 0.0, 1.0, 0.0)
	SetTextBoxAlignment(CashText, 1.0, 0.0)
end)

AddEvent("OnPackageStop", function()
	DestroyTextBox(CashText)
end)

See also