- Home /
Question by
YoungDeveloper · Oct 20, 2013 at 07:53 AM ·
ignorebeginscrollview
Ignore BeginScrollView and BeginHorizontal
Is it possible to draw GUI inside BeginScrollView and BeginHorizontal, but not apply to their coordinates- ignore them.
GUI.BeginScrollView //some scroll view beginning
GUILayout.BeginHorizontal("");
//Draw gui stuff inside here, but don't use their coordinate system.
//Let's say if I'd draw gui button using rect (0,0,10,10), then it should be on screen left upper corner
GUILayout.EndHorizontal();
GUI.EndScrollView();
Any ideas appreciated, thanks.
Comment
Best Answer
Answer by YoungDeveloper · Oct 20, 2013 at 12:47 PM
As always, the solution came in my head only after some time, and It's even not worth mentioning. But for the record, oh well..
private bool showSomeGui = false;
GUI.BeginScrollView //some scroll view beginning
GUILayout.BeginHorizontal("");
for(...){
//some precessing
showSomeGui = true;
}
GUILayout.EndHorizontal();
GUI.EndScrollView();
if(showSomeGui){
GUI. ... //draw gui
showSomeGui = false;
}
Plus, this will render on top of everything, just what i wanted.