How do I put a small button in the lower right hand corner of the screen that then displays a small credits dialog box? Can someone point me in the right direction? That box would just have a bitmap with credits and a dismiss button.
I use the GUI.Button class for that. So the button can then activate a GUI.DrawTexture branch in your OnGUI function. In the branch where you’re displaying the texture then watch iPhoneInput.touchCount>0 to see if the screen is tapped. If so, exit the branch.
Is this what you meant? It hangs. Can you see what I’m doing wrong?
function OnGUI () {
if (GUI.Button (Rect (Screen.width - 52,Screen.height - 32, 50, 30), infoIcon)) {
GUI.DrawTexture(Rect (0, 0, Screen.width, Screen.height), helpScreen);
// wait until a touch is received
while (iPhoneInput.touchCount == 0);
}
}
Yea, I didn’t elaborate quite enough, ezone is correct in that you must use some flag variable to determine which menu to display. Your while loop is causing the hang since it will never exit, thus preventing any future updates to touchCount.