SFML community forums

General => Feature requests => Topic started by: TULOA on August 13, 2011, 06:11:41 am

Title: Ability to set the window title.
Post by: TULOA on August 13, 2011, 06:11:41 am
From the search I did and my knowledge on creating windows with SFML we cannot at this moment change the window title after creation.

My request would therefore be to allow us to set the window title.
Title: Ability to set the window title.
Post by: Nexus on August 13, 2011, 10:40:53 am
Have you read the documentation (http://www.sfml-dev.org/documentation/2.0/classsf_1_1Window.php)? The window title can be changed with sf::Window::SetTitle() :)
Title: Ability to set the window title.
Post by: Disch on August 13, 2011, 05:45:00 pm
Why does SetTitle take a std::string?  What if you need Unicode characters / characters not part of the machine's current locale/codepage?
Title: Ability to set the window title.
Post by: Laurent on August 13, 2011, 06:17:38 pm
Quote
Why does SetTitle take a std::string?

Because Unicode titles are not implemented.
Title: Ability to set the window title.
Post by: Disch on August 13, 2011, 06:44:44 pm
Fair enough.
Title: Ability to set the window title.
Post by: Silvah on August 14, 2011, 05:59:26 pm
And why they're not implemented?
Title: Ability to set the window title.
Post by: Laurent on August 14, 2011, 06:04:36 pm
Because I didn't do it ;)
Title: Ability to set the window title.
Post by: Silvah on August 14, 2011, 06:16:52 pm
So, could I do it? I'd like to be able to set an Unicode window title ;)
Title: Ability to set the window title.
Post by: Laurent on August 14, 2011, 11:17:45 pm
The problem is to choose a suitable Unicode string class. std::wstring? sf::String? Something else?
Title: Ability to set the window title.
Post by: Nexus on August 15, 2011, 12:35:07 am
If the underlying OS supports it, why not sf::String? It provides the highest flexibility (and can be initialized with std::string and std::wstring). What do I overlook?
Title: Ability to set the window title.
Post by: OniLinkPlus on August 15, 2011, 01:08:31 am
I see no problem with Unicode Titles either. It allows for easier internationalization and shouldn't take much effort on operating systems that support it.
Title: Ability to set the window title.
Post by: Laurent on August 15, 2011, 10:29:05 am
Quote
If the underlying OS supports it, why not sf::String? It provides the highest flexibility (and can be initialized with std::string and std::wstring)

Yes, that should be the best solution.

Quote
I see no problem with Unicode Titles either

I didn't say there was a problem with them... it's just not implemented ;)
Title: Re: Ability to set the window title.
Post by: Hinchy on September 12, 2013, 04:00:01 am
It's been two years. Is this ever going to happen? I decided to implement multilanguage support into my game today and was disappointed to discover that I can't put the translated name of the game in the title bar.
Title: Re: Ability to set the window title.
Post by: FRex on September 12, 2013, 04:11:58 am
You can put sf::String as title for over half a year now.