correct sizing when creating buttons with Photoshop

If I have a widget button that is 400x100.  So if I create this button in Photoshop I should be creating it at 1600x400(4x) yes?  Any less will have bad resolution on Retina displays correct?

It depends on what your app’s content area is configured as in the config.lua file and what dynamic scaling settings you have.  If you have a @2 and @4 version specified in there, then you will need to create 3 images – 400x100, 800x200, and 1600x400 – one for each of the scale points.  If you don’t create the @2 and @4 versions of the files, then the base image will be scaled up on higher resolutions and could look bad.

You might want to read Rob’s tutorial here:

https://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/

Excellent information on the use of setting up your config.lua file.

Yes I copy/pasted  that exact config.lua file.  I used his modernized one at the bottom.  It only uses @2, See below, do I need to make a 400x100, 800x200, and 1600x4000? 

[lua]

local aspectRatio = display.pixelHeight / display.pixelWidth

application = {

   content = {

      width = aspectRatio > 1.5 and 800 or math.ceil( 1200 / aspectRatio ),

      height = aspectRatio < 1.5 and 1200 or math.ceil( 800 * aspectRatio ),

      scale = “letterBox”,

      fps = 30,

      imageSuffix = {

         ["@2x"] = 1.3,

      },

   },

}

[/lua]

No, you would need to make only 400x100 (file.png) and 800x200 (file@2x.png).

It depends on what your app’s content area is configured as in the config.lua file and what dynamic scaling settings you have.  If you have a @2 and @4 version specified in there, then you will need to create 3 images – 400x100, 800x200, and 1600x400 – one for each of the scale points.  If you don’t create the @2 and @4 versions of the files, then the base image will be scaled up on higher resolutions and could look bad.

You might want to read Rob’s tutorial here:

https://coronalabs.com/blog/2013/09/10/modernizing-the-config-lua/

Excellent information on the use of setting up your config.lua file.

Yes I copy/pasted  that exact config.lua file.  I used his modernized one at the bottom.  It only uses @2, See below, do I need to make a 400x100, 800x200, and 1600x4000? 

[lua]

local aspectRatio = display.pixelHeight / display.pixelWidth

application = {

   content = {

      width = aspectRatio > 1.5 and 800 or math.ceil( 1200 / aspectRatio ),

      height = aspectRatio < 1.5 and 1200 or math.ceil( 800 * aspectRatio ),

      scale = “letterBox”,

      fps = 30,

      imageSuffix = {

         ["@2x"] = 1.3,

      },

   },

}

[/lua]

No, you would need to make only 400x100 (file.png) and 800x200 (file@2x.png).