[Dev Tools] Debug Navigation for quick switching between overlays
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?
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
Hey @spydon happy new year :rocket:
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 :)
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! :fire: