Skip to content

perf: 调整快速资源包中的通用按钮流水线设置#1046

Merged
MistEO merged 10 commits intomainfrom
Perf/CommonButton
Mar 6, 2026
Merged

perf: 调整快速资源包中的通用按钮流水线设置#1046
MistEO merged 10 commits intomainfrom
Perf/CommonButton

Conversation

@overflow65537
Copy link
Member

@overflow65537 overflow65537 commented Mar 6, 2026

Summary by Sourcery

增强功能:

  • 调整快速资源包中的通用按钮流水线设置。
Original summary in English

Summary by Sourcery

Enhancements:

  • Adjust common button pipeline settings in the fast resources package.
- 调整 fast resources 包中通用按钮流水线(pipeline)配置。
Original summary in English

Summary by Sourcery

增强功能:

  • 调整快速资源包中的通用按钮流水线设置。
Original summary in English

Summary by Sourcery

Enhancements:

  • Adjust common button pipeline settings in the fast resources package.

@overflow65537 overflow65537 marked this pull request as ready for review March 6, 2026 14:09
Copilot AI review requested due to automatic review settings March 6, 2026 14:09
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

嗨,我已经审查了你的修改,看起来非常棒!


Sourcery 对开源项目是完全免费的——如果你喜欢我们的代码审查,请考虑帮忙分享 ✨
帮我变得更有用吧!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进后续的代码审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本 PR 主要针对 resource_fast 中的通用按钮流水线配置做结构化调整:将多个按钮的识别从“单节点多模板”改为“Or 组合 + 稳定/悬浮子节点”,并补充/调整部分按钮相关资源,以提升识别的适配性与可维护性。

Changes:

  • 将多个按钮节点改为 Or(any_of: [稳定态, 悬浮态]) 的组合识别结构,并抽出对应的子识别节点。
  • 调整 CloseRewardsButton 的组合识别结构(新增 box_index,拆分按钮稳定/悬浮识别)。
  • 增补/更新按钮相关图片资源(含 resource_adb 覆盖资源)。

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated 5 comments.

File Description
assets/resource_fast/pipeline/Common/Button.json 重构多类按钮识别为 Or 组合与子节点复用,调整部分按钮识别逻辑
assets/resource_fast/image/Common/Button/CloseButtonType5.png 按钮模板图片资源变更(但当前流水线未见引用,需确认用途)
assets/resource_adb/image/Common/Button/CloseRewardImage.png 为 ADB 资源层新增/更新奖励界面检测图标模板

Comment on lines 401 to +442
@@ -365,26 +416,49 @@
]
}
},
"__YellowConfigmButtonType1Icon": {
"recognition": {
"type": "Or",
"param": {
"any_of": [
"__YellowConfigmButtonType1IconStable",
"__YellowConfigmButtonType1IconHover"
]
}
}
},
"__YellowConfigmButtonType1IconStable": {
"recognition": {
"type": "TemplateMatch",
"param": {
"roi": "YellowButtonBackground",
"template": [
"Common/Button/YellowConfirmButtonType1.png"
],
"threshold": 0.9
}
}
},
"__YellowConfigmButtonType1IconHover": {
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__YellowConfigmButtonType1Icon/__YellowConfigmButtonType1IconStable/__YellowConfigmButtonType1IconHover 中的 Configm 看起来是拼写错误(应为 Confirm)。建议统一更正节点名并同步更新 YellowConfirmButtonType1 的引用,避免后续维护时误解。

Copilot uses AI. Check for mistakes.
}
},
"__CloseRewardsButton": {
"desc": "关闭奖励界面按钮,位于界面中部偏下,无文字,对号标志 仅",
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__CloseRewardsButtondesc 以“仅”结尾,描述不完整(疑似想表达“仅用于组合识别”等)。建议补全或删除多余文字,避免误导。

Suggested change
"desc": "关闭奖励界面按钮,位于界面中部偏下,无文字,对号标志",
"desc": "关闭奖励界面按钮,位于界面中部偏下,无文字,对号标志,仅用于组合识别",

Copilot uses AI. Check for mistakes.
Comment on lines 1017 to 1060
@@ -635,6 +1043,18 @@
]
}
},
"__CloseRewardsButton": {
"desc": "关闭奖励界面按钮,位于界面中部偏下,无文字,对号标志 仅",
"recognition": {
"type": "Or",
"param": {
"any_of": [
"__CloseRewardsButtonStable",
"__CloseRewardsButtonHover"
]
}
}
},
"DectedCloseRewardsImage": {
"desc": "检测到奖励界面时的图标",
"recognition": {
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

节点名 DectedCloseRewardsImage 疑似拼写错误(应为 DetectedCloseRewardsImage)。当前该名称只在本文件内使用,建议更正节点名并同步更新 CloseRewardsButtonall_of 引用,提升可读性并避免后续复制粘贴继续扩散该拼写。

Copilot uses AI. Check for mistakes.
Comment on lines 699 to +763
@@ -533,35 +717,123 @@
]
}
},
"WhiteConfirmButtonType2": {
"desc": "通用确认按钮,有文字,白色底,对号形标志",
"__WhiteConfirmButtonType1": {
"desc": "通用确认按钮,有文字,白色底,圆环形标志仅用于组合识别",
"recognition": {
"type": "And",
"param": {
"all_of": [
"WhiteButtonBackground",
{
"recognition": {
"type": "TemplateMatch",
"param": {
"roi": "WhiteButtonBackground",
"roi_offset": [
-20,
-20,
60,
40
],
"template": [
"Common/Button/WhiteConfirmButtonType2.png",
"Common/Button/WhiteConfirmButtonType2Hover.png"
],
"threshold": 0.9
}
}
}
"__WhiteConfirmButtonType1Icon"
],
"box_index": 1
}
}
},
"__WhiteConfirmButtonType1commonSearchAreas1": {
"desc": "通用确认按钮,有文字,白色底,圆环形标志仅用于组合识别",
"recognition": {
"type": "Or",
"param": {
"any_of": [
"__WhiteConfirmButtonType1commonSearchAreas1Stable",
"__WhiteConfirmButtonType1commonSearchAreas1Hover"
]
}
}
},
"__WhiteConfirmButtonType1commonSearchAreas1Stable": {
"desc": "通用确认按钮,有文字,白色底,圆环形标志仅用于组合识别",
"recognition": {
"type": "TemplateMatch",
"param": {
"roi": [
672,
416,
608,
304
],
"template": "Common/Button/WhiteConfirmButtonType1.png",
"threshold": 0.9
}
}
},
"__WhiteConfirmButtonType1commonSearchAreas1Hover": {
"desc": "通用确认按钮,有文字,白色底,圆环形标志仅用于组合识别",
"recognition": {
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__WhiteConfirmButtonType1commonSearchAreas1(以及 stable/hover 子节点)中的 commonSearchAreas1 命名风格与本文件其他 __XxxYyy(PascalCase)不一致,且可读性较差。建议统一为 PascalCase(例如 __WhiteConfirmButtonType1CommonSearchArea1*)并同步更新引用,降低维护成本。

Copilot uses AI. Check for mistakes.
Comment on lines 1137 to +1147
"CloseButtonType1": {
"desc": "通用退出按钮,位于界面右上角的X,不兼容ESC菜单",
"recognition": {
"type": "TemplateMatch",
"type": "Or",
"param": {
"roi": [
882,
0,
398,
335
],
"template": [
"Common/Button/CloseButtonType1.png",
"Common/Button/CloseButtonType2.png",
"Common/Button/CloseButtonType3.png",
"Common/Button/CloseButtonType4.png",
"Common/Button/CloseButtonType5.png"
],
"threshold": 0.9
"any_of": [
"__CloseButtonType1",
"__CloseButtonType2",
"__CloseButtonType3",
"__CloseButtonType4"
]
Copy link

Copilot AI Mar 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CloseButtonType1 现在只在 any_of 中包含 __CloseButtonType1~__CloseButtonType4,但本 PR 里也包含了 CloseButtonType5.png 资源。若 Type5 仍对应实际界面按钮,这里会导致识别覆盖回退/缺失;若已不再需要,建议删除/回收该资源并在配置中注明原因,避免“资源存在但永远不会被引用”。

Copilot uses AI. Check for mistakes.
@MistEO MistEO changed the title Perf/common button perf: 调整快速资源包中的通用按钮流水线设置 Mar 6, 2026
@MistEO MistEO merged commit c2aec97 into main Mar 6, 2026
21 checks passed
@MistEO MistEO deleted the Perf/CommonButton branch March 6, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants