#pragma once #include "dinkyecs.hpp" #include #include #include #include "textures.hpp" #include "gui/combat_ui.hpp" #include "components.hpp" struct AnimatedFixture { textures::SpriteTexture st; components::Animation anim; std::string cell; float scale_x; float scale_y; float x; float y; bool at_mid=false; sf::Vector2f pos{0,0}; }; namespace boss { using std::shared_ptr; using namespace DinkyECS; using namespace textures; struct UI { shared_ptr $world = nullptr; Entity $boss_id = NONE; components::AnimatedScene $scene; gui::CombatUI $combat_ui; SpriteTexture $boss_sprite; SpriteTexture $player_sprite; SpriteTexture $floor_sprite; guecs::UI $arena; guecs::UI $actions; components::Animation $boss_anim; sf::Vector2f $boss_pos; std::vector $fixtures; UI(shared_ptr world, Entity boss_id); void init(); void render(sf::RenderWindow& window); bool mouse(float x, float y, guecs::Modifiers mods); sf::Vector2f position_sprite(textures::SpriteTexture& st, const std::string& cell_name, float scale_x, float scale_y, bool at_mid, float x_diff=0.0f, float y_diff=0.0f); void status(const std::wstring& msg); sf::Vector2f move_actor(SpriteTexture& st, const std::string& actor, const std::string& cell_name); void play_animations(); }; }