GUI for combat now works better and I can create sprites for things if I want.

This commit is contained in:
Zed A. Shaw 2025-02-18 11:28:55 -05:00
parent 46de98e6f4
commit 49a71e257e
10 changed files with 55 additions and 18 deletions

View file

@ -5,6 +5,7 @@
#include <string>
#include <memory>
#include <SFML/Graphics.hpp>
#include "texture.hpp"
using std::shared_ptr, std::make_shared;
@ -28,6 +29,12 @@ struct Clickable {
int event = 0;
};
struct Sprite {
std::string name;
std::shared_ptr<sf::Sprite> sprite = nullptr;
std::shared_ptr<sf::Texture> texture = nullptr;
};
struct Rectangle {
shared_ptr<sf::RectangleShape> shape = nullptr;
@ -71,7 +78,7 @@ class GUECS {
return $world;
}
void init();
void init(TexturePack& textures);
void render(sf::RenderWindow& window);
void mouse(sf::RenderWindow &window);
};