How to use the script interface #576
-
Hello, I was wondering how I can add another scripting language like lua to hook with RMLUI? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey, I'm copying this from the chat, in case others come by here: Generally, you'll have to create new bindings. That is mostly a matter of replicating the methods of the various classes in the library (like Element), however you do that for your language. Then you need to hook into the ElementDocument::LoadInlineScript and LoadExternalScript, to actually load the scripts. And you probably also want to hook into some of our plugin functionality. The Lua plugin should show some of these things, but let me know if anything is unclear. |
Beta Was this translation helpful? Give feedback.
Hey, I'm copying this from the chat, in case others come by here:
Generally, you'll have to create new bindings. That is mostly a matter of replicating the methods of the various classes in the library (like Element), however you do that for your language. Then you need to hook into the ElementDocument::LoadInlineScript and LoadExternalScript, to actually load the scripts. And you probably also want to hook into some of our plugin functionality. The Lua plugin should show some of these things, but let me know if anything is unclear.