Hi,
As a Lua and Gideros programmer I am now 2 weeks old. Dipping my toes in the water, I've been looking for ways to make a sprite-based object 'modal'. That is, to give it full focus at the expense of all other visible objects on the screen. While I can see this being done laboriously by managing focus of each individual object, I am hoping there might be a less intensive method already available in gideros.
In this application, there will be a number of edit boxes on the screen. Some text entry via keypad, others will have popup lists for selection. While the popup list (sprite) is on screen, I don't want any of the edit boxes to be active.
Options:
1 - get off your lazy a*** and do the work; or
2 - ah, there's a you-beaut function called [name here] you can use
3 - here's a pointer to an example.
Cheers, Mike.
Comments
GiderosCodingEasy provides better control for Z-axis manipulation :
Note : You probably know it, but you don't need to remove a Sprite from his parent before adding it to another parent.
Intercept clics
You can set your top layer (for example an invisible shape) to stop events propagation.
This is how I do it, but I am not the most knowledgeable member of this community so please wait a little for more answers (but you can try my solution in the meantime ).
Or you could use native alert messages using AlertDialog class or TextInputDialog class for text input, both of them are also modal
Actually shortly after posting I came up with the 'invisible shape' solution myself. In fact, if you colour fill it (say, black) and make alpha just right, it gives the appearance of 'greying out' the other objects, thus making it obvious they aren't available - beautiful.
Likes: ar2rsawseen