How to make nice settings window

Hi guys,

I was wondering how to make nice lookinv settings window (like one in the Pop the lock game).
How to make white rounded Rect that seems like real settings window style?

native.showAlert() function does not do the trick… it is ugly.

Do I have to make window so that it is basically a standalone graphical element, and setrings buttons are also separate elements?

There is no module for this?

Tnx.
G

Are you using composer? Try 

composer.showOverlay( sceneName [, options] )

@InfiSnyp’s suggestion of using a Composer overlay is a good one, if you’re using Composer.

But all you need is a display.newGroup() and center a display.newRoundedRect() and add your buttons and insert them and the rounded rect into the group.  On the close button, simply remove the group using display.remove().

Rob

I would use the group method for other things. But for a settings menu I think I’d want a separate lua file.

Depends on how complex it is I suppose. Certainly having it in its own Lua file makes sense in most cases.  Composer makes sense if the OP is using it.

Hi InfiSnyp,

Hi Rob,

I will try with:

composer.showOverlay( sceneName [, options] )

Because when I have it all in the same .lua file, I have to hide settings buttons, settings background groups alpha to zero.

Otherwise they are always present on screen?

Are you using composer? Try 

composer.showOverlay( sceneName [, options] )

@InfiSnyp’s suggestion of using a Composer overlay is a good one, if you’re using Composer.

But all you need is a display.newGroup() and center a display.newRoundedRect() and add your buttons and insert them and the rounded rect into the group.  On the close button, simply remove the group using display.remove().

Rob

I would use the group method for other things. But for a settings menu I think I’d want a separate lua file.

Depends on how complex it is I suppose. Certainly having it in its own Lua file makes sense in most cases.  Composer makes sense if the OP is using it.

Hi InfiSnyp,

Hi Rob,

I will try with:

composer.showOverlay( sceneName [, options] )

Because when I have it all in the same .lua file, I have to hide settings buttons, settings background groups alpha to zero.

Otherwise they are always present on screen?