[Monarch] [Feature Request] Keep input focus on scene behind popup

Hi,
I’m currently working on the Shop section of my game and I’m “porting” all the dialogs, scenes, screens to @britzl’s Monarch.

The shop consists of a grid with all the item’s icons: tap on one of them and the buy dialog pups up. The latter doesn’t cover all of the screen (it’s pretty small) and if you tapped on another item (without closing it) the relevant buy dialog would show up.

This behavior reduces the number of tap the user needs to perform in order to get to something (see the 3-taps rule) and although it isn’t the most important thing in UX design, it makes the UI “perform” better.

I didn’t find a way in Monarch to keep the input focus on one of the background screens. For now I’m using a workaround that involves sending a message from the topmost to the required screen when the input x,y goes outside the popup boundaries.

Let me know if this sounds like a useful feature request.

Note: I wasn’t sure if this post should have gone to “Questions” or “Feature Requests” since it isn’t directly related to the engine. If I did a mistake let me know and I’ll move it to the relevant section.

This is the same as @Pawel requested here: Switching tabs in GUI

And I created an issue for it here: https://github.com/britzl/monarch/issues/48

I’m working on some other Monarch stuff right now. I’ll try to add support for this later today.

7 Likes

This feature has been added on a branch:

Could you please give it a try and let me know if it works as expected?

2 Likes

Thank you for the quick response.
I’ve just tested it and it works! It took me a second to figure out that the scene that needs to have the “Input Below Popup” checked is the one below the popup.

Wouldn’t be useful to have this options for “above” screens too? In my example I’d need the input enabled for one type of dialogs only.

Ah, good point! Let me add that as well.

1 Like

I added another checkbox and renamed to:

  • Screen Keeps Input Focus When Below Popup (boolean) - Check this if the screen should keep input focus when it is below a popup.
  • Others Keep Input Focus When Below Screen (boolean) - Check this if other screens should keep input focus when below this screen.
3 Likes

Thank you, it works nicely!

One last thing we should mention is the length of the parameters, here are a couple of random ideas to make them shorter (but not necessarily clearer).

The screen should keep input focus when it is below a popup:

  • Keep Input Focus
  • Keep Input Below Popup
  • Input Focus Below Popup

Other screens should keep input focus when below this screen:

  • Keep Below Screens Focus
  • Keep Below Screens Input
  • Keep Previous Screens Focus
  • Keep Previous Screens Input

Yes, they are long but I believe it is clear from their name now what they actually mean. I struggled to find shorter names that were clear.

This is good. A slightly longer name would be Keep Input Focus Below Popup.

I’m not very fond of any of these. It’s not immediately obvious what they mean.