17 #ifndef HEADER_SUPERTUX_GUI_MENU_FILESYSTEM_HPP 18 #define HEADER_SUPERTUX_GUI_MENU_FILESYSTEM_HPP 20 #include "gui/menu.hpp" 25 FileSystemMenu(std::string* filename,
const std::vector<std::string>& extensions,
26 const std::string& basedir,
bool path_relative_to_basedir,
const std::function<
void(
const std::string&)> callback =
nullptr,
27 const std::function<
void (
MenuItem&)>& item_processor = {});
30 void menu_action(
MenuItem& item)
override;
34 bool has_right_suffix(
const std::string& file)
const;
37 std::string* m_filename;
38 std::string m_directory;
39 std::vector<std::string> m_extensions;
40 std::string m_basedir;
41 std::vector<std::string> m_directories;
42 std::vector<std::string> m_files;
43 bool m_path_relative_to_basedir;
44 std::function<void(const std::string&)> m_callback;
45 std::function<void (MenuItem&)> m_item_processor;