Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counter example is behaving strangely #77

Closed
melix99 opened this issue Nov 24, 2024 · 4 comments
Closed

Counter example is behaving strangely #77

melix99 opened this issue Nov 24, 2024 · 4 comments
Labels
bug Something isn't working ecs

Comments

@melix99
Copy link

melix99 commented Nov 24, 2024

It seems that something is wrong in the counter example: when I click e.g. the up button a few times, the counter goes up just fine, but if I click the down button once, the counter still goes up. If I click it again, then the counter actually goes down.

Screencast.From.2024-11-24.15-54-51.webm

I initially thought it was somehow caused by #76, so I added some println to make sure that it's not just a rendering error.

@matthunz
Copy link
Collaborator

Hmm thanks for catching this!

I can't seem to reproduce this exact issue, but I have noticed strange click behavior. I'm hoping this is due to the hacky current implementation here:

pub struct Clickable<'a> {

I think ideally the click target should be handled globally by the window 🤔

@matthunz matthunz added bug Something isn't working ecs labels Nov 24, 2024
@matthunz
Copy link
Collaborator

Potentially related #78

@DasLixou
Copy link
Contributor

I have encountered the same thing, I think it is somehow rendering while two adds are still in queue, then they get processed but render already happened so we do nothing and on decrementing, we are only 1 above, not 2.

@matthunz
Copy link
Collaborator

I think you were exactly right @DasLixou 🤔 drawing to the Scene directly from the Compose tree looks like it was causing that, with the only way I could think around it being a lower-level tree.

For now I decided against the custom backend, I think what's most important is to hammer down the core declarative programming tools.

I added some more thoughts here: #78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ecs
Projects
None yet
Development

No branches or pull requests

3 participants