Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Ability to set the window title.  (Read 11621 times)

0 Members and 2 Guests are viewing this topic.

TULOA

  • Newbie
  • *
  • Posts: 4
    • View Profile
Ability to set the window title.
« 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.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Ability to set the window title.
« Reply #1 on: August 13, 2011, 10:40:53 am »
Have you read the documentation? The window title can be changed with sf::Window::SetTitle() :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Disch

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Ability to set the window title.
« Reply #2 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Ability to set the window title.
« Reply #3 on: August 13, 2011, 06:17:38 pm »
Quote
Why does SetTitle take a std::string?

Because Unicode titles are not implemented.
Laurent Gomila - SFML developer

Disch

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Ability to set the window title.
« Reply #4 on: August 13, 2011, 06:44:44 pm »
Fair enough.

Silvah

  • Guest
Ability to set the window title.
« Reply #5 on: August 14, 2011, 05:59:26 pm »
And why they're not implemented?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Ability to set the window title.
« Reply #6 on: August 14, 2011, 06:04:36 pm »
Because I didn't do it ;)
Laurent Gomila - SFML developer

Silvah

  • Guest
Ability to set the window title.
« Reply #7 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 ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Ability to set the window title.
« Reply #8 on: August 14, 2011, 11:17:45 pm »
The problem is to choose a suitable Unicode string class. std::wstring? sf::String? Something else?
Laurent Gomila - SFML developer

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Ability to set the window title.
« Reply #9 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?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

OniLinkPlus

  • Hero Member
  • *****
  • Posts: 500
    • View Profile
Ability to set the window title.
« Reply #10 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.
I use the latest build of SFML2

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Ability to set the window title.
« Reply #11 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 ;)
Laurent Gomila - SFML developer

Hinchy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Ability to set the window title.
« Reply #12 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.

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Ability to set the window title.
« Reply #13 on: September 12, 2013, 04:11:58 am »
You can put sf::String as title for over half a year now.
Back to C++ gamedev with SFML in May 2023