← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug1204199 into lp:widelands

 

cghislai has proposed merging lp:~widelands-dev/widelands/bug1204199 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1204199 in widelands: "Buildings and building statistics have different color groups for productivity"
  https://bugs.launchpad.net/widelands/+bug/1204199

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug1204199/+merge/176664

Change the progress bar to switch from red to yellow at 33% and to green at 67%. Also change the limit to consider a building unproductive to 33% in the BUildingStatistics window
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug1204199/+merge/176664
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug1204199 into lp:widelands.
=== modified file 'src/logic/editor_game_base.cc'
--- src/logic/editor_game_base.cc	2013-07-23 14:49:48 +0000
+++ src/logic/editor_game_base.cc	2013-07-24 12:04:26 +0000
@@ -302,7 +302,7 @@
 {
 	Player & plr = player(owner);
 	const Tribe_Descr & tribe = plr.tribe();
-	return 
+	return
 		tribe.get_building_descr(idx)->create
 			(*this, plr, c, false, true, former_buildings);
 }

=== modified file 'src/ui_basic/progressbar.cc'
--- src/ui_basic/progressbar.cc	2013-07-16 10:28:53 +0000
+++ src/ui_basic/progressbar.cc	2013-07-24 12:04:26 +0000
@@ -81,10 +81,10 @@
 	assert(0 <= fraction);
 	assert     (fraction <= 1);
 
-	const RGBColor color = fraction <= 0.15 ?
+	const RGBColor color = fraction <= 0.33 ?
 		RGBColor(255, 0, 0)
 		:
-		fraction <= 0.5 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);
+		fraction <= 0.67 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);
 
 	// Draw the actual bar
 	if (m_orientation == Horizontal)

=== modified file 'src/wui/building_statistics_menu.cc'
--- src/wui/building_statistics_menu.cc	2013-02-10 19:36:24 +0000
+++ src/wui/building_statistics_menu.cc	2013-07-24 12:04:26 +0000
@@ -58,7 +58,7 @@
 #define UNPRODUCTIVE_Y       (IN_BUILD_Y           + 24)
 #define FLAG_POINT           Point(125, WINDOW_HEIGHT - 8)
 
-#define LOW_PROD 25
+#define LOW_PROD 33
 
 #define UPDATE_TIME 1000  //  1 second, gametime
 


Follow ups