mihaid11/emberguard

Refactor repeated `sf::Text` setup code

Open

#10 opened on May 27, 2025

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C++ (1 fork)auto 404
good first issue

Repository metrics

Stars
 (2 stars)
PR merge metrics
 (PR metrics pending)

Description

Currently, setting up sf::Text elements requires multiple repetitive lines of code for each instance: This pattern appears in multiple places, leading to code duplication and reduced readability.

Introduce a utility method or builder-style class to simplify and standardize the creation of sf::Text objects. This could be done using:

  • A standalone createText(...) helper function that accepts font, string, size, position, and optional color.
  • A TextBuilder class implementing a fluent interface for configuring text objects.

Priority: Low

Contributor guide