utils::string_map symbols;
symbols["filename"] = filename;
const std::string msg = utils::interpolate_variables_into_string(
_("The <b>$filename</b> server application provides multiplayer server functionality and is required for hosting local network games. It will normally be found in the same folder where the game executable is installed.")
, &symbols);
gui2::tfile_dialog dlg{};
const bool res = dlg
.set_title(_("Find Server Application"))
.set_message(msg)
.set_ok_label(_("Select"))
.set_read_only(true)
.set_filename(filename)
.set_path(path)
.show(video);
if (res) {
path = dlg.path();
std::cerr << "new path is " << path << '\n';
preferences::set_mp_server_program_name(path);
}
Comments