Hi, I’d like to make label appear when a person makes a choice by clicking on a button.
if (GUI.Button (new Rect (165, 200, 75, 30), "Dwarf")) {
GUI.Label(new Rect (425, 75, 325, 150),"You are a Dwarf.");
GUI.Label(new Rect(425, 125, 575, 190), "As a Dwarf you are hardy, +1 Endurance.");
}
I tried this, but the labels didn’t show up at all.
if (GUI.RepeatButton (new Rect (165, 200, 75, 30), "Dwarf")) {
GUI.color = Color.black;
GUI.Label(new Rect (425, 75, 325, 150),"You are a Dwarf.");
GUI.Label(new Rect(425, 125, 575, 190), "As a Dwarf you are hardy, +1 Endurance.");
}
So then I tried this, the labels were appearing, but they were appearing white, so I threw in a color change.
Now the labels only appear if I click AND HOLD, the button, also, the buttons that follow after are all recoloured to black, when I want them to be white.
I’d like to know the code for making it work, I’m not interested in “use GUIStyle” responses, thanks.