#pragma once #include #include #include #include struct GLFWwindow; namespace hex::pre { class WindowSplash { public: WindowSplash(); ~WindowSplash(); bool loop(); void addStartupTask(std::string_view taskName, const std::function &task) { this->m_tasks.emplace_back(taskName, task); } private: GLFWwindow *m_window; std::mutex m_progressMutex; float m_progress; std::string m_currTaskName; void initGLFW(); void initImGui(); void deinitGLFW(); void deinitImGui(); std::future processTasksAsync(); std::vector>> m_tasks; }; }