Content:MirLua/NamedEvents: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude>{{PageLang|en}}</noinclude>{{ | <noinclude>{{PageLang|en}}</noinclude>{{ | ||
Content:MirLua/NamedEvents/Definitions | |||
}}<table class="wikitable"> | }}<table class="wikitable"> | ||
<th scope="col"> {{L10n:Content/TableHeaders | Function}} </th> | <th scope="col"> {{L10n:Content/TableHeaders | Function}} </th> | ||
| Line 16: | Line 15: | ||
<td> {{L10n:MirLua/NamedEvents/ExtDescription | {{#arrayindex:MirLuaNamedEvents | {{#var:i}} }} }} </td> | <td> {{L10n:MirLua/NamedEvents/ExtDescription | {{#arrayindex:MirLuaNamedEvents | {{#var:i}} }} }} </td> | ||
<td> {{L10n:MirLua/NamedEvents/Settings | {{#arrayindex:MirLuaNamedEvents | {{#var:i}} }} }} </td> | <td> {{L10n:MirLua/NamedEvents/Settings | {{#arrayindex:MirLuaNamedEvents | {{#var:i}} }} }} </td> | ||
<td> {{ | <td> {{#hashvalue: {{#arrayindex:MirLuaNamedEvents | {{#var:i}} }} | example}} </td> | ||
</tr> | </tr> | ||
}} | }} | ||
Revision as of 19:25, 12 November 2015
| Function | Description | Extended description | Settings | Example |
|---|---|---|---|---|
| CreateHookableEvent | Creates a hookable event. | name
|
local hEvent = m.CreateHookableEvent('MyEvent')
|
|
| HookEvent | Sets a callback function ("trap") to react to event call. | Traps are called one by one in the order they were added to the sequence. Trap signature: |
name
hook
|
local hHook = m.HookEvent('MyEvent', function(w, l)
print('MyEvent is raised!')
end)
|
| UnhookEvent | Removes "trap" from event call sequence. | hEvent
|
m.UnhookEvent(hHook)
|
|
| NotifyEventHooks | Calls all "traps" of event call sequence one by one. | hEvent
wParam
|
m.NotifyEventHooks(hEvent)
|
Documentation
Automatic, localized table for MirLua named event functions test table.