mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-25 20:25:07 +00:00
Skip the GUI2 FLG dialog in the automatic multiplayer test
This commit is contained in:
parent
2f90512856
commit
88ca728080
2
join.lua
2
join.lua
@ -106,7 +106,7 @@ local function plugin()
|
||||
|
||||
if info.name == "Dialog" then
|
||||
log("got a leader select dialog...")
|
||||
context.set_result({result = 0})
|
||||
context.skip_dialog({})
|
||||
events, context, info = coroutine.yield()
|
||||
|
||||
repeat
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "gui/auxiliary/field.hpp"
|
||||
#include "gui/widgets/integer_selector.hpp"
|
||||
#include "scripting/plugins/context.hpp"
|
||||
#include "scripting/plugins/manager.hpp"
|
||||
#include "video.hpp"
|
||||
|
||||
namespace gui2
|
||||
@ -34,6 +36,15 @@ tdialog::~tdialog()
|
||||
bool tdialog::show(CVideo& video, const unsigned auto_close_time)
|
||||
{
|
||||
if(video.faked()) {
|
||||
plugins_manager* pm = plugins_manager::get();
|
||||
if (pm && pm->any_running())
|
||||
{
|
||||
plugins_context pc("Dialog");
|
||||
pc.set_callback("skip_dialog", [this](config) { retval_ = twindow::OK; }, false);
|
||||
pc.set_callback("quit", [](config) {}, false);
|
||||
pc.play_slice();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user