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

Author Topic: Getting/setting title of sf::Window?  (Read 13369 times)

0 Members and 1 Guest are viewing this topic.

minirop

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
    • http://dev.peyj.com
Re: Getting/setting title of sf::Window?
« Reply #15 on: September 27, 2012, 05:24:12 pm »
One use-case where setting the window title should be possible : « knowing which file/project is open ».
With sfeMovie, if you do a small video player, you may want to have the window title being "My Awesome Player - Batman Return.avi".
Same with an editor : "My Great Editor - TestingLevel.lvl"
Still in the editor, you may want to add "My Great Editor - TestingLevel.lvl (not saved)". or "(unsaved changes)"
« Last Edit: September 27, 2012, 05:30:04 pm by minirop »

FRex

  • Hero Member
  • *****
  • Posts: 1848
  • Back to C++ gamedev with SFML in May 2023
    • View Profile
    • Email
Re: Getting/setting title of sf::Window?
« Reply #16 on: September 27, 2012, 05:50:10 pm »
Quote
One use-case where setting the window title should be possible
It.. is..? Getting isn't possible.
Back to C++ gamedev with SFML in May 2023

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Getting/setting title of sf::Window?
« Reply #17 on: September 28, 2012, 02:06:21 am »
Quote
But then that requires the extra time for each project to write/implement/create a wrapper for something that should already be implemented in a native window class!!
Just edit source and header and cmake normally, possibly doing some conditional compilation that will end up printing to cout "Warning: Non-standard SFML extension function called for object at adress (this) of type (typeid(*this).name())." in debug each time you get title.

That would slow things down way too much to output.

Also, this should be in there anyway. It's a major API gap.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Getting/setting title of sf::Window?
« Reply #18 on: September 28, 2012, 07:59:54 am »
Quote
Also, this should be in there anyway. It's a major API gap.
This is just your opinion, based on a very specific use case. Unless you have other arguments, I won't consider this feature a "major gap" in the API.

I'm really sorry to reject this request (don't worry, I do it all the time, it's not against you ;) ), but I really need to be convinced that a feature will be useful to a majority of users before adding it. It might be absolutely necessary for you, but you should admit that your requirements are really specific and from a global point of view this function is really not the most important one to add in SFML.
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Getting/setting title of sf::Window?
« Reply #19 on: September 28, 2012, 08:20:35 am »
I'm not saying I need this now, nor will I ever, it just seems pretty incomplete to not have it in there, that's all.
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Getting/setting title of sf::Window?
« Reply #20 on: September 28, 2012, 08:41:28 am »
I understand your point of view. But my philosophy is to add a feature only if it is needed; "seems incomplete" is not enough for me ;)
Laurent Gomila - SFML developer

Qix

  • Full Member
  • ***
  • Posts: 139
  • I am Qix!
    • View Profile
    • Natoga Technologies
Re: Getting/setting title of sf::Window?
« Reply #21 on: September 28, 2012, 08:57:03 am »
I understand your point of view. But my philosophy is to add a feature only if it is needed; "seems incomplete" is not enough for me ;)

I can respect that. ;)
~ Qix
Creator of Rippl Studio
Code: [Select]
<danharibo> iostream: I don't do enough drugs to think that's a good idea.

 

anything