mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 17:57:01 +08:00
feat: 点刺、后勤种子存钱 & ProcessTask 添加 Input 方法 (#11521)
* feat: 为 ProcessTask 添加文本输入功能 * feat: 点刺、后勤种子存钱 * docs: 为 Input 方法添加文档 * perf: 添加循环刷钱cd检查 * perf: werror * perf: 改变 Input 的 int 值 * perf: 减少 AsstProxy 传参,改用 c:Binding * chore: 界面显示和获取分离 --------- Co-authored-by: uye <99072975+ABA2396@users.noreply.github.com>
This commit is contained in:
@@ -336,6 +336,16 @@ bool asst::AdbController::click(const Point& p)
|
||||
return call_command(cur_cmd).has_value();
|
||||
}
|
||||
|
||||
bool asst::AdbController::input(const std::string& text)
|
||||
{
|
||||
if (text == "") {
|
||||
Log.error("empty text");
|
||||
}
|
||||
|
||||
std::string cur_cmd = utils::string_replace_all(m_adb.input, { { "[text]", text } });
|
||||
return call_command(cur_cmd).has_value();
|
||||
}
|
||||
|
||||
bool asst::AdbController::swipe(
|
||||
const Point& p1,
|
||||
const Point& p2,
|
||||
@@ -996,6 +1006,7 @@ bool asst::AdbController::connect(const std::string& adb_path, const std::string
|
||||
}
|
||||
|
||||
m_adb.click = cmd_replace(adb_cfg.click);
|
||||
m_adb.input = cmd_replace(adb_cfg.input);
|
||||
m_adb.swipe = cmd_replace(adb_cfg.swipe);
|
||||
m_adb.press_esc = cmd_replace(adb_cfg.press_esc);
|
||||
m_adb.screencap_raw_with_gzip = cmd_replace(adb_cfg.screencap_raw_with_gzip);
|
||||
|
||||
Reference in New Issue
Block a user