- Home /
Question by
navadeep2011 · Apr 17, 2013 at 05:26 AM ·
guidisplaystructure
Something is missing in my code can any body help me?
My original code is like this:
void DoMyWindow3(int windowID)
{
GUI.Label(new Rect(0,0,400,40), " Length Timeperiod Count" ,fontstyle);
GUI.Label(new Rect(0,50,400,40), Pendulum2.threevalues[0].ToString() ,fontstyle);
GUI.Label(new Rect(0,100,400,40), Pendulum2.threevalues[1].ToString() ,fontstyle);
GUI.Label(new Rect(0,150,400,40), Pendulum2.threevalues[2].ToString() ,fontstyle);
}
If i am using above code my output is perfect. that is only for three fields. if i have n number of fields. How will i write structure.
void DoMyWindow3(int windowID)
{
GUI.Label(new Rect(0,0,400,40), " Length Timeperiod Count" ,fontstyle);
foreach(string s in Pendulum2.threevalues) {
GUI.Label(new Rect(0,hieght,400,40), s ,fontstyle);
hieght = hieght+50;
}
Here every time same label is coming down the old label is missing. I want both old and new label. Can please help me.
Thanks In Advance
Comment
Your answer
Follow this Question
Related Questions
how can i create a second label? ----- Help me 0 Answers
Problem Displaying Score on GUI text 0 Answers
Display problem with OnGUI 3 Answers
Display a objects property. 1 Answer