Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Input manager/plugin question


Sturb
 Share

Recommended Posts

Hi, I'm building a live editing/debugging plugin for my Phaser games. I want this plugin to have keyboard shortcuts to toggle (wake/sleep) the plugin's GUI scene and other editing/debugging stuff.

The problem I'm running into is that it seems each scene that's loaded has its own instance of an InputPlugin. This is making it difficult to wire up "global" keyboard controls for my plugin when my games switch and shutdown scenes, which results in the keyboard events being dumped. I do have a separate scene that my plugin overlays my game scenes, however my plugin scene can be toggled by using wake and sleep. When my plugin scene is asleep its InputPlugin doesn't receive key events because it isn't being updated.

InputManager found on the game instance within the pluginĀ on the other hand seems to only handle pointer events.

I was wondering if there is a way to have a "global" InputPlugin instance that my own plugin can use that isn't tied to a scene. I would like to use the wake/sleep functionality of the SceneManager to be able to toggle my plugin GUI scene without blocking keyboard input.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...