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

Author Topic: [Solved] Custom icon for renderwindow  (Read 1802 times)

0 Members and 1 Guest are viewing this topic.

Debonair

  • Newbie
  • *
  • Posts: 16
    • View Profile
[Solved] Custom icon for renderwindow
« on: July 17, 2015, 05:51:05 pm »
window.setIcon(image.GetWidth(), image.GetHeight(), image.GetPixelsPtr());

Tried using this, but it's telling me the methods aren't within Image as members. Is this an outdated way of doing it, or am I doing it wrong? Using SFML 2.2.
« Last Edit: July 17, 2015, 06:50:58 pm by Debonair »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Custom icon for renderwindow
« Reply #1 on: July 17, 2015, 05:54:58 pm »
Why don't you look at the documentation? The method naming scheme has changed since SFML 1.6.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Debonair

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Custom icon for renderwindow
« Reply #2 on: July 17, 2015, 06:09:10 pm »
According to that, it should be something like this:
window.setIcon(image.getSize().x, image.getSize().y, image.getPixelsPtr());
Compiled fine, but the icon didn't change. Problems with the image format maybe? Using a 128x128 .ico.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Custom icon for renderwindow
« Reply #3 on: July 17, 2015, 06:13:50 pm »
Well look at the console output and/or the documentation. The *.ico format is not supported.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Debonair

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Custom icon for renderwindow
« Reply #4 on: July 17, 2015, 06:50:44 pm »
.png it is then. Case solved I guess. Thanks.

 

anything