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

Method parse_touch

source/MaaFramework/Resource/PipelineParser.cpp:1346–1364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1344}
1345
1346bool PipelineParser::parse_touch(const json::value& input, Action::TouchParam& output, const Action::TouchParam& default_value)
1347{
1348 if (!get_and_check_value(input, "contact", output.contact, default_value.contact)) {
1349 LogError << "failed to get_and_check_value contact" << VAR(input);
1350 return false;
1351 }
1352
1353 if (!parse_action_target(input, "target", output.target, default_value.target)) {
1354 LogError << "failed to parse_action_target target" << VAR(input);
1355 return false;
1356 }
1357
1358 if (!get_and_check_value(input, "pressure", output.pressure, default_value.pressure)) {
1359 LogError << "failed to get_and_check_value pressure" << VAR(input);
1360 return false;
1361 }
1362
1363 return true;
1364}
1365
1366bool PipelineParser::parse_touch_up(const json::value& input, Action::TouchUpParam& output, const Action::TouchUpParam& default_value)
1367{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected