diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/MessageBoard.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/MessageBoard.cpp b/src/MessageBoard.cpp index 1e5790c..71b622f 100644 --- a/src/MessageBoard.cpp +++ b/src/MessageBoard.cpp @@ -115,7 +115,7 @@ namespace dchat position.y += (MESSAGE_PADDING_TOP * Settings::getScaling()); if(position.y + usernameTextHeight > 0.0f && position.y < backgroundPos.y + backgroundSize.y) { - sf::Text usernameText(message->user->getName(), *usernameFont, usernameTextCharacterSize); + sf::Text usernameText(sf::String::fromUtf8(message->user->getName().begin(), message->user->getName().end()), *usernameFont, usernameTextCharacterSize); usernameText.setFillColor(sf::Color(15, 192, 252)); usernameText.setPosition(sf::Vector2f(floor(position.x), floor(position.y))); window.draw(usernameText); @@ -179,7 +179,7 @@ namespace dchat position.y += (MESSAGE_PADDING_TOP * Settings::getScaling()); if(position.y + usernameTextHeight > 0.0f && position.y < backgroundPos.y + backgroundSize.y) { - string usernameTextStr = message->user->getName(); + sf::String usernameTextStr = sf::String::fromUtf8(message->user->getName().begin(), message->user->getName().end()); usernameTextStr += " - "; sf::Text usernameText(usernameTextStr, *usernameFont, usernameTextCharacterSize); usernameText.setFillColor(sf::Color(15, 192, 252)); |