#ifndef SCREENLOG_H
#define SCREENLOG_H

#include <vector>
#include <string>
#include <SFML/Graphics.hpp>
using namespace std;

//a simple narrative display with timeout

struct ScreenLogMessage {
    string m_message;
    sf::Color m_color;
    float m_expiryTime;
};

class ScreenLog
{
private:
    vector<ScreenLogMessage> m_messages;
    sf::Clock m_clock;
public:
    ScreenLog();
    ~ScreenLog();

    void clear() { m_messages.clear(); }

    void addMessage(string msgText, sf::Color color, float timeoutSeconds);
    void render(sf::RenderWindow& window, sf::Text& sfText);
};

extern ScreenLog* g_screenLog;
extern sf::Color slErrorColor;
extern sf::Color slNarrativeColor;
extern sf::Color slEventColor;
extern sf::Color slSpeechColor;

#endif // SCREENLOG_H
