korlibs / korlibs/korge

click not possible throught overlaying view

Open
#756 0 comments 0 reactions 0 assignees View on GitHub
bug check
Dominant language
Kotlin
Stars
3k
Forks
148
Avg merge
13h 44m
Merged PRs (30d)
1

Description

In Korge 2 it's not possible to click throught an overlaying view even if mouseEnabled is set to false.
This is a basic sample for reproducing:

```
suspend fun main() = Korge(width = 512, height = 512, bgcolor = Colors["#2b2b2b"]) {
val rectFront = SolidRect(100, 100, Colors.GREEN)
rectFront.apply {
mouseEnabled = false
}
val rectBack = SolidRect(300, 300, Colors.ALICEBLUE)
rectBack.apply {
mouse {
up {
color = if (color == Colors.ALICEBLUE) Colors.CHOCOLATE
else Colors.ALICEBLUE
}
}
}
addChild(rectBack)
addChild(rectFront)
}
```

I expect the rectBack changing its color even if I'm clicking on rectFront, but it's not.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the Kotlin reproduction in the issue and inspect Korge's mouse event handling for mouseEnabled. Verify whether clicks on the front SolidRect reach the back SolidRect, then confirm the back rectangle changes color when the overlay is disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.