hi. i am a beginner in game development and i searched the forum for this issue and found none. hopefully this is not a repetitive topic.
i am using Intellij IDE with lua language to code, and i am running Love using command prompt ( I have another issue which is integrating Love pluging into Intellij).
in the conf.lua file, i have written the code(among other codes):
function love.conf(t)
t.window.icon = "myicon.png"
... and the myicon.png file is in the same directory as main.lua and conf.lua but when i run love, the default Love icon shows up at top left. and when i replace the "myicon.png" with the file path, Love runs the blue screen error with "file does not exist".
sidenote:
can anyone also help me with getting Love to run from inside Intellij?
thank you very much.
t.window.icon error : file does not exist
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: t.window.icon error : file does not exist
Hey.
Löve-Applications are running in a sandbox. You cannot access files outsite of this box.
So you can only reference files in the main-folder or included folders, not outside. It is not possible to reference to files in (for example) "c:\users\icon.png" but from "assets/icon.png" where "assets" is a folder application-root.
ertt
Löve-Applications are running in a sandbox. You cannot access files outsite of this box.
So you can only reference files in the main-folder or included folders, not outside. It is not possible to reference to files in (for example) "c:\users\icon.png" but from "assets/icon.png" where "assets" is a folder application-root.
ertt
- zorg
- Party member
- Posts: 3470
- Joined: Thu Dec 13, 2012 2:55 pm
- Location: Absurdistan, Hungary
- Contact:
Re: t.window.icon error : file does not exist
Except the OP did say thatertt wrote: ↑Wed May 15, 2019 1:30 pm Löve-Applications are running in a sandbox. You cannot access files outsite of this box.
So you can only reference files in the main-folder or included folders, not outside. It is not possible to reference to files in (for example) "c:\users\icon.png" but from "assets/icon.png" where "assets" is a folder application-root.
So that should be correct. "myicon.png" means it's either in the root of the project folder (where main.lua is) or the root of the project's save folder (currently irrelevant).
It may be a few things, but i don't know what restrictions may apply to set an image as an (application) icon; culprits could include dimensions not being supported, or color depth, or compression method, or additional tags and blocks in the file (which shouldn't be an issue, but the possibility still exists).
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Re: t.window.icon error : file does not exist
Oh sorry, i misunderstood the post. I thought that the imagepath was replaced with another filename, which is maybe outside the folder..
According to the wiki: large iconfiles maybe not supported.
Which love version did you use? Did you test this with other files/filetypes?
ertt
Edit: did it work when you set the icon by code?
Re: t.window.icon error : file does not exist
hi. thank you all for the replies. I am using love version 11.2
and the file isn't really large. its under 100 kbs.
also erret:
and the file isn't really large. its under 100 kbs.
also erret:
how do i do that again?Edit: did it work when you set the icon by code?
Re: t.window.icon error : file does not exist
Wiki say
Edit: i'm not sure if "large" file means the filesize or width/height. But i dont think that a icon needs to be 100kb...
Code: Select all
success = love.window.setIcon( imagedata )
Who is online
Users browsing this forum: Hugues Ross and 7 guests