TextDisplayRemoveText: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
{{Server function}} | {{Server function}} | ||
==Description== | ==Description== | ||
This function | This function removes a [[textitem]] from a [[textdisplay]]. This stops any observers of the [[textdisplay]] from being able to see the [[textitem]]. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
void textDisplayRemoveText ( textitem itemToRemove, textdisplay | void textDisplayRemoveText ( textitem itemToRemove, textdisplay displayToRemoveFrom ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
* ''' | * '''itemToRemove''': The [[textitem]] to remove from the display. | ||
* ''' | * '''displayToRemoveFrom''': The [[textdisplay]] to remove the [[textitem]] from. | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- Create a text display. | -- Create a text display. | ||
myTextDisplay = textCreateDisplay () | myTextDisplay = textCreateDisplay ( ) | ||
-- Add a player as an observer, i.e. this player will see everything added to this display | -- Add a player as an observer, i.e. this player will see everything added to this display | ||
textDisplayAddObserver ( myTextDisplay, aPlayer ) | textDisplayAddObserver ( myTextDisplay, aPlayer ) | ||
Line 28: | Line 28: | ||
==See Also== | ==See Also== | ||
{{Text | {{Text functions}} |
Revision as of 18:20, 21 August 2007
Description
This function removes a textitem from a textdisplay. This stops any observers of the textdisplay from being able to see the textitem.
Syntax
void textDisplayRemoveText ( textitem itemToRemove, textdisplay displayToRemoveFrom )
Required Arguments
- itemToRemove: The textitem to remove from the display.
- displayToRemoveFrom: The textdisplay to remove the textitem from.
Example
-- Create a text display. myTextDisplay = textCreateDisplay ( ) -- Add a player as an observer, i.e. this player will see everything added to this display textDisplayAddObserver ( myTextDisplay, aPlayer ) -- Create a new text item with the text 'Hello World' and a priority of 'low' and colored red. myTextItem = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) -- Add the newly created text item to the display textDisplayAddText ( myTextDisplay, myTextItem ) -- Remove the text item from the display textDisplayRemoveText ( myTestDispay, myTextItem )
See Also
- textCreateDisplay
- textCreateTextItem
- textDestroyDisplay
- textDestroyTextItem
- textDisplayAddObserver
- textDisplayAddText
- textDisplayGetObservers
- textDisplayIsObserver
- textDisplayRemoveObserver
- textDisplayRemoveText
- textItemGetColor
- textItemGetPosition
- textItemGetPriority
- textItemGetScale
- textItemGetText
- textItemSetColor
- textItemSetPosition
- textItemSetPriority
- textItemSetScale
- textItemSetText