Changeset - r12898:03f8a24bb6cd
[Not reviewed]
master
0 1 0
rubidium - 15 years ago 2009-09-03 10:50:14
rubidium@openttd.org
(svn r17400) -Fix [FS#3172] (r17380): total line of performance rating was calculated wrong
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/graph_gui.cpp
Show inline comments
 
@@ -1115,26 +1115,26 @@ struct PerformanceRatingDetailWindow : W
 

	
 
			/* The colours used to show how the progress is going */
 
		int colour_done = _colour_gradient[COLOUR_GREEN][4];
 
		int colour_notdone = _colour_gradient[COLOUR_RED][4];
 

	
 
		/* Draw all the score parts */
 
		int val    = _score_part[company][score_type];
 
		int needed = _score_info[score_type].needed;
 
		int score  = _score_info[score_type].score;
 

	
 
		/* SCORE_TOTAL has his own rules ;) */
 
		if (score_type == SCORE_TOTAL) {
 
			for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) needed += _score_info[i].needed;
 
			score = SCORE_MAX;
 
			for (ScoreID i = SCORE_BEGIN; i < SCORE_END; i++) score += _score_info[i].score;
 
			needed = SCORE_MAX;
 
		}
 

	
 
		DrawString(7, 107, r.top + 6, STR_PERFORMANCE_DETAIL_VEHICLES + score_type);
 

	
 
		/* Draw the score */
 
		SetDParam(0, score);
 
		DrawString(7, 107, r.top + 6, STR_PERFORMANCE_DETAIL_INT, TC_FROMSTRING, SA_RIGHT);
 

	
 
		/* Calculate the %-bar */
 
		byte x = Clamp(val, 0, needed) * 50 / needed;
 

	
 
		/* Draw the bar */
0 comments (0 inline, 0 general)