Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
[Solved] Custom icon for renderwindow
Print
Pages: [
1
]
Author
Topic: [Solved] Custom icon for renderwindow (Read 1670 times)
0 Members and 1 Guest are viewing this topic.
Debonair
Newbie
Posts: 16
[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
»
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 10976
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.
Logged
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
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.
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 10976
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.
Logged
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
Re: Custom icon for renderwindow
«
Reply #4 on:
July 17, 2015, 06:50:44 pm »
.png it is then. Case solved I guess. Thanks.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
[Solved] Custom icon for renderwindow