#pragma once #include "FluidSim/ScenarioCatalog.hpp" #include #include #include namespace fluidsim::port::desktop { struct ScenarioMenuChoice { std::optional example; std::filesystem::path machine; bool play{}; }; enum class MenuScreen {Home,Workshop,Scenarios}; class ScenarioMenu { public: ScenarioMenu(std::vector,std::vector machines={}); ~ScenarioMenu(); bool handle_event(const sf::Event&,sf::Vector2u); void draw(sf::RenderWindow&,const sf::Font*); bool finished()const; MenuScreen screen()const; std::optional take_choice(); private: struct Impl; std::unique_ptr impl_; }; std::optional choose_scenario(sf::RenderWindow&,const sf::Font*,const std::vector&); }