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

Method get_target_pos

source/MaaWin32ControlUnit/Input/SeizeInput.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22std::pair<int, int> SeizeInput::get_target_pos() const
23{
24 if (last_pos_set_) {
25 return last_pos_;
26 }
27
28 // 未设置时返回窗口客户区中心
29 RECT rect = { };
30 if (hwnd_ && GetClientRect(hwnd_, &rect)) {
31 return { (rect.right - rect.left) / 2, (rect.bottom - rect.top) / 2 };
32 }
33 return { 0, 0 };
34}
35
36MaaControllerFeature SeizeInput::get_features() const
37{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected