Just getting my feet wet with the new GUI stuff… freakin’ awesome, deliciously easy, I love it… but I think I hit a bug… of course the possibility exists that I am doing something stupid.
However… when the following code executes, if you drag the Difficulty Slider thus created PAST the right edge of the window, the window pops over to the upper right hand corner, the slider disappears, and a “pushing more clips than popping” error appears. :shock:
GUILayout.BeginArea (setupRect, "Set Up", "window");
GUILayout.Label ("Use Joystick?");
var useJS = GUILayout.Toggle (sys.useJS, "Joystick Enabled");
if(sys.useJS != useJS)
{
sys.switchControlInput(useJS);
}
if(diffString.length > 0)
{
var diffLabel = "Difficulty: " + diffString[diff*diffString.length];
}
GUILayout.Label (diffLabel);
diff = GUILayout.HorizontalSlider (diff, 0, 1);
if (GUILayout.Button ("OK"))
{
sys.setDifficulty(diff);
mode = "main";
}
// And finally, end the area we started with GUILayout.BeginArea...
GUILayout.EndArea ();