Difference between revisions of "Event Handler"

From Legends of Aria Admin and Modding Wiki
Jump to: navigation, search
(Created page with " An Event Handler is a function registered in a special way to be called when certain things (events) happen. * Registering a function as Event Handler: The general abstract...")
 
Line 1: Line 1:
 
  An Event Handler is a function registered in a special way to be called when certain things (events) happen.
 
  An Event Handler is a function registered in a special way to be called when certain things (events) happen.
  
* Registering a function as Event Handler:
+
* Registering a function as Event Handlerin the general abstract form is:
The general abstract form is
+
<code>
<syntaxhighlight lang="lua">
+
RegisterEventHandler( (EventType)mEvent, (string)mEventIdentifier, (function)mEventHandler)  
RegisterEventHandler( (EventType)mEvent, (string)EventIdentifier, (function)EventHandler)  
+
<code>
</syntaxhighlight>
+
mEvent can be one of the following event types:
 +
 
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.
 +
EventType.

Revision as of 16:22, 1 November 2016

An Event Handler is a function registered in a special way to be called when certain things (events) happen.
  • Registering a function as Event Handlerin the general abstract form is:

RegisterEventHandler( (EventType)mEvent, (string)mEventIdentifier, (function)mEventHandler) mEvent can be one of the following event types:

EventType.
EventType.
EventType.
EventType.
EventType.
EventType.
EventType.
EventType.
EventType.
EventType.
EventType.