Browse Source

Added wide string support to text

master
Macoy Madson 3 years ago
parent
commit
5b4684c638
2 changed files with 6 additions and 1 deletions
  1. +4
    -0
      graphics/graphics.cpp
  2. +2
    -1
      graphics/graphics.hpp

+ 4
- 0
graphics/graphics.cpp View File

@ -132,6 +132,10 @@ void text::setText(std::string newText)
{
str.setString(newText);
}
void text::setText(std::wstring newText)
{
str.setString(newText);
}
void text::setPosition(float newX, float newY)
{
str.setPosition(newX, newY);


+ 2
- 1
graphics/graphics.hpp View File

@ -23,7 +23,8 @@ private:
sf::Font font;
sf::Color color;
public:
void setText(std::string);
void setText(std::string);
void setText(std::wstring);
bool loadFont(const char*);
void setPosition(float newX, float newY);
float getX();


Loading…
Cancel
Save