Hi, all! I am trying to make a GUI scroll box in a chat box that scrolls ONLY VERTICALLY. I looked up GUI.ScrollView in the reference but I just can’t seem to wrap my head around it.
This is the portion of code I grabbed from the page…
// An absolute-positioned example: We make a scrollview that has a really large client
// rect and put it in a small rect on the screen.
scrollposition = GUI.BeginScrollView (Rect (10,300,100,100),
scrollposition, Rect (0, 0, 220, 200));
// Make four buttons - one in each corner. The coordinate system is defined
// by the last parameter to BeginScrollView.
GUI.Button (Rect (0,0,100,20), "Top-left");
GUI.Button (Rect (0,180,100,20), "Bottom-left");
// End the scroll view that we began above.
GUI.EndScrollView ();
}
This is all fine and dandy, but I have a few questions:
A. Why is it that the first two lines (after the comments) are not connected? what do they do? Does it supply a domain and then a box or what?
B. when I insert my own values, to fit the chat box, nothing shows up. Why?
Thanks- YA