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

Method parse_click

source/MaaFramework/Resource/PipelineParser.cpp:1203–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1201}
1202
1203bool PipelineParser::parse_click(const json::value& input, Action::ClickParam& output, const Action::ClickParam& default_value)
1204{
1205 if (!parse_action_target(input, "target", output.target, default_value.target)) {
1206 LogError << "failed to parse_action_target" << VAR(input);
1207 return false;
1208 }
1209
1210 if (!get_and_check_value(input, "contact", output.contact, default_value.contact)) {
1211 LogError << "failed to get_and_check_value contact" << VAR(input);
1212 return false;
1213 }
1214
1215 if (!get_and_check_value(input, "pressure", output.pressure, default_value.pressure)) {
1216 LogError << "failed to get_and_check_value pressure" << VAR(input);
1217 return false;
1218 }
1219
1220 return true;
1221}
1222
1223bool PipelineParser::parse_long_press(const json::value& input, Action::LongPressParam& output, const Action::LongPressParam& default_value)
1224{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected