Clear allow_plugin_skip earlier in titlescreen and MP lobby / create

This commit is contained in:
Celtic Minstrel 2016-09-13 15:24:44 -04:00
parent e93ae16cfd
commit a3be5244ff
3 changed files with 6 additions and 3 deletions

View file

@ -167,6 +167,7 @@ tlobby_main::tlobby_main(const config& game_config,
{
// Need to set this in the constructor, pre_show() is too late
set_show_even_without_video(true);
set_allow_plugin_skip(false);
}
struct lobby_delay_gamelist_update_guard
@ -818,7 +819,6 @@ void tlobby_main::pre_show(twindow& window)
game_config::lobby_network_timer, std::bind(&tlobby_main::network_handler, this), true);
// Set up Lua plugin context
set_allow_plugin_skip(false);
plugins_context_.reset(new plugins_context("Multiplayer Lobby"));
plugins_context_->set_callback("join", [&, this](const config&) {

View file

@ -115,6 +115,9 @@ tmp_create_game::tmp_create_game(const config& cfg, ng::create_engine& create_en
create_engine_.get_state() = saved_game();
create_engine_.get_state().classification().campaign_type = game_classification::CAMPAIGN_TYPE::MULTIPLAYER;
// Need to set this in the constructor, pre_show() is too late
set_allow_plugin_skip(false);
}
void tmp_create_game::pre_show(twindow& window)
@ -315,7 +318,6 @@ void tmp_create_game::pre_show(twindow& window)
//
// Set up the Lua plugin context
//
set_allow_plugin_skip(false);
plugins_context_.reset(new plugins_context("Multiplayer Create"));
plugins_context_->set_callback("create", [&window](const config&) { window.set_retval(twindow::OK); }, false);

View file

@ -141,6 +141,8 @@ void ttitle_screen::basic_callback(twindow& window, tresult res)
ttitle_screen::ttitle_screen(game_launcher& game) : result_(REDRAW_BACKGROUND), game_(game), debug_clock_(nullptr)
{
// Need to set this in the constructor, pre_show() / post_build() is too late
set_allow_plugin_skip(false);
}
ttitle_screen::~ttitle_screen()
@ -222,7 +224,6 @@ debug_tooltip(twindow& window, bool& handled, const tpoint& coordinate)
void ttitle_screen::pre_show(twindow& window)
{
set_restore(false);
set_allow_plugin_skip(false);
window.set_click_dismiss(false);
window.set_enter_disabled(true);
window.set_escape_disabled(true);