Affichage des accents dans le titre
This commit is contained in:
parent
0517d5ae35
commit
4212320fe1
|
@ -14,7 +14,7 @@ private:
|
||||||
sf::RenderWindow window;
|
sf::RenderWindow window;
|
||||||
sf::Clock clock;
|
sf::Clock clock;
|
||||||
sf::View window_view;
|
sf::View window_view;
|
||||||
std::string title;
|
sf::String title;
|
||||||
|
|
||||||
ResourceManager resource_manager;
|
ResourceManager resource_manager;
|
||||||
std::vector<sf::Event> events;
|
std::vector<sf::Event> events;
|
||||||
|
@ -73,12 +73,12 @@ public:
|
||||||
/**
|
/**
|
||||||
* Renvoie le titre actuel de la fenêtre
|
* Renvoie le titre actuel de la fenêtre
|
||||||
*/
|
*/
|
||||||
std::string getTitle();
|
sf::String getTitle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Modifie le titre actuel de la fenêtre
|
* 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
|
* Renvoie un booléen attestant de l'appui sur la
|
||||||
|
|
|
@ -12,7 +12,7 @@ Editor::~Editor() {}
|
||||||
|
|
||||||
void Editor::load(std::ifstream& file) {
|
void Editor::load(std::ifstream& file) {
|
||||||
Level::load(file);
|
Level::load(file);
|
||||||
manager.setTitle("Edition de " + getName());
|
manager.setTitle(sf::String(L"Édition de ") + getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Editor::frame() {
|
void Editor::frame() {
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
Manager::Manager() : window(
|
Manager::Manager() : window(
|
||||||
sf::VideoMode(704, 480), "Skizzle", sf::Style::Default,
|
sf::VideoMode(704, 480), "Skizzle", sf::Style::Default,
|
||||||
sf::ContextSettings(0, 0, 2)
|
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() {
|
void Manager::start() {
|
||||||
while (window.isOpen()) {
|
while (window.isOpen()) {
|
||||||
|
@ -72,17 +72,17 @@ void Manager::setWindowView(sf::View set_window_view) {
|
||||||
window_view = set_window_view;
|
window_view = set_window_view;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Manager::getTitle() {
|
sf::String Manager::getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Manager::setTitle(std::string set_title) {
|
void Manager::setTitle(sf::String set_title) {
|
||||||
title = set_title;
|
title = set_title;
|
||||||
|
|
||||||
if (title.empty()) {
|
if (title.isEmpty()) {
|
||||||
window.setTitle("Skizzle");
|
window.setTitle(sf::String(L"Skizzle"));
|
||||||
} else {
|
} else {
|
||||||
window.setTitle("Skizzle - " + title);
|
window.setTitle(sf::String(L"Skizzle ‒ ") + title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue