Moved the text attaching code to the arena.

This commit is contained in:
Zed A. Shaw 2025-12-24 00:58:38 -05:00
parent f50e713179
commit 0d23cf9537
5 changed files with 43 additions and 15 deletions

View file

@ -21,6 +21,7 @@ namespace scene {
float y = 0;
bool at_mid=false;
bool flipped=false;
sf::Text text;
sf::Vector2f pos{0,0};
};
@ -37,6 +38,8 @@ namespace scene {
void init();
void render(sf::RenderTarget& window);
bool mouse(float x, float y, guecs::Modifiers mods);
void attach_text(const std::string& actor, const std::string& text);
Element config_scene_element(nlohmann::json& config, bool and_play, bool duped);
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);