This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "Bz registerEvent"

From BZFlagWiki
Jump to: navigation, search
(New page: {{apicall | name = bz_registerEvent | description = Registers a new event handler. This event handler will receive events of the event type specified. | param1 = bz_eEventType ...)
 
(Added return value.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{apicall
 
{{apicall
 
| name        = bz_registerEvent
 
| name        = bz_registerEvent
 +
| returns    = Whether or not the event was registered successfully.
 +
| returntype  = bool
 
| description = Registers a new event handler. This event handler will receive events of the event type specified.
 
| description = Registers a new event handler. This event handler will receive events of the event type specified.
| param1      = bz_eEventType eventType
+
| param1      = eventType
 +
| param1type  = bz_eEventType
 
| param1desc  = The type of event to listen for
 
| param1desc  = The type of event to listen for
| param2      = bz_EventHandler* eventHandler
+
| param2      = eventHandler
 +
| param2type  = bz_EventHandler*
 
| param2desc  = The listener that will be called when events of the specified type occur
 
| param2desc  = The listener that will be called when events of the specified type occur
 
}}
 
}}
 +
 +
===Deprecation===
 +
All calls to [[bz_registerEvent]] have been deprecated as of 2.4 and will be replaced with:
 +
# '''Register(bz_eEventType eventType)'''
 +
 +
More information on this function can be found on the [[BZFS_API_2.4_Upgrade]] page.

Latest revision as of 05:52, 19 October 2011

bool bz_registerEvent (bz_eEventType eventType, bz_EventHandler* eventHandler)


Registers a new event handler. This event handler will receive events of the event type specified.

Parameters:
eventType  -  The type of event to listen for
eventHandler  -  The listener that will be called when events of the specified type occur
Returns:
Whether or not the event was registered successfully.


Deprecation[edit]

All calls to bz_registerEvent have been deprecated as of 2.4 and will be replaced with:

# Register(bz_eEventType eventType)

More information on this function can be found on the BZFS_API_2.4_Upgrade page.