2013.2096 - overframe

widget.buttons are positioned but sometime recently there was a change so that button overframes are not centered? All my press animations are 90% button sizes with a gradient and the imagesheet bounds are for the entire (including clear area) image. When pressing any of my buttons, they are all receding to the upperleft. Also since 2013.2090 (tried installing 2096 all the way back to 2090) all my widgets and graphics have shifted AGAIN. I already spent weeks repositioning for G2. This is really frustrating.

Hi @jack95,

When you say “all my widgets and graphics have shifted”, do you mean non-widget images that you placed on the screen are also shifting unexpectedly? Or just images related to widgets? Are you using the setting of “default” anchors via :setDefault()?

Thanks,

Brent

My main has:

display.setDefault( “anchorX”, 0 )

display.setDefault( “anchorY”, 0 )

this seems to be what makes the widget overFrames behave that way.

Commenting these out didn’t help all my layouts being blown out. Widgets and Graphics alike.

display.setDefault doesn’t seem to do anything else.

Hi @jack95,

I’m not sure this is the issue in this case, but note that if you assign those defaults, and then create an object, that “permanently assigns” that anchor point to objects that are created after those defaults are set. For example, if you want to create a bunch of text objects around 0,0 anchor points (top-left), you can set the anchor defaults to 0,0 and then create those text objects. You can then, afterward, revert the anchor defaults back to 0.5,0.5 (center), but it will not change the anchor points of all those text objects you already created… they will still consider themselves having a 0,0 anchor point unless you go through and re-set their anchors otherwise.

I don’t think anything has changed regarding non-widget image positioning in relation to default anchor settings. But, I think there was some issue with those default anchor settings and widgets which needed to be fixed, thus the change you’re seeing. However, it still shouldn’t mis-align the button image(s)… so I’ll have to investigate that.

Thanks,

Brent

    sidebarBackground = display.newSprite( interfaceGroup, _Sheet, {frames = {_Nfo:getFrameIndex(“RightData-ui”)}})
    sidebarBackground.x = 429
    sidebarBackground.y = 169

Given no setDefaults, this is now appearing in a different spot than in 2090

I can’t even reason where a given position is supposed to end up now.

    nrgProgressBar = display.newContainer(interfaceGroup,240,35)
    nrgProgressBar.x = 517
    nrgProgressBar.y = 451
  

where is this now? I don’t know.

Hi @jack95,

I tested in both 2076 (most recent public) and 2097, and there are no differences in displaying either a sprite or a container (as in your examples above). Unless you changed the anchor points, both have a center origin point that is located where the X and Y are set to. As for widgets, do you have some example code showing how it differs between an older build and the most recent daily?

Thanks,

Brent

Hi @jack95,

When you say “all my widgets and graphics have shifted”, do you mean non-widget images that you placed on the screen are also shifting unexpectedly? Or just images related to widgets? Are you using the setting of “default” anchors via :setDefault()?

Thanks,

Brent

My main has:

display.setDefault( “anchorX”, 0 )

display.setDefault( “anchorY”, 0 )

this seems to be what makes the widget overFrames behave that way.

Commenting these out didn’t help all my layouts being blown out. Widgets and Graphics alike.

display.setDefault doesn’t seem to do anything else.

Hi @jack95,

I’m not sure this is the issue in this case, but note that if you assign those defaults, and then create an object, that “permanently assigns” that anchor point to objects that are created after those defaults are set. For example, if you want to create a bunch of text objects around 0,0 anchor points (top-left), you can set the anchor defaults to 0,0 and then create those text objects. You can then, afterward, revert the anchor defaults back to 0.5,0.5 (center), but it will not change the anchor points of all those text objects you already created… they will still consider themselves having a 0,0 anchor point unless you go through and re-set their anchors otherwise.

I don’t think anything has changed regarding non-widget image positioning in relation to default anchor settings. But, I think there was some issue with those default anchor settings and widgets which needed to be fixed, thus the change you’re seeing. However, it still shouldn’t mis-align the button image(s)… so I’ll have to investigate that.

Thanks,

Brent

    sidebarBackground = display.newSprite( interfaceGroup, _Sheet, {frames = {_Nfo:getFrameIndex(“RightData-ui”)}})
    sidebarBackground.x = 429
    sidebarBackground.y = 169

Given no setDefaults, this is now appearing in a different spot than in 2090

I can’t even reason where a given position is supposed to end up now.

    nrgProgressBar = display.newContainer(interfaceGroup,240,35)
    nrgProgressBar.x = 517
    nrgProgressBar.y = 451
  

where is this now? I don’t know.

Hi @jack95,

I tested in both 2076 (most recent public) and 2097, and there are no differences in displaying either a sprite or a container (as in your examples above). Unless you changed the anchor points, both have a center origin point that is located where the X and Y are set to. As for widgets, do you have some example code showing how it differs between an older build and the most recent daily?

Thanks,

Brent