widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #00472
[Merge] lp:~nomeata/widelands/plot-improvements into lp:widelands
Joachim Breitner has proposed merging lp:~nomeata/widelands/plot-improvements into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
Related bugs:
Bug #536543 in widelands: "Add "whole game" to the time axis in statistics"
https://bugs.launchpad.net/widelands/+bug/536543
Bug #672085 in widelands: "New stock menu layout too high for small resolutions"
https://bugs.launchpad.net/widelands/+bug/672085
Bug #886709 in widelands: "new slider statistics menu opens in wrong position or so"
https://bugs.launchpad.net/widelands/+bug/886709
Bug #887728 in widelands: "The new statistics slider does not update if the window is left open"
https://bugs.launchpad.net/widelands/+bug/887728
Bug #887730 in widelands: "Statistics slider show only one option labelled "game" when the game has just been started"
https://bugs.launchpad.net/widelands/+bug/887730
For more details, see:
https://code.launchpad.net/~nomeata/widelands/plot-improvements/+merge/81789
This adds at least one option to the slider.
--
https://code.launchpad.net/~nomeata/widelands/plot-improvements/+merge/81789
Your team Widelands Developers is requested to review the proposed merge of lp:~nomeata/widelands/plot-improvements into lp:widelands.
=== modified file 'src/wui/plot_area.cc'
--- src/wui/plot_area.cc 2011-11-09 21:00:20 +0000
+++ src/wui/plot_area.cc 2011-11-09 22:50:31 +0000
@@ -145,11 +145,13 @@
* is called from the outside, e.g. from a slider, then from that moment on
* this class assumes that values passed to set_time_id adhere to the new
* choice of time spans.
+ * We start to search with i=1 to ensure that at least one option besides
+ * "game" will be offered to the user.
*/
int32_t WUIPlot_Area::get_game_time_id() {
uint32_t game_time = get_game_time();
- uint32_t i = 0;
- for (i = 0; i < 7 && time_in_ms[i] <= game_time; i++) {
+ uint32_t i;
+ for (i = 1; i < 7 && time_in_ms[i] <= game_time; i++) {
}
m_game_time_id = i;
return m_game_time_id;
Follow ups