Added direct theme support and will slowly move more things into this struct for configuring the look.

This commit is contained in:
Zed A. Shaw 2025-05-09 11:20:22 -04:00
parent b9deb3a0de
commit a18d60dcb0
9 changed files with 48 additions and 67 deletions

View file

@ -8,6 +8,7 @@
#include <queue>
#include <typeindex>
#include <unordered_map>
#include "guecs/theme.hpp"
#include "guecs/sfml/components.hpp"
namespace guecs {
@ -38,25 +39,6 @@ namespace guecs {
string name;
};
struct SpriteTexture {
std::shared_ptr<sf::Sprite> sprite = nullptr;
std::shared_ptr<sf::Texture> texture = nullptr;
};
class Backend {
public:
virtual SpriteTexture texture_get(const string& name) = 0;
virtual void sound_play(const string& name) = 0;
virtual void sound_stop(const string& name) = 0;
virtual std::shared_ptr<sf::Shader> shader_get(const std::string& name) = 0;
virtual bool shader_updated() = 0;
};
void init(Backend* backend);
class UI {
public: