Content:MirLua/NamedEvents: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Dart Raiden (talk | contribs) No edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{PageLang|en}}</noinclude>{{ | <noinclude>{{PageLang|en}}</noinclude>{{ | ||
Content:MirLua/NamedEvents/Definitions | |||
}}<table class="wikitable"> | }}<table class="wikitable"> | ||
<tr> | |||
<th scope="col"> {{L10n:Content/TableHeaders | Function}} </th> | <th scope="col"> {{L10n:Content/TableHeaders | Function}} </th> | ||
<th scope="col"> {{L10n:Content/TableHeaders | Description}} </th> | <th scope="col"> {{L10n:Content/TableHeaders | Description}} </th> | ||
Line 8: | Line 8: | ||
<th scope="col"> {{L10n:Content/TableHeaders | Settings}} </th> | <th scope="col"> {{L10n:Content/TableHeaders | Settings}} </th> | ||
<th scope="col"> {{L10n:Content/TableHeaders | Example}} </th> | <th scope="col"> {{L10n:Content/TableHeaders | Example}} </th> | ||
</tr> | |||
{{ #loop: i | {{ #loop: i | ||
| 0 <!-- loops start value for {{#var:i}} --> | | 0 <!-- loops start value for {{#var:i}} --> | ||
Line 16: | Line 17: | ||
<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> | ||
}} | }} | ||
Line 22: | Line 23: | ||
{{Documentation | {{Documentation | ||
|link box = off | |link box = off | ||
|content = Automatic, localized table for MirLua named event functions | |content = {{TNT|Important|This was made to test how things from Plugin:MirLua subpages will look as a table. It's not ready to use yet.}}{{Todo|(1) Not to forget to use it when creating multilingual content for MirLua (sub)pages; (2) column "Settings" should be renamed to "Parameters".}} | ||
Automatic, localized <span style="color:red;font-weight:bold">test table</span> for MirLua named event functions of m_core module. | |||
}} | }} | ||
</noinclude> | </noinclude> |
Latest revision as of 22:12, 14 December 2019
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
Important
This was made to test how things from Plugin:MirLua subpages will look as a table. It's not ready to use yet.
This was made to test how things from Plugin:MirLua subpages will look as a table. It's not ready to use yet.
Todo: (1) Not to forget to use it when creating multilingual content for MirLua (sub)pages; (2) column "Settings" should be renamed to "Parameters".
Automatic, localized test table for MirLua named event functions of m_core module.