You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
#pragma once
|
|
#include <SFML/Graphics/RenderWindow.hpp>
|
|
#include <SFML/Graphics/Font.hpp>
|
|
#include "guecs.hpp"
|
|
#include "textures.hpp"
|
|
#include "components.hpp"
|
|
#include <SFML/System/Clock.hpp>
|
|
|
|
// aspect ratio of art is 3/2 so 1.5
|
|
// possible sizes: 900/600; 1620/1080; 1800/1200
|
|
// To calculate it do short side * 1.5 so 1080 * 1.5 == 1620
|
|
//
|
|
// Side panel = 300/1080
|
|
|
|
namespace arena {
|
|
using std::string, std::shared_ptr;
|
|
|
|
class ArenaUI {
|
|
public:
|
|
sf::Clock $clock;
|
|
bool $entity_hit = false;
|
|
sf::Vector2f $entity_pos;
|
|
components::Combat $combat;
|
|
components::Sprite $sprite_config;
|
|
components::Sound $sounds;
|
|
components::Animation $animation;
|
|
guecs::UI $status;
|
|
guecs::UI $overlay;
|
|
textures::SpriteTexture $entity_background;
|
|
bool $entity_has_stage = false;
|
|
textures::SpriteTexture $entity_stage;
|
|
std::shared_ptr<DinkyECS::World> $world = nullptr;
|
|
DinkyECS::Entity $entity_id;
|
|
components::GameConfig& $config;
|
|
|
|
ArenaUI(shared_ptr<DinkyECS::World> world, DinkyECS::Entity entity_id);
|
|
|
|
void init();
|
|
void render(sf::RenderWindow& window);
|
|
bool mouse(float x, float y);
|
|
void configure_sprite();
|
|
void configure_background();
|
|
void configure_gui();
|
|
};
|
|
}
|
|
|