Skip to content

Fix stage's onClick event#583

Merged
JiepengTan merged 1 commit intogoplus:devfrom
JiepengTan:pr_fix_stage_on_click_event
Apr 16, 2025
Merged

Fix stage's onClick event#583
JiepengTan merged 1 commit intogoplus:devfrom
JiepengTan:pr_fix_stage_on_click_event

Conversation

@JiepengTan
Copy link
Copy Markdown
Contributor

@JiepengTan JiepengTan commented Apr 15, 2025

The stage's onClick event should only be triggered when it is not occluded by any sprite
issue: #580
test project: match3.zip

@JiepengTan JiepengTan requested a review from nighca April 15, 2025 11:12
@JiepengTan JiepengTan force-pushed the pr_fix_stage_on_click_event branch from e5af232 to 70de1d6 Compare April 15, 2025 12:03
nighca
nighca previously approved these changes Apr 16, 2025
Comment thread game.go Outdated
}
}

if p.inputs.canTriggerClickEvent(inputStageClickTimerId) {
Copy link
Copy Markdown
Contributor

@nighca nighca Apr 16, 2025

Choose a reason for hiding this comment

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

What if some sprite is clicked (isClicked: true), while p.inputs.canTriggerClickEvent(syncSprite.GetId()) returns false because of inputMouseClickIntervalMs check? The stage-click will be triggered, which I think is not expected.

@nighca nighca dismissed their stale review April 16, 2025 01:16

I think I missed some issue.

@JiepengTan JiepengTan force-pushed the pr_fix_stage_on_click_event branch from 70de1d6 to b8d350e Compare April 16, 2025 01:52
@JiepengTan JiepengTan requested a review from nighca April 16, 2025 01:53
@JiepengTan JiepengTan merged commit 151f2e2 into goplus:dev Apr 16, 2025
2 checks passed
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.

2 participants