Creating pop-ups is a pain in the butt

Post » Tue Aug 22, 2017 8:36 pm

Hi,

I would just like to point out this annoyance that could be addressed at some point in the future.

Popups and UI elements (as in a Pause popup, an on-screen menu, all sorts of game toolbars etc), as do all sprites, currently "leak" touch and mouse click events downwards. So if you click an "ok" button in a dialog box, it will also activate all touch sensitive game elements that happen to be beneath it. This is undesirable for, hopefully, obvious reasons.

I know this is by design but I deliberately use the word leak because, frankly, I think you need user input to stop at the first (topmost) encountered object way more frequently than you need it to work across multiple stacked things. In fact, I struggle to find a use case for the latter.

While this can be manouevred around by switching off groups and juggling variables I think it would make way more sense to have a dedicated layer for UI elements or a setting in layer properties to disable touch and click events propagation.

As an example, I have a game that has a lot of rather complicated inter-related swipe, touch and drag and drop events and some buttons and pop-up messages that appear on top of it. It has already became quite a dancing routine to keep these from interfering with each other. It also introduces clutter with all the logic designed specifically for this purpose.

I don't mean to rant (too much) but I imagine most games will have things that appear on screen that are not directly game-action related, so this might be worth considering so that C3 continues to be one of the most developer-friendly game creation tools out there.
B
16
S
7
G
1
Posts: 158
Reputation: 3,125

Post » Tue Aug 22, 2017 11:15 pm

What if you want multiple popups on multiple layers?
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Wed Aug 23, 2017 7:14 am

Well then I have even more of a reason to want the aforementioned functionality, because now I have to watch out for pop ups interfering with other pop ups, keep track of what should be touch-disabled at a given point etc.

But come to think of it, and considering your question, a dedicated layer may not be the best idea. However, a “stop touch” setting in every layer’s properties would do the trick. I’d just tick that for any layers that are used for UI and be done with it.
Last edited by pirx on Wed Aug 23, 2017 3:25 pm, edited 1 time in total.
B
16
S
7
G
1
Posts: 158
Reputation: 3,125

Post » Wed Aug 23, 2017 9:42 am

pirx wrote:Well then I have even more of a reason to want the aforementioned functionality, because now I have to watch out for pop ups interfering with other pop ups.

But come to think of it, and considering your question, a dedicated layer may not be the best idea. However, a “stop touch” setting in every layer’s properties would do the trick. I’d just tick that for any layers that are used for UI and be done with it.


Actually a good thought, +1
Image Image iTunes: Match3 | Google Play: Match3
B
98
S
33
G
30
Posts: 1,118
Reputation: 27,793

Post » Wed Aug 23, 2017 9:54 am

I feel doing anything UI related in Construct has always been quite a hassle. I would love to have a new type of group node, where every object inside automatically is translated with that group. Kind of how Container "SHOULD" work, in my opinion. Now you have to use pin, and other workarounds if you want to move/scale/rotate multiple connected objects in realtime, and quite often you wanna do that with UI elements and popups etc.
Follow my progress on Twitter
or in this thread Archer Devlog
B
38
S
15
G
17
Posts: 949
Reputation: 12,320

Post » Wed Aug 23, 2017 10:16 am

tunepunk wrote:I feel doing anything UI related in Construct has always been quite a hassle. I would love to have a new type of group node, where every object inside automatically is translated with that group. Kind of how Container "SHOULD" work, in my opinion. Now you have to use pin, and other workarounds if you want to move/scale/rotate multiple connected objects in realtime, and quite often you wanna do that with UI elements and popups etc.


I completely agree. Most of the things I build with C2/C3 are not games, and popups have always been a pain. Both suggestions here (parented views and stopping bubbling) would have been very helpful on many projects.
www.simbucket.com - HTML5 Science Simulations / https://www.airconsole.com/#!play=com.n ... obotrumble - Robot Rumble on AirConsole
B
48
S
13
G
20
Posts: 373
Reputation: 14,484

Post » Wed Aug 23, 2017 3:48 pm

Do you know about the Pick top/bottom condition?

"Pick either the top-most or bottom-most instance, taking in to account layers and Z index. For example, the instance at the front of the top most layer is the top instance."
B
10
S
2
G
1
Posts: 30
Reputation: 675

Post » Wed Aug 23, 2017 5:06 pm

mOOnpunk wrote:Do you know about the Pick top/bottom condition?

"Pick either the top-most or bottom-most instance, taking in to account layers and Z index. For example, the instance at the front of the top most layer is the top instance."


This does not really apply to what we're talking about. The condition you mention is useful when you have mutliple instances of an object stacked and need to pick the topmost one. Like in a deck of cards or something. In the touch-bubbling problem, however, you generally have no idea what will be below your button/window/field/etc during runtime.
B
16
S
7
G
1
Posts: 158
Reputation: 3,125

Post » Wed Aug 23, 2017 5:12 pm

tunepunk wrote:I feel doing anything UI related in Construct has always been quite a hassle. I would love to have a new type of group node, where every object inside automatically is translated with that group. Kind of how Container "SHOULD" work, in my opinion. Now you have to use pin, and other workarounds if you want to move/scale/rotate multiple connected objects in realtime, and quite often you wanna do that with UI elements and popups etc.



+1 on this as well. I doubt we're getting flash style object-within-object-within-object functionality anytime soon (or ever) but the whole pinning things together workflow has gotten a bit old, and generally feels more like a workaround than a real tool.
B
16
S
7
G
1
Posts: 158
Reputation: 3,125


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests