Hi,
I want to create a grid of gui boxes (or labels) and control the properties of each box or label.
I defined :
public GUIStyle[,] st=null;
and in Start() I have:
st = new GUIStyle[rows,columns];
for (int i=0;i<rows;i++){
for (int j=0;j<columns;j++){
stocksValue[i,j]=rnd.Next(1,10000);
st[i,j]=new GUIStyle();
st[i,j].fontSize=50;
}
}
and in OnGui() I have:
for (int i=0; i<rows; i++) {
for (int j=0; j<columns; j++) {
GUI.Label (new Rect (boxWidth*j, boxHeight*i, boxWidth, boxHeight), new GUIContent (""+conTstr[i,j]),st[i,j]);
}
}
now, I need your help for adding border on box and I want to change background color of each box by code (based on random number e.g. if rnd < 10 background box color=red)
Thanks