Graphics 1 compatibility mode discrepancies

Today I stepped forward into the present, using compatibility mode for an app which is nearly finished. I use widget.newButton style buttons. Here’s my config:  

application = {

   content = {

      graphicsCompatibility = 1,  – This turns on Graphics 1.0 Compatibility mode

      width = 320, height = 480, scale = “letterbox”,

   },

}

Issue #1: on the iPhone,  these buttons appear in the style that I would expect, although they are far larger than they were in a genuine graphics 1.0 build. However, on the simulator they merely show the text, no outline or styling whatsoever! Sure looks like a bug to me. screenshots attached (left: simulator, right: phone)

Issue #2: The response style of the buttons has changed. A year ago they responded with phases “press”, “moved”, “release”. Now, even in compatibility mode, they respond with phases “began”, “moved”, “ended”. This behavior is consistent between the simulator and the phone.  However, it is not consistent with the phrase “Compatibility mode”.

So I guess the real question is, how much compatibility should I expect? If these inconsistent behaviors are going to be numerous, my only reasonable choice is to hang with my old version of Corona until this project is complete.

System: Mac OS 10.7.5, Corona 2013.2076  (Old version: Corona 2012.971)

Hi @k3_sparklight,

For #1, this is because when you’re using widgets in newer builds, it assumes the iOS7 style, which is buttons without background/edges. But on the phone, it has iOS6.x installed, so the widgets use that iOS6 style. This is normal, expected behavior. If you want consistent buttons across both iOS6 and iOS7, you’ll need to create image-based buttons, or else set the “textOnly” option to “true” when you create the buttons, and adjust the font size to be as consistent as possible between platforms.

For #2, I suppose it depends on whether you used the “onPress” or “onEvent” button handler methods. The difference here is that “onPress” doesn’t require checking for the phase, while “onEvent” lets you detect all of the phases and handle them in your own logic.

All of this is fully documented here, including details on how to visually style buttons:

http://docs.coronalabs.com/api/library/widget/newButton.html

Hope this helps,

Brent

You can also force corona to use the iOS 6 theme by adding this line after your require widget statement:

widget.setTheme( "widget\_theme\_ios" )  

Hi @k3_sparklight,

For #1, this is because when you’re using widgets in newer builds, it assumes the iOS7 style, which is buttons without background/edges. But on the phone, it has iOS6.x installed, so the widgets use that iOS6 style. This is normal, expected behavior. If you want consistent buttons across both iOS6 and iOS7, you’ll need to create image-based buttons, or else set the “textOnly” option to “true” when you create the buttons, and adjust the font size to be as consistent as possible between platforms.

For #2, I suppose it depends on whether you used the “onPress” or “onEvent” button handler methods. The difference here is that “onPress” doesn’t require checking for the phase, while “onEvent” lets you detect all of the phases and handle them in your own logic.

All of this is fully documented here, including details on how to visually style buttons:

http://docs.coronalabs.com/api/library/widget/newButton.html

Hope this helps,

Brent

You can also force corona to use the iOS 6 theme by adding this line after your require widget statement:

widget.setTheme( "widget\_theme\_ios" )