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

Shouldn't AnimationTimer reset on multiple starts prevent any ticks? #297

Open
eugenesvk opened this issue May 10, 2024 · 0 comments
Open

Comments

@eugenesvk
Copy link

If I have a timer that's supposed to only do 1 tick and finish

nwg::AnimationTimer::builder().parent(&d.window).interval(Duration::from_millis(4000))
  .lifetime(Some(Duration::from_millis(4111))).max_tick(None).active(false)
  .build(&mut d.win_tt_timer)?;

And I bind this to, say, a OnContextMenu mouse click on a menu that only does &evt_ui.win_tt_timer.start();, I'd expect multiple consecutive clicks on this menu to reset the timer on every click so that I only get 1 tick/stop event at the end of my clicking + 4 seconds

But it seems that start doesn't reset the timer properly, I still get ticks. Though the End event seems to be correct and only happens end of clicks + 4sec

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

No branches or pull requests

1 participant