diff --git a/include/manager.hpp b/include/manager.hpp index 73493c2..fa7f6ed 100644 --- a/include/manager.hpp +++ b/include/manager.hpp @@ -14,7 +14,7 @@ private: sf::RenderWindow window; sf::Clock clock; sf::View window_view; - std::string title; + sf::String title; ResourceManager resource_manager; std::vector events; @@ -73,12 +73,12 @@ public: /** * Renvoie le titre actuel de la fenêtre */ - std::string getTitle(); + sf::String getTitle(); /** * Modifie le titre actuel de la fenêtre */ - void setTitle(std::string set_title); + void setTitle(sf::String set_title); /** * Renvoie un booléen attestant de l'appui sur la diff --git a/src/editor.cpp b/src/editor.cpp index 45fdee2..79a346c 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -12,7 +12,7 @@ Editor::~Editor() {} void Editor::load(std::ifstream& file) { Level::load(file); - manager.setTitle("Edition de " + getName()); + manager.setTitle(sf::String(L"Édition de ") + getName()); } void Editor::frame() { diff --git a/src/manager.cpp b/src/manager.cpp index 1f2a7e2..65f02f0 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -3,7 +3,7 @@ Manager::Manager() : window( sf::VideoMode(704, 480), "Skizzle", sf::Style::Default, sf::ContextSettings(0, 0, 2) -), window_view(window.getView()), title(""), view(NULL) {} +), window_view(window.getView()), title(sf::String(L"")), view(NULL) {} void Manager::start() { while (window.isOpen()) { @@ -72,17 +72,17 @@ void Manager::setWindowView(sf::View set_window_view) { window_view = set_window_view; } -std::string Manager::getTitle() { +sf::String Manager::getTitle() { return title; } -void Manager::setTitle(std::string set_title) { +void Manager::setTitle(sf::String set_title) { title = set_title; - if (title.empty()) { - window.setTitle("Skizzle"); + if (title.isEmpty()) { + window.setTitle(sf::String(L"Skizzle")); } else { - window.setTitle("Skizzle - " + title); + window.setTitle(sf::String(L"Skizzle ‒ ") + title); } }