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

[Dev Tools] Debug Navigation for quick switching between overlays #3397

Open
1 task done
BenAuerDev opened this issue Dec 14, 2024 · 3 comments
Open
1 task done

[Dev Tools] Debug Navigation for quick switching between overlays #3397

BenAuerDev opened this issue Dec 14, 2024 · 3 comments

Comments

@BenAuerDev
Copy link

BenAuerDev commented Dec 14, 2024

Problem to solve

When building multiple overlays, I caught myself changing initialActiveOverlays and reloading quite a few times.

Proposal

It would be nice if there was some sort of debug navigation in the dev tools allowing to quickly jump between overlays.

More information

No response

Other

  • Are you interested in working on a PR for this?
@spydon
Copy link
Member

spydon commented Dec 14, 2024

Great idea, I think this should be fairly trivial to add to the Flame DevTools:
https://github.com/flame-engine/flame/blob/main/packages/flame_devtools/README.md

@BenAuerDev
Copy link
Author

Hey @spydon happy new year 🚀

I had a look at the code of the flame_devtools and tried to get the overlays like:

registerExtension(
  'ext.flame_devtools.getOverlays',
  (method, parameters) async {
    final overlays = game.overlays.activeOverlays;
    return ServiceExtensionResponse.result(
      json.encode({
        'overlays': overlays,
      }),
    );
  },
);

but this returns null if no overlays are active.

Is it possible to access overlayBuilderMap of a game within registerExtension or would it make sense to add the logic to do so?

PS: This is a first draft of the UI part, if you have any remarks or something please let me know :)

screenshot-2025-01-02-11-37-48

@spydon
Copy link
Member

spydon commented Jan 5, 2025

Is it possible to access overlayBuilderMap of a game within registerExtension or would it make sense to add the logic to do so?

I guess you could expose the _builder in OverlayManager too? Or just add a method to get all the overlay keys in there?

PS: This is a first draft of the UI part, if you have any remarks or something please let me know :)

Very nice! I think the overlays section should probably shrink to only take up as little space as it needs, since there will be a lot more components than overlays in most cases, and if there are no overlays it would be good if the section didn't show at all.

Happy new year to you too! 🔥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants