RegisterHookFunction

From VisionaireWiki
Revision as of 22:54, 2 August 2011 by Alex (talk | contribs) (Created page with "==registerHookFunction== Registers a hook function for a specific operation. Lua Syntax: <pre>registerHookFunction(hook, hookFunction)</pre> ===Arguments=== ====hook==== :'''"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

registerHookFunction

Registers a hook function for a specific operation.

Lua Syntax:

registerHookFunction(hook, hookFunction)

Arguments

hook

"string" - The operation for which the hook function should be called. Currently supported hooks: "setTextPosition" (the hook is called everytime the position of a displayed text is set).

hookFunction

"string" - The name of the lua function which is called when the hook is executed. The function should take exactly one argument which is the affected visionaire object. The function must return a boolean value: true if the operation was handled in the hook function, false if the operation was not handled and should be handled by the engine (as if there were no hook).

Flags

Return Values

None.