Image Orientation and iPad Taskbar

I have been trying for a while, but I can’t seem to get my image oriented on the side for the iPad simulator. It always defaults to portrait mode.

What is build.settings? Is it used for iOS? Would build.settings be build.settings.lua?

Lastly, how do I get rid of the taskbar on the top of the screen that shows the time and everything?

Sorry to ask all this, but I couldn’t find any help in the tutorials. [import]uid: 48020 topic_id: 9523 reply_id: 309523[/import]

Hi rayfsthird,

Build.settings is basically a lua file that tells the App some default settings to launch with.

Go here to get one you can download that you can just drop into your project directory.
http://techority.com/2011/02/01/how-to-make-your-iphone-app-portrait-or-landscape/

My hats off to Peach Pellen for providing it so easily to find.

As for your second question, insert this code into your project either in the main.lua or on whichever scene you wish to remove the status bar.

[lua]display.setStatusBar (display.HiddenStatusBar)
–> Hides the status bar[/lua] [import]uid: 50045 topic_id: 9523 reply_id: 34794[/import]

Thank you for this. You have helped me a lot. However, when I downloaded the build.settings file from the website, I modified the code to fit the iPad screen in TextEditor, but it did not save it as .settings. What text editor do I use to save it in that format?

Also, I’m using zoomEven to fit it onto the iPad, but for some reason it’s not working in the simulator. It’s starting the picture from the bottom left in the center of the simulator. Is this because the simulator screen is not 1024x768? My screen is 1600x900.

Also, how about a timer countdown loading bar instead of a real one? [import]uid: 48020 topic_id: 9523 reply_id: 34876[/import]

Ok, let me break this down as you are talking about a few different things and steps.

First of all you do not need to edit the build.settings.

You will simple want to put the build.settings into your App’s directory along with the main.lua and the config.lua.

If you do not have a main.lua and a config.lua create those.
The orientation and/or screen size for the ipad can be adjusted from within the config.lua

Insert this code for the ipad into config.lua for a horizontal / landscape screen. You will of course have to have the correct build.settings for horizontal.
[lua] application =
{
content =
{
width = 1024,
height = 768,
scale = “none”,
fps = 60,
antialias = true,

},
}[/lua]

The second part is you may need to center your images and/or set reference points to get them to show on the screen correctly.

So once you set your config.lua you may have better results.

If not I sometimes center objects on screen before I place them to make sure they are on the screen. This makes sure I have my code correct and the object is indeed there. This can save you some time troubleshooting problems as a practice.

Here is an example of centering an object.

You can see i’m simply calling that I want to display my rectangle at 50% of the display width and 50% of the display height.

I’m pretty sure objects reference points, that is the point the align to is the center of an image or rectangle unless you set it otherwise.

[lua]local background = display.newRect(-130,220,1026,680)
background.x = display.contentWidth * .5
background.y = display.contentHeight * .5[/lua]

Finally the last question I could not give you an example, it certainly is doable, but you will actually be coding and creating your own status bar to do it. If you are new to Corona and Lua, the Timer tutorial done by AnscaMobile packaged with the sdk would be the starting point for something like this. Along with the placing objects on the screen.

Cheers
[import]uid: 50045 topic_id: 9523 reply_id: 34891[/import]

Thank you, Shawn. I had figured it out from a previous poster’s post and had been working on the other problems. I’ll take a look at the Timer sample. [import]uid: 48020 topic_id: 9523 reply_id: 34907[/import]