Sider
There are some tips for the modified version of Sider.
New GUI
New Apis
Calling Sider Lua functions from external modules
An export function in sider.dll:
uint64_t call_lua(const wchar_t* module_name, const wchar_t* param_str);
For example, you can check if the user has selected Practice/Training Match in CustomExhibitionMatch.lua from other dlls.
In other dlls:
// The process of using `GetModuleHandle` + `GetProcAddress` to obtain the function address of `call_lua` is not included here
auto result = call_lua(L"CustomExhibitionMatch.lua", L"is_training_match");
In CustomExhibitionMatch.lua
-- register the event `on_external_call` in the init function
ctx.register("on_external_call", m.on_external_call)
function m.on_external_call(paramStr)
-- Handle paramStr to return an integer result
if paramStr == "is_training_match" then
return isTrainingMatchSelected() and 1 or 0
end
end
Last modified: 02 εδΊζ 2024