Error Tools
有点死了,不小心把Termux删了,源码啥的都在里面
好消息: 我一直同步在github,基本没损失
坏消息: imgui更新了,有些函数没了,要适配
坏消息: imgui更新了,有些函数没了,要适配
Error Tools
开源触摸穿透处理方案?
开源: Fe11
转载不留名死全家
转载不留名死全家
/**
* Vector2 pos: 触摸点的屏幕坐标
* 必须头文件: imgui.h imgui_internal.h
*/
bool handle_touch_penetration(Vector2 pos)
{
for (const auto& window : GImGui->Windows)
{
// 跳过所有非主窗口
if (window->Flags & ImGuiWindowFlags_ChildWindow
|| window->Flags & ImGuiWindowFlags_Tooltip
|| window->Flags & ImGuiWindowFlags_Popup
|| window->Flags & ImGuiWindowFlags_Modal
|| window->Flags & ImGuiWindowFlags_ChildMenu)
continue;
bool IsObstacle = pos.x >= window->Pos.x
&& pos.x <= window->Pos.x + window->Size.x
&& pos.y >= window->Pos.y
&& pos.y <= window->Pos.y + window->Size.y;
LOGD("[触摸监视器](%.0fx%.0f): %.0fx%.0f ~ %.0fx%.0f\t%s\n", pos.x, pos.y,
window->Pos.x, window->Pos.y,
window->Pos.x + window->Size.x, window->Pos.y + window->Size.y,
IsObstacle ? "\033[31m阻断上传\033[0m" : "");
if (IsObstacle) return true;
}
return false.
}
// 使用例子
// 在处理触摸事件的循环内
if (handle_touch_penetration(touch_pos)) break; // 跳出循环,同时也跳过上传
Error Tools
希望你们都能成为大牛 https://github.com/FullError11/KPM-Builder
已修复编译后的kpm模块不可用的BUG