icon question

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

icon question

Post by pielago »

two questions
for computer games how big does the icon must be??? 57x57 or 144x144 or whats????
not sure at all can someone tell me the right size???

is this how to use filepath for icon will it work once you make the exe???

Code: Select all

 t.window.icon = "pictures/icon.png"    -- Filepath to an image to use as the window's icon (string)
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: icon question

Post by Jasoco »

t.window.icon only applies the icon at runtime. It doesn't physically put the icon on the EXE. For that you need to use a resource editor on Windows or place an icon file in the .app bundle on OS X. I'd assume the icon size should be one of many standard icon sizes on modern OS' such as 128x128 or the like. (Usually a size like 16x16, 32x32, 48x48, 64x64, 128x128, 256x256 or 512x512. At least on OS X. Not sure what Windows' maximum icon size is.) Probalby something small though since it's only placing the icon in the OS UI while the game is running. (I believe it refers to the icon in Windows' titlebar. OS X doesn't utilize this so it doesn't apply there.

The Wiki doesn't clarify anything at all that I can see.

http://www.love2d.org/wiki/love.window.setIcon

Have you tried putting any image there at all?

Personally I don't see this as an important feature at all. It's just the tiny icon in the titlebar. People won't really be looking up there expecting a custom icon. It's just there as an extra touch.
pielago
Party member
Posts: 142
Joined: Fri Jun 14, 2013 10:41 am

Re: icon question

Post by pielago »

oh i see what you mean well i have a mac i am not using windows
not sure how to do it with mac i can tell u see tutorials for windows but for mac not much unless i haven't search deeper..
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: icon question

Post by Jasoco »

Well, which one are you trying to do? setIcon doesn't do anything about changing the icon on the application in the Finder. It's only for Windows as it changes the system icon in the top corner of the window. TO change the icon in the application for creating a finalized game bundle it's easy as long as you have a proper icon creator. (Install Xcode from the App Store and you can use Icon Composer) The icon would go inside the love.app file (folder) under /Contents/Resources as Love.icns. The shortest method to do this once you have the .icns file is right-click on the love.app bundle, select "Show Contents" then navigate through Contents > Resources and replace the existing Love.icns file. There are other steps to finalizing a project though so just changing the icon is not the end of things. (Modify the .plist file to change certain things so the love.app is no longer Löve and associated with .love files for example) There's a thread somewhere here for doing this stuff. But you shouldn't be thinking about that stuff until you have a finished game worthy of uploading as an actual executable. For most cases you can just upload a .love somewhere and put instructions on where to acquire Löve for running it. If it's a big game like Mari0 then of course you can have the Windows EXE and the OS X .app ready for users as well as a separate .love source for Linux people.
User avatar
slime
Solid Snayke
Posts: 3160
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: icon question

Post by slime »

You can use http://iconverticons.com/online/ to create an .icns file if you don't have Apple's Icon Composer.
Last edited by slime on Tue Apr 01, 2014 5:03 pm, edited 1 time in total.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: icon question

Post by Jasoco »

Well that's convenient! I'll have to remember that link.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests