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
=== 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 @@
302{302{
303 Player & plr = player(owner);303 Player & plr = player(owner);
304 const Tribe_Descr & tribe = plr.tribe();304 const Tribe_Descr & tribe = plr.tribe();
305 return 305 return
306 tribe.get_building_descr(idx)->create306 tribe.get_building_descr(idx)->create
307 (*this, plr, c, false, true, former_buildings);307 (*this, plr, c, false, true, former_buildings);
308}308}
309309
=== 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 @@
81 assert(0 <= fraction);81 assert(0 <= fraction);
82 assert (fraction <= 1);82 assert (fraction <= 1);
8383
84 const RGBColor color = fraction <= 0.15 ?84 const RGBColor color = fraction <= 0.33 ?
85 RGBColor(255, 0, 0)85 RGBColor(255, 0, 0)
86 :86 :
87 fraction <= 0.5 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);87 fraction <= 0.67 ? RGBColor(255, 255, 0) : RGBColor(0, 255, 0);
8888
89 // Draw the actual bar89 // Draw the actual bar
90 if (m_orientation == Horizontal)90 if (m_orientation == Horizontal)
9191
=== 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 @@
58#define UNPRODUCTIVE_Y (IN_BUILD_Y + 24)58#define UNPRODUCTIVE_Y (IN_BUILD_Y + 24)
59#define FLAG_POINT Point(125, WINDOW_HEIGHT - 8)59#define FLAG_POINT Point(125, WINDOW_HEIGHT - 8)
6060
61#define LOW_PROD 2561#define LOW_PROD 33
6262
63#define UPDATE_TIME 1000 // 1 second, gametime63#define UPDATE_TIME 1000 // 1 second, gametime
6464

Subscribers

People subscribed via source and target branches

to status/vote changes: