TextDisplayAddObserver
Jump to navigation
Jump to search
This function adds a player as an observer of a textdisplay. This allows the player to see any textitems that the textdisplay contains.
Syntax
void textDisplayAddObserver ( textdisplay display, player playerToAdd )
Required Arguments
- display: The textdisplay to add the player to as an observer.
- playerToAdd: The player that should observe the textdisplay.
Example
function MyTestTextFunction () display = textCreateDisplay () -- create a new display, store the reference in a variable called display textDisplayAddObserver ( display, thePlayer ) -- add an observer to it text = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) -- create a text item textDisplayAddText ( display, text ) -- Add the text item to the text display end
See Also
- textCreateDisplay
- textCreateTextItem
- textDestroyDisplay
- textDestroyTextItem
- textDisplayAddObserver
- textDisplayAddText
- textDisplayGetObservers
- textDisplayIsObserver
- textDisplayRemoveObserver
- textDisplayRemoveText
- textItemGetColor
- textItemGetPosition
- textItemGetPriority
- textItemGetScale
- textItemGetText
- textItemSetColor
- textItemSetPosition
- textItemSetPriority
- textItemSetScale
- textItemSetText