Lua: widgets

This commit is contained in:
Zef Hemel
2024-10-13 15:14:22 +02:00
parent 4b6cd183a8
commit c1a20af981
8 changed files with 388 additions and 142 deletions
+1 -6
View File
@@ -16,12 +16,7 @@ export const jsApi = new LuaTable({
importModule: new LuaBuiltinFunction((url) => {
return import(url);
}),
/**
* Binds a function to an object, so that the function can be called with the object as `this`. Some JS APIs require this.
*/
bind: new LuaBuiltinFunction((fn: any, obj: any, ...args: any[]) => {
return fn.bind(obj, ...args);
}),
tolua: new LuaBuiltinFunction(jsToLuaValue),
tojs: new LuaBuiltinFunction(luaValueToJS),
log: new LuaBuiltinFunction((...args) => {