28 bool configure_canceled =
false;
35 std::vector<ng::create_engine::level_ptr> campaigns(
38 if (campaigns.empty()) {
40 _(
"No campaigns are available.\n"));
44 bool use_deterministic_mode =
false;
70 bool not_found =
true;
71 for(
size_t i = 0;
i < campaigns.size(); ++
i)
86 std::cerr<<
"No such campaign id to jump to: ["<<jump_to_campaign.
campaign_id_<<
"]\n";
92 std::string random_mode = use_deterministic_mode ?
"deterministic" :
"";
97 if (selected_difficulty ==
"FAIL")
return false;
98 if (selected_difficulty ==
"CANCEL") {
104 return enter_create_mode(video, game_config, state, jump_to_campaign, local_players_only);
121 std::cerr <<
"Cannot load scenario with id=" << state.
get_scenario_id() <<
"\n";
126 }
while (configure_canceled);
132 bool connect_canceled;
134 connect_canceled =
false;
139 mp::configure ui(video, 0, game_config, gamechat, gamelist, state, local_players_only);
147 connect_canceled = !
enter_connect_mode(video, game_config, state, local_players_only);
153 }
while (connect_canceled);
168 res = ui.get_result();
void show_error_message(CVideo &video, const std::string &message, bool message_use_markup)
Shows an error message to the user.
Add a special kind of assert to validate whether the input from WML doesn't contain any problems that...
bool show(CVideo &video, const unsigned auto_close_time=0)
Shows the window.
result get_result()
Returns the result of the current widget.
std::vector< level_ptr > get_levels_by_type_unfiltered(level::TYPE type) const
void show(CVideo &video)
Shows the error in a dialog.
void set_current_level(const size_t index)
GLint GLenum GLsizei GLint GLsizei const GLvoid * data
const mp_game_settings & get_parameters()
void prepare_for_era_and_mods()
Definitions for the interface to Wesnoth Markup Language (WML).
std::string select_campaign_difficulty(int set_value=-1)
select_campaign_difficulty
bool enter_connect_mode(CVideo &video, const config &game_config, saved_game &state, bool local_players_only)
static game_config_manager * get()
static UNUSEDNOWARN std::string _(const char *str)
Dialog is closed with ok button.
bool enter_create_mode(CVideo &video, const config &game_config, saved_game &state, jump_to_campaign_info jump_to_campaign, bool local_players_only)
bool enter_configure_mode(CVideo &video, const config &game_config, saved_game &state, bool local_players_only)
Game configuration data as global variables.
std::string get_scenario_id()
void prepare_for_campaign(const std::string &difficulty)
game_classification & classification()
void set_carryover_sides_start(config carryover_sides_start)
bool get_deterministic() const
void set_current_level_type(const level::TYPE)
this class memorizes a chat session.
A config object defines a single node in a WML file, with access to child nodes.
Helper class, don't construct this directly.
void prepare_for_new_level()
mp_game_settings & mp_settings()
Multiplayer parameters for this game.
GLsizei const GLcharARB ** string
void run_lobby_loop(CVideo &video, mp::ui &ui)