Right now I have a Window that represents a Button list like thingy… here’s an example
private var ContainerWindow = Rect(5,5,250,200);
public var ContainerID = 1;
private var ScrollPosition = Vector2.zero;
function OnGUI(){
ContainerWindow = GUI.Window(ContainerID,ContainerWindow,GetBox,"Box"
}
function GetBox(){
ScrollPosition = GUI.BeginScrollView(Rect(5,20,240,170),ScrollPosition, Rect(0,0,220,750));
GUI.Button(Rect(10,50,50,50),"1");
GUI.Button(Rect(10,100,50,50),"2");
GUI.Button(Rect(10,150,50,50),"3");
GUI.Button(Rect(10,200,50,50),"4");
GUI.Button(Rect(10,250,50,50),"5");
GUI.Button(Rect(10,300,50,50),"6");
GUI.Button(Rect(10,350,50,50),"7");
GUI.Button(Rect(10,400,50,50),"8");
GUI.Button(Rect(10,450,50,50),"9");
GUI.Button(Rect(10,500,50,50),"10");
GUI.Button(Rect(10,550,50,50),"11");
GUI.Button(Rect(10,600,50,50),"12");
GUI.Button(Rect(10,650,50,50),"13");
GUI.Button(Rect(10,700,50,50),"14");
GUI.EndScrollView();
GUI.DragWindow(); //<DragWindow used AFTER Begin End Statements\\
}
No errors, however when I click the scrollbar it wont do anything even if I use mousewheel.
–It dosent drag the window.
Any suggestions?