From bce5fa0740330a20b693062bdec77ad45450dc8d Mon Sep 17 00:00:00 2001 From: MistEO Date: Sat, 11 Sep 2021 15:19:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=8A=9E=E5=85=AC=E5=AE=A4?= =?UTF-8?q?=E6=8D=A2=E7=8F=AD=E4=BB=BB=E5=8A=A1=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MeoAssistance/Assistance.cpp | 9 +++- MeoAssistance/InfrastAbstractTask.cpp | 30 +++++++++++ MeoAssistance/InfrastAbstractTask.h | 4 +- MeoAssistance/InfrastOfficeTask.cpp | 47 ++++++++++++++++++ MeoAssistance/InfrastOfficeTask.h | 19 +++++++ MeoAssistance/MeoAssistance.vcxproj | 2 + MeoAssistance/MeoAssistance.vcxproj.filters | 6 +++ MeoAssistance/Task.h | 3 +- .../template/special/ContactSuspended.png | Bin 0 -> 2857 bytes 9 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 MeoAssistance/InfrastOfficeTask.cpp create mode 100644 MeoAssistance/InfrastOfficeTask.h create mode 100644 resource/template/special/ContactSuspended.png diff --git a/MeoAssistance/Assistance.cpp b/MeoAssistance/Assistance.cpp index d3b4dc7093..cf0e77d8be 100644 --- a/MeoAssistance/Assistance.cpp +++ b/MeoAssistance/Assistance.cpp @@ -234,7 +234,7 @@ bool Assistance::start_debug_task() //} { constexpr static const char* InfrastTaskCahin = "Debug"; - auto shift_task_ptr = std::make_shared(task_callback, (void*)this); + auto shift_task_ptr = std::make_shared(task_callback, (void*)this); shift_task_ptr->set_task_chain(InfrastTaskCahin); m_tasks_deque.emplace_back(shift_task_ptr); } @@ -365,6 +365,13 @@ bool asst::Assistance::start_infrast() power_task_ptr->set_task_chain(InfrastTaskCahin); m_tasks_deque.emplace_back(std::move(power_task_ptr)); + // 返回基建的主界面 + append_match_task(InfrastTaskCahin, { "InfrastBegin" }); + + auto office_task_ptr = std::make_shared(task_callback, (void*)this); + office_task_ptr->set_task_chain(InfrastTaskCahin); + m_tasks_deque.emplace_back(std::move(office_task_ptr)); + // 全操作完之后,再返回基建的主界面 append_match_task(InfrastTaskCahin, { "InfrastBegin" }); diff --git a/MeoAssistance/InfrastAbstractTask.cpp b/MeoAssistance/InfrastAbstractTask.cpp index 303c4f7720..8e7a3be8d0 100644 --- a/MeoAssistance/InfrastAbstractTask.cpp +++ b/MeoAssistance/InfrastAbstractTask.cpp @@ -86,6 +86,36 @@ bool asst::InfrastAbstractTask::swipe(bool reverse) //#endif } +bool asst::InfrastAbstractTask::swipe_left() +{ + const static Rect right_rect(Configer::WindowWidthDefault * 0.8, + Configer::WindowHeightDefault * 0.4, + Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.2); + + const static Rect left_rect(Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.4, + Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.2); + + return m_controller_ptr->swipe(left_rect, right_rect); +} + +bool asst::InfrastAbstractTask::swipe_right() +{ + const static Rect right_rect(Configer::WindowWidthDefault * 0.8, + Configer::WindowHeightDefault * 0.4, + Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.2); + + const static Rect left_rect(Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.4, + Configer::WindowWidthDefault * 0.1, + Configer::WindowHeightDefault * 0.2); + + return m_controller_ptr->swipe(right_rect, left_rect); +} + std::vector