SFML community forums
Help => Window => Topic started by: Xardas2 on August 20, 2009, 11:28:57 am
-
Hi all together.
I've got a problem with the window icon.
It isn't draw corectly, only a few pixels are visible and I don't know why.
Maby something is wrong with my code.
sf::RenderWindow App(sf::VideoMode(300,300,32), "Test");
sf::Image img_icon;
img_icon.LoadFromFile("icon_error.png");
App.SetIcon(img_icon.GetWidth(), img_icon.GetHeight(), (sf::Uint8*)&img_icon);
I use a 15 x 15 .png image but .jpg also doesn't work.
I've uploaded the code hier:
http://sfml15-seticont.sourceforge.net
Thanks for your help.
-
The following code works:
App.SetIcon( img_icon.GetWidth(), img_icon.GetHeight(), img_icon.GetPixelsPtr());
The memory location of the img_icon isn't the location of the array of pixels.
I've uploaded the code hier:
http://sfml15-seticont.sourceforge.net
I don't think that it's a good idea to create a new sf.net project just to upload some files. There are enough other free uploading services available.
-
Thank you.
Now it works fine. ^^
I agree with you, that the sf.net project wasn't the right solution.
Next time I will upload the files otherwhere.