flame icon indicating copy to clipboard operation
flame copied to clipboard

fix: focus stuff

Open renancaraujo opened this issue 2 years ago • 0 comments

Description

This ignores keyboard events if the game widget doesn't have the primary focus. This allows focus nodes on overlay widgets to take precedence on keyboard resolving.

Also, add focus scope in the game widget for when the overlay is removed, the focus goes back to the game.

Also, add tests for GameWidget for all these cases and some more.

Checklist

  • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • [x] I have read the Contributor Guide and followed the process outlined for submitting PRs.
  • [x] I have updated/added tests for ALL new/updated/fixed functionality.
  • [x] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [x] I have updated/added relevant examples in examples.

Breaking Change

  • [ ] Yes, this is a breaking change.
  • [x] No, this is not a breaking change.

Related Issues

This is related to:

  • https://github.com/flame-engine/flame/issues/1710
  • https://github.com/flame-engine/flame/pull/1719

renancaraujo avatar Jun 12 '22 18:06 renancaraujo