shadowm

Untitled

Sep 20th, 2016
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1.     utils::string_map symbols;
  2.     symbols["filename"] = filename;
  3.  
  4.     const std::string msg = utils::interpolate_variables_into_string(
  5.               _("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.")
  6.             , &symbols);
  7.  
  8.     gui2::tfile_dialog dlg{};
  9.  
  10.     const bool res = dlg
  11.         .set_title(_("Find Server Application"))
  12.         .set_message(msg)
  13.         .set_ok_label(_("Select"))
  14.         .set_read_only(true)
  15.         .set_filename(filename)
  16.         .set_path(path)
  17.         .show(video);
  18.  
  19.     if (res) {
  20.         path = dlg.path();
  21.         std::cerr << "new path is " << path << '\n';
  22.         preferences::set_mp_server_program_name(path);
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment