- Home /
GUI Layout hide stuff
Hello, I am trying to have a button that when clicked makes another part of the gui layout visible. The code I have posted below works but creates a weird ghosting like effect when the horizontal slider is showing. Any help would be greatly appreciated.
//HairColor
GUILayout.BeginHorizontal();
if (GUILayout.Button("<", GUILayout.Width(buttonWidth)))
{
haircolor -= 1;
if (haircolor == 0)
haircolor = 4;
changeHairColor(haircolor);
}
if (GUILayout.Button("Hair Color", GUILayout.Width(typeWidth)))
{
haircolorcount += 1;
debuglabel = "Hair color pressed" + haircolorcount;
}
if (GUILayout.Button(">", GUILayout.Width(buttonWidth)))
{
haircolor += 1;
if (haircolor == 5)
haircolor = 1;
changeHairColor(haircolor);
}
GUILayout.EndHorizontal();
//HairColorRSlider
GUILayout.BeginHorizontal();
if (haircolorcount == 1)
{
haircolorrslider = GUILayout.HorizontalSlider(haircolorrslider,0.0F,255.0F);
}
if (haircolorcount == 2)
{
haircolorcount = 0;
}
GUILayout.EndHorizontal();
Comment
$$anonymous$$ay I post a link to a photo to better explain?
Before clicking the button: http://dl.dropbox.com/u/10429987/RLLBefore.png
After clicking the button: http://dl.dropbox.com/u/10429987/RLLAfter.png
Your answer
Follow this Question
Related Questions
Trouble creating a horizontal group for Tall and Wide screen orientation! 0 Answers
Slider & Button Interaction Problem 0 Answers
Curving an Horizontal Slider 2 Answers
Control an animation with a slider 5 Answers
Grid layout lags after thousand inserts. 0 Answers