director 1.4 and game huds

Has anyone had any issues with thier in-game hud using director 1.4 I was using 1.3 and everything was strait. But after switching to 1.4 my hud group seems to be automagicly entered into my localgroup. Has anyone found a workaround for this? can I just do something like

Thanks

Well director 1.4 have a built-in function that adds all objects into the localgroup

- clean() function is back
- new start() function on books
- initVars() is called after scene is loaded
- improved error handling
- bug fixes on pop up
- group recreation (internal)
- missed objects are now inserted on localGroups
- protection handle now "tap" listeners
- lot more!

Thats the thing my objects are not missed. They are inserted into a seperate group called, gameHud. I would think missed means objects that are not inserted into any groups. Thats what baffles me. Its all good though I will stick with version 1.3 for now

Thanks

@skalistican6

Your group should be created at the main.lua file. With this, Director doesn't insert it into the scene group.

So the hud group should be in the main.lua file?

If you test it with the Ghosts vs Monsters example game, (it uses director 1.1), you can see this in action, the hudGroup is inserted in to the local group and moves with the screen.

Ricardo, First off thanks for the awesome director. You are the man. And thanks for taking the time to reply.

Im not sure if I can create the hudGroup in the main.lua file, as the user interacts with the hudGroup frequently. Im sure there is a way to implement my hudGroup in my main.lua but i'm still pretty noobish when it comes to transfering info between lua files with out using global variables. How would you implement this if I needed my users to interact with the hudGroup. How can I insert all my hud items into a group that is in another lua file?

Thanks again for the reply

Thanks!

Well, you can try something like this:

Scene for creation

1
2
3
4
5
6
...
local hudGroup = display.newGroup()
hudGroup.directorId = "main"
--
director:changeScene( { hud = hudGroup }, "scene2" )
...

[edit] comment removed, was meant for yesterday!

Thanks, I will give this a try when I get off work in the morning.

Thanks again :)

views:1358 update:2011/10/16 9:47:44
corona forums © 2003-2011