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

fix: Fix flame package example app #1709

Merged
merged 2 commits into from
Jun 7, 2022
Merged

fix: Fix flame package example app #1709

merged 2 commits into from
Jun 7, 2022

Conversation

luanpotter
Copy link
Member

Description

Our main example for the flame package was no longer working due to some changes on the input system, namely the need to manually mark events as handled.
I also removed some pausing logic that I do not think belongs on the main example, that can be a separate topic on the dashbook example. This example should be simple and contain key learning topics.

Checklist

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

Breaking Change

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@@ -80,6 +67,7 @@ class Square extends PositionComponent with Tappable {
@override
bool onTapUp(TapUpInfo info) {
removeFromParent();
info.handled = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this needes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because returning true no longer sets it automatically

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why does it need to be set?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so the check to avoid adding a new square works

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise it will remove and then re-add the square. that is doing nothing with extra steps

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me try

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought true meant handled

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true means continue to propagate, but it always ends up on the game it seems like? I wonder if that is a bug...
You can check info.continuePropagation on the game, but then it's cleaner to do lile you did before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it must have always been like that, since that is the entry point, I'll merge this

@luanpotter luanpotter requested a review from a team June 7, 2022 09:53
@@ -80,6 +67,7 @@ class Square extends PositionComponent with Tappable {
@override
bool onTapUp(TapUpInfo info) {
removeFromParent();
info.handled = true;
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here 👆

@spydon spydon merged commit bd2ef96 into main Jun 7, 2022
@spydon spydon deleted the luan.fix-example branch June 7, 2022 13:54
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

Successfully merging this pull request may close these issues.

3 participants