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