Game Development Community

Strange Screen Click Problem

by Dillon Sinnott · in iTorque 2D · 03/01/2011 (8:22 pm) · 4 replies

I'm using 1.4.1 and I have a really odd problem. On the builder and sim I can just press the button I have and the mouse works fine, but...

On the actual device (iPad) the mouse is stuck in the upper left corner, and I "can't" click anything. I put can't in quotes because if I do some really funky things I can move the mouse.

If I (and I honestly don't know how to describe this other then...) play piano on the touchscreen the mouse will sometimes move once or twice, but totally erratic. The other way I can move the mouse is if I touch right next to where the mouse currently is, it's got about an inch of leeway, in this case I can drag it.

The buttons that I wish to click do work if I use one of the two techniques I was talking about but obviously this doesn't work in the end game.

Any help with this would be really appreciated.

#1
03/02/2011 (4:36 am)
I'm not sure but you might need to update mainwindow.xib for iPad if you haven't already. I had a similiar issue on iPad and that fixed it.

Check this resource on how to do it (step 8): http://www.garagegames.com/community/resource/view/20017
#2
03/02/2011 (9:06 am)
Check to see if one of the corners of the iPad's screen is working (roughly a quarter of the screen). If so, then Jonas is right and the mainwindow.xib is not setup for the ipad and is only enabling a portion of the screen the size of an iphone.

Similar to step 8, you can also check 'Full Screen at Launch' instead of setting the pixels manually. That has been working for me.
#3
03/02/2011 (11:57 am)
You guys were spot on, the bottom left corner was the only thing fully enabled. I'm checking out step 8 as we spea... type. Just off the bat I have a question, which mainwindow.xib do I change? I used finder but it comes up with quite a list of them.

Well, I opened the one that was part of the actual project, and it's a bit confusing. When I click it it opens a folder with four files: File's Owner, First Responder, Window, and App Delegate. Other then the window file all the other three open into something similar to what it says on step eight but when I go to the measuring icon it says not applicable.

EDIT: I think I figured that bit out, sort of. You open the window file, then open one of the other files (That's where I'm confused, although changing one seems to update them all) and then you can edit that on the ruler icon. Although I'm not sure if I'm using the right mainwindow.xib.

Also, where it says "On the window Attributes, you want a checkmark, The 'Full Screen at Launch'". I found that bit, but I don't see the second part, where you set the deployment target and development target?

EDIT: It appears I chose wisely, it's working now. Thanks a bundle for the help, I don't know if it's a common problem but I was having a terrible time searching for the answer.
#4
03/02/2011 (11:05 pm)
Nice that you got it to work! Mainwindow.xib is a view controller that you'll add stuff to, in this case your iTgb game (OpenGL). A lot of Apps is run only by these kind of controllers and a main one like this can a have subview as well. However, you probably don't need to worry about that if you're going to stick with iTgb :)

If you have an universal app you can upgrade your project for iPad then you'll get two mainwindow.xib, one for iPhone and one iPad. By the way, you don't need to make any changes for mainwindow.xib for iPhone4, just so you know...