/// <summary> /// Displays the given work item tally /// </summary> /// <param name="tally"></param> private void DrawWorkItemTally(HEU_WorkItemTally tally) { float totalWidth = EditorGUIUtility.currentViewWidth; float cellWidth = totalWidth / 5f; float titleCellHeight = 26; float cellHeight = 24; using (new GUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); //_boxStyleTitle.normal.textColor = Color.black; //DrawGridBoxTitle("TOTAL", cellWidth, titleCellHeight); _boxStyleTitle.normal.textColor = (tally._waitingWorkItems > 0) ? Color.cyan : Color.black; DrawGridBoxTitle("WAITING", cellWidth, titleCellHeight); //_boxStyleTitle.normal.textColor = (tally._scheduledWorkItems > 0) ? Color.yellow : Color.black; //DrawGridBoxTitle("SCHEDULED", cellWidth, titleCellHeight); _boxStyleTitle.normal.textColor = ((tally._scheduledWorkItems + tally._cookingWorkItems) > 0) ? Color.yellow : Color.black; DrawGridBoxTitle("COOKING", cellWidth, titleCellHeight); _boxStyleTitle.normal.textColor = (tally._cookedWorkItems > 0) ? _cookedColor : Color.black; DrawGridBoxTitle("COOKED", cellWidth, titleCellHeight); _boxStyleTitle.normal.textColor = (tally._erroredWorkItems > 0) ? Color.red : Color.black; DrawGridBoxTitle("FAILED", cellWidth, titleCellHeight); GUILayout.FlexibleSpace(); } using (new GUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); //DrawGridBoxValue(string.Format("{0}", tally._totalWorkItems), cellWidth, cellHeight); DrawGridBoxValue(string.Format("{0}", tally._waitingWorkItems), cellWidth, cellHeight); //DrawGridBoxValue(string.Format("{0}", tally._scheduledWorkItems), cellWidth, cellHeight); DrawGridBoxValue(string.Format("{0}", (tally._scheduledWorkItems + tally._cookingWorkItems)), cellWidth, cellHeight); DrawGridBoxValue(string.Format("{0}", tally._cookedWorkItems), cellWidth, cellHeight); DrawGridBoxValue(string.Format("{0}", tally._erroredWorkItems), cellWidth, cellHeight); GUILayout.FlexibleSpace(); } }