MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / CustomTouchDown

Function CustomTouchDown

source/binding/NodeJS/src/apis/callback.cpp:278–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278MaaBool CustomTouchDown(int32_t contact, int32_t x, int32_t y, int32_t pressure, void* trans_arg)
279{
280 auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg);
281 auto ctx = customCtx->callbacks["touch_down"];
282 return ctx->Call<bool>([&](maajs::FunctionType func) {
283 return func.Call(
284 {
285 maajs::NumberType::New(func.Env(), contact),
286 maajs::NumberType::New(func.Env(), x),
287 maajs::NumberType::New(func.Env(), y),
288 maajs::NumberType::New(func.Env(), pressure),
289 });
290 });
291}
292
293MaaBool CustomTouchMove(int32_t contact, int32_t x, int32_t y, int32_t pressure, void* trans_arg)
294{

Callers

nothing calls this directly

Calls 2

CallMethod · 0.45
EnvMethod · 0.45

Tested by

no test coverage detected