You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
GlosSI-fork/GlosSITarget/Overlay.h

24 lines
553 B
C++

#pragma once
#include <functional>
#include <string>
#include <SFML/Graphics.hpp>
class Overlay {
public:
Overlay(sf::RenderWindow& window, std::function<void()> on_close);
void setEnabled(bool enabled);
bool toggle();
void update();
static void ProcessEvent(sf::Event evnt);
static void Shutdown();
static void ShowNotification(std::string noti_text);
private:
sf::RenderWindow& window_;
sf::Clock update_clock_;
bool enabled_ = true;
std::function<void()> on_close_;
bool closeButton() const;
};