Open WyrdByWord opened 2 years ago
This already happens with change of focus, but I agree that having an option to invoke the same thing when the timer is paused would be useful.
Yep, this happens if the window loses focus or is minimized. Making this happen when the timer is paused seems like a reasonable request to me, though we'd probably want to make it an option. Either way most of the complicated logic already exists: XGridCtrl::SetPaused
makes the grid render a "(Paused)" message, so we'd just need to tie that to the timer instead of the focus state.
I haven't had a ton of time recently to focus on adding features, but it would likely look like this if someone is excited to pick this up:
src/dialogs/
Here's a PR with a good example of what it looks like to add a setting: https://github.com/mrichards42/xword/pull/64/files (note that all the changes to *.fbp files are ui edits using wxFormBuilder, not something you're supposed to edit by hand)
One thing to think about here - the timer automatically pauses when the puzzle is done (and/or a solver would likely stop the timer upon full completion of the grid). You might not want to hide the grid in that situation - when every square is filled, or something similar? - to avoid interfering with that scenario.
Different sites and such handle this in different ways, but it would be great if there was an option to have the current puzzle blurred out, or otherwise obscured, when the timer is paused or the window focus is lost. Thanks for your consideration!