supertuxkart/stk-code — pull request #1352 by konstin (2014-06-05 17:05:56+00:00)
Title: Implementing a Random GP

Finally, I mananged it to finish the random GP implementation :) . I basically just created a subclass of a refactored and much more flexible GPInfoDialog and added some Spinners and a reload button. There are some points which might be important for understanding why it's implemented the way it is:
- The change to src/network/race_config.cpp was necessary because I removed an unused include from a header and afterwards it didn't compile
- I had to remove the ```const``` from some ```const GrandPrixData*``` because this doesn't really work anymore with the random GP (If you have better suggestion I'll take it)
- The copyright notice is copy+paste with my github name; hope that it's ok
- #1348 forced me to use an ugly workaround to avoid a crash
- In my opinion the three kinds of spinners (numbers, gauge, labeled) should be splitted up into three (sub)classes
- The TrackManager really needs a method to get all the "normal" tracks as they are displayed in the "all" tab in the track selection screen. Currently my way to get all the tracks also returns tracks like overworld. Beside the more complex index selecting, this is the reason why I haven't implemented hiker's first suggestions (yet)
- I didn't implement a default-lap-number for a track because this is big enough for now anyway.
- If you ```#include "race/grand_prix_data.hpp"``` in gp_info_dialog.hpp, compilations fails because the header-guards block each other