My problem can be best shown by this picture: (alt link)
I obviously don’t want the text to appear outside of the phone, next to the “from field”.
(note that the From: is put in the picture itself and the text next to it is the label text)
I have done this before and it perfectly works but for this one it does not work, the code is exact the same and looks like this:
content.image = emailBig;
if (GUI.Button (new Rect ((Screen.width - wBig) / 2, (Screen.height - hBig) / 2, wBig, hBig), content)) {
showBigEmail = false;
Destroy(GameObject.Find("EmailOverlay(Clone)"));
StoryFlowController.walkfile.enabled = true;
}
GUIStyle st = new GUIStyle();
st.fontSize = 16;
st.normal.textColor = Color.gray;
//FROM label
GUI.Label(new Rect(((Screen.width - wBig) / 2) + 110, ((Screen.height - hBig) / 2) + 240, 5, 50), "TTTTTTTTTTTT TTTTTTTTTT TTTTTTTTTTTTTTTTTTTTTTTTTTTTTaaaaTTTTTTTT", st);
I intentionally use as width 5 and height 50 so the text should definitely not appear this long.
Does anyone see what the problem is?