applelifer wrote:Any plans to port this to iOS. I would really like it. Thanks! Moai is awesome!
Is there something specific that's not working on that platform? Unfortunately, I don't having anything that could run it, so you're going to have to give me more information about the issue(s) before I'm able to do anything. It was written using MOAI's Lua implementation, so it should run on anything MOAI supports. Unless you are referring to input handling for mobile devices, in which case, I haven't gotten around to adding anything.
ibisum wrote:Just wondering if there has been any changes to this lately, particularly regarding the layer handling of events? When I tried to use this, it was in combination with the scene.lua library also published, but these two frameworks aren't compatible with each other due to the way layer events were being handled in each library. So, if there is a way to use scenes and the guilibrary, I'd love to hear it!
I haven't worked with this scene.lua library to which you are referring. I'm going to guess the situation is:
1. Create a scene - a layer is added
2. Create the gui - a layer is added
3. At some point later you're creating a second scene, which adds a third layer, on top of the gui's layer. This prevents the gui from properly receiving events.
With the way MOAI is designed, I believe a GUI system must always be the top layer. Otherwise, events will be caught by any layers above it. Unfortunately, MOAI currently doesn't have a way to remove a specific layer from the layer rendering stack. I -think- MOAILayerBridge2D could be used to fix this, as it looks like it was intended for HUD elements. However, from what I've seen, MOAILayerBridge2D only deals with rendering, and not input handling. I could be wrong, though, as I haven't really delved into its functionality.
A possibility (although hardly ideal) would be to maintain an intermediate layer stack. This would be how you would want the layers ordered, and the stack you would deal with. Whenever a change to it is made, all the layers would be popped off MOAI's layer stack, and the layers would be pushed back on according to the intermediate stack.