mp: Let the mp::create UI be aware of whether we are playing...

...a local game only or not
This commit is contained in:
Ignacio R. Morelle 2012-03-21 20:42:13 +00:00
parent 9bf19bf964
commit dc8b0b18ee
3 changed files with 6 additions and 3 deletions

View file

@ -532,7 +532,7 @@ static void enter_create_mode(game_display& disp, const config& game_config, mp:
int num_turns;
{
mp::create ui(disp, game_config, chat, gamelist);
mp::create ui(disp, game_config, chat, gamelist, local_players_only);
run_lobby_loop(disp, ui);
res = ui.get_result();
params = ui.get_parameters();

View file

@ -52,9 +52,10 @@ const SDL_Rect null_rect = {0, 0, 0, 0};
namespace mp {
create::create(game_display& disp, const config &cfg, chat& c, config& gamelist) :
create::create(game_display& disp, const config &cfg, chat& c, config& gamelist, bool local_players_only) :
ui(disp, _("Create Game"), cfg, c, gamelist),
local_players_only_(local_players_only),
tooltip_manager_(disp.video()),
map_selection_(-1),
mp_countdown_init_time_(270),

View file

@ -30,7 +30,7 @@ namespace mp {
class create : public mp::ui
{
public:
create(game_display& dist, const config& game_config, chat& c, config& gamelist);
create(game_display& dist, const config& game_config, chat& c, config& gamelist, bool local_players_only);
~create();
mp_game_settings& get_parameters();
@ -43,6 +43,8 @@ protected:
private:
bool local_players_only_;
tooltips::manager tooltip_manager_;
int map_selection_;
int mp_countdown_init_time_;