UI across all scenes

Hello again
i have a question about User Interface feature

How can i make mu UI(that stores in myui.lua or something) to span across all scenes(using director) and to be on top of other display objects?

hope it makes sense, any help is appreciated [import]uid: 16142 topic_id: 14861 reply_id: 314861[/import]

nevermind, i solved it myself) just needed to call function after defining background [import]uid: 16142 topic_id: 14861 reply_id: 54881[/import]

Can you post some sample code? I feel I’m doing the same thing but in a very bad way.
[import]uid: 19626 topic_id: 14861 reply_id: 54905[/import]

yeah, why not…
this is ui.lua
[lua]module(…,package.seeall)

function bla()
local tabGroup = display.newGroup()
tabGroup.x = display.contentWidth/2 - 150
tabGroup.y = display.contentHeight-100

return true
end[/lua]
i stripped it down from details

and it level1.lua or whatever i just require this module and call ui.bla() as last thing before returning localgroup for director class

same with every scene, works fine so far [import]uid: 16142 topic_id: 14861 reply_id: 54921[/import]

Your experimentation came up with the “correct” answer. Which is always cool when it happens. :slight_smile:

The thing about Director that a lot of people never think about is that it isn’t “magic” – it just seems like it sometimes. :slight_smile:

In a nutshell what happens is that you build everything on a screen and then pass that to Director, which takes care of displaying it to the user.

So whether you want toolbars that always show the same way, or a little floating widget that spans screens, you just create it the same way you would for a single screen – Director just handles the details of ditching the old screen and showing the new one.

Jay
[import]uid: 9440 topic_id: 14861 reply_id: 54931[/import]