Widget Candy widgets reset to pre-transition attributes/positions on orientation change?

Hi,

I’m really struggling with this issue on ios 

My interface looks fine, I do a few transitions using alpha fades and position changes to phase in my menu.

However, when the device is rotated (simulator or device), the widget candy elements reset to their original positions and alpha settings, ie. as if they were just created.

It’s as if WC doesn’t know their current properties post transition to handle the re-layout upon orientation change, does that make sense? Am I doing something wrong?

I have set;

_G.GUI.SetAllowedOrientations( {“landscapeRight”,“landscapeLeft”} )

to no avail.

Thanks in advance.

Gary

Gary, this is to ensure that widgets stay on the same position when any of it’s properties are updated. Widget Candy tries to keep the position of a widget as long as you apply other values again.

If you want to apply a transition to a button, for example, just place it within a display group and move that group instead of the widget directly -you are also able to use any origin then by placing the widget anywhere within that group:

local Grp = display.newGroup() Tmp = \_G.GUI.NewButton(     {     x               = 50,                     y               = 50,                     width           = "50%",                        name            = "MyButton",                 parentGroup     = Grp,                          theme           = "theme\_1",                    caption         = "I'm a button",     textAlign       = "center",        iconAlign       = "left",     icon            = 15,                            } ) transition.to(Grp, {time = 1000, x = 200, onComplete = function(Obj) Obj[1]:set("caption", "HALLO!") end })

Gary, this is to ensure that widgets stay on the same position when any of it’s properties are updated. Widget Candy tries to keep the position of a widget as long as you apply other values again.

If you want to apply a transition to a button, for example, just place it within a display group and move that group instead of the widget directly -you are also able to use any origin then by placing the widget anywhere within that group:

local Grp = display.newGroup() Tmp = \_G.GUI.NewButton(     {     x               = 50,                     y               = 50,                     width           = "50%",                        name            = "MyButton",                 parentGroup     = Grp,                          theme           = "theme\_1",                    caption         = "I'm a button",     textAlign       = "center",        iconAlign       = "left",     icon            = 15,                            } ) transition.to(Grp, {time = 1000, x = 200, onComplete = function(Obj) Obj[1]:set("caption", "HALLO!") end })