#ifndef EDITSCENE_PAUSEMENUSYSTEM_HPP
#define EDITSCENE_PAUSEMENUSYSTEM_HPP
#pragma once

#include <Ogre.h>
#include <imgui.h>

class EditorApp;

/**
 * Singleton pause menu system.
 *
 * Renders a full-screen pause menu in game mode when EditorApp
 * is in GamePlayState::Paused.  Font settings are copied from
 * the StartupMenuComponent configured in the scene.
 */
class PauseMenuSystem {
public:
	static PauseMenuSystem &getInstance();

	void init(EditorApp *editorApp);
	void prepareFont();
	void update(float deltaTime);

private:
	PauseMenuSystem();
	~PauseMenuSystem();

	PauseMenuSystem(const PauseMenuSystem &) = delete;
	PauseMenuSystem &operator=(const PauseMenuSystem &) = delete;

	void renderMenu();
	void ensureFontLoaded(const Ogre::String &fontName, float fontSize);

	EditorApp *m_editorApp = nullptr;

	bool m_fontLoaded = false;
	Ogre::String m_currentFontName;
	float m_currentFontSize = 0.0f;
	ImFont *m_menuFont = nullptr;
};

#endif // EDITSCENE_PAUSEMENUSYSTEM_HPP
