## Window Icon

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
rod_sn
Prole
Posts: 27
Joined: Sun Jan 11, 2015 9:59 am

### Window Icon

Hey guys before posting i tried to search on google and love forums for my issue but what i found did not helped. I have been trying to get an icon on the game window without success... I have tried the following codes (0.9.2):

conf.lua

Code: Select all

t.window.icon = "res/cookie.png"
main.lua

Code: Select all

ico = love.image.newImageData("res/cookie.png")
ok = love.window.setIcon(ico)
print(ok)
I even tried to change from the image (.png) to the icon (.ico) files, just to get an "Could not decode image" error.

I have managed to add an icon on version 0.8.0 using the same code*.
Why isn't it working on 0.9.2?

EDIT:
Last edited by rod_sn on Sun Jul 19, 2015 12:17 am, edited 1 time in total.
"You certainly usually find something, if you look, but it is not always quite the something you were after."
-Thorin Oakenshield, J.R.R. Tolkien
DaedalusYoung
Party member
Posts: 402
Joined: Sun Jul 14, 2013 8:04 pm

### Re: Window Icon

Using the same code in 0.8.0? Are you sure? Because it wasn't love.window in 0.8.0 yet. Maybe you're mixing up your versions, it works in 0.9.2, but not in 0.8.0?
rod_sn
Prole
Posts: 27
Joined: Sun Jan 11, 2015 9:59 am

### Re: Window Icon

My bad, in the 0.8.0 version i used graphics instead of window.
"You certainly usually find something, if you look, but it is not always quite the something you were after."
-Thorin Oakenshield, J.R.R. Tolkien
rod_sn
Prole
Posts: 27
Joined: Sun Jan 11, 2015 9:59 am

### Re: Window Icon

it works in 0.9.2, but not in 0.8.0?
No, it works on 0.8.0 but not on 0.9.2
"You certainly usually find something, if you look, but it is not always quite the something you were after."
-Thorin Oakenshield, J.R.R. Tolkien
DaedalusYoung
Party member
Posts: 402
Joined: Sun Jul 14, 2013 8:04 pm

### Re: Window Icon

Well, I don't know then, looks like it should work. Care to post a .love?
rod_sn
Prole
Posts: 27
Joined: Sun Jan 11, 2015 9:59 am

### Re: Window Icon

Ok so i sent my game to my friends, and they say they see a icon... So this seems to be a problem from my computer... Anyways here is the love game i am using to test this issue:
Attachments
ic.love
"You certainly usually find something, if you look, but it is not always quite the something you were after."
-Thorin Oakenshield, J.R.R. Tolkien
Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

### Re: Window Icon

I do see the icon, Windows 7 x64.
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics
DaedalusYoung
Party member
Posts: 402
Joined: Sun Jul 14, 2013 8:04 pm

### Re: Window Icon

Works for me on Mac as well.

Btw, don't create a new image in your love.draw function. This function runs every frame, so it will cause all sorts of issues in larger projects. Just create it once (like in love.load) and then you can just draw it whenever you want to.
rod_sn
Prole
Posts: 27
Joined: Sun Jan 11, 2015 9:59 am

### Re: Window Icon

Btw, don't create a new image in your love.draw function. This function runs every frame, so it will cause all sorts of issues in larger projects. Just create it once (like in love.load) and then you can just draw it whenever you want to.
yea i know that, thank you XD i was just testing the icon so i did it the easy way. Anyways windows 8.1 here and the icon is not showing up.. pretty strange... I don't really need to see it anyways, i was just scared i wouldn't be able to include an icon. But if its there, its enough. Thanks guys, if anyone knows the issue and how to fix it, that would be cool.
"You certainly usually find something, if you look, but it is not always quite the something you were after."
-Thorin Oakenshield, J.R.R. Tolkien

### Who is online

Users browsing this forum: No registered users and 43 guests