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

Proposed by cghislai
Status: Merged
Merged at revision: 6664
Proposed branch: lp:~widelands-dev/widelands/bug1204199
Merge into: lp:widelands
Diff against target: 41 lines (+4/-4)
3 files modified
src/logic/editor_game_base.cc (+1/-1)
src/ui_basic/progressbar.cc (+2/-2)
src/wui/building_statistics_menu.cc (+1/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands/bug1204199
Reviewer Review Type Date Requested Status
SirVer Approve
Review via email: mp+176664@code.launchpad.net

Description of the change

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

To post a comment you must log in.
Revision history for this message
SirVer (sirver) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/logic/editor_game_base.cc'
2--- src/logic/editor_game_base.cc 2013-07-23 14:49:48 +0000
3+++ src/logic/editor_game_base.cc 2013-07-24 12:04:26 +0000
4@@ -302,7 +302,7 @@
5 {
6 Player & plr = player(owner);
7 const Tribe_Descr & tribe = plr.tribe();
8- return
9+ return
10 tribe.get_building_descr(idx)->create
11 (*this, plr, c, false, true, former_buildings);
12 }
13
14=== modified file 'src/ui_basic/progressbar.cc'
15--- src/ui_basic/progressbar.cc 2013-07-16 10:28:53 +0000
16+++ src/ui_basic/progressbar.cc 2013-07-24 12:04:26 +0000
17@@ -81,10 +81,10 @@
18 assert(0 <= fraction);
19 assert (fraction <= 1);
20
21- const RGBColor color = fraction <= 0.15 ?
22+ const RGBColor color = fraction <= 0.33 ?
23 RGBColor(255, 0, 0)
24 :
25- fraction <= 0.5 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);
26+ fraction <= 0.67 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);
27
28 // Draw the actual bar
29 if (m_orientation == Horizontal)
30
31=== modified file 'src/wui/building_statistics_menu.cc'
32--- src/wui/building_statistics_menu.cc 2013-02-10 19:36:24 +0000
33+++ src/wui/building_statistics_menu.cc 2013-07-24 12:04:26 +0000
34@@ -58,7 +58,7 @@
35 #define UNPRODUCTIVE_Y (IN_BUILD_Y + 24)
36 #define FLAG_POINT Point(125, WINDOW_HEIGHT - 8)
37
38-#define LOW_PROD 25
39+#define LOW_PROD 33
40
41 #define UPDATE_TIME 1000 // 1 second, gametime
42

Subscribers

People subscribed via source and target branches

to status/vote changes: