Skip to content

Commit

Permalink
fix!: Game.mouseCursor and Game.overlays can now be safely set during…
Browse files Browse the repository at this point in the history
… onLoad (#1498)
  • Loading branch information
st-pasha authored May 20, 2022
1 parent d67065e commit 821d01c
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 277 deletions.
4 changes: 2 additions & 2 deletions examples/lib/stories/input/mouse_cursor_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class MouseCursorExample extends FlameGame with MouseMovementDetector {
if (hovering) {
if (!onTarget) {
//Entered
mouseCursor.value = SystemMouseCursors.grab;
mouseCursor = SystemMouseCursors.grab;
}
} else {
if (onTarget) {
// Exited
mouseCursor.value = SystemMouseCursors.move;
mouseCursor = SystemMouseCursors.move;
}
}
onTarget = hovering;
Expand Down
Loading

0 comments on commit 821d01c

Please sign in to comment.