mihaid11/emberguard

Refactor repeated `sf::Text` setup code

Open

#10 aperta il 27 mag 2025

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)C++ (1 fork)auto 404
good first issue

Metriche repository

Star
 (2 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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

Guida contributor