Affichage des accents dans le titre

This commit is contained in:
Mattéo Delabre 2016-04-06 13:41:12 +02:00
parent 0517d5ae35
commit 4212320fe1
3 changed files with 10 additions and 10 deletions

View File

@ -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<sf::Event> 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

View File

@ -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() {

View File

@ -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);
}
}