Uh oh!
There was an error while loading. Please reload this page.
Document Sprite.filename specifics - #172
Conversation
- Added examples and explanation for the three different strings that sprite.filename can return (filepath, name only and "") - Added link to app.fs.fileTitle to show how to get the name of the Sprite - Added note that switching filenames for opened sprite only changes where the file is saved on subsequent save actions, and does not switch to the file at the new path. - Reference to `filenamechange` event for `Sprite.events`
c599f98 to
c1e5279Comparedacap
commented
Aug 27, 2026
Sorry @Arecher, I've just pushed some old commits to the Sprite.filenames just today, so this PR is giving some conflicts, but probably you can just replace the latest content with your reword. |
Arecher
commented
Aug 27, 2026
Done! I'll make some changes though, because like your change mentioned, even sprites that don't have any files associated with them return their name (which seems to just be |
Arecher
commented
Aug 27, 2026
I couldn't squash/amend the commits because one of them is a merge. Wasn't aware of that, so it's a bit of a mess of small commits now. But the end result should be a properly merged file. I also removed my sentence that stated that |
- Removed incorrect description of `Sprite(width,height).filename` returning `""`. - Linked to `hasAssociatedFile()` in explanation
6cd1541 to
ad09001Compare
"")app.fs.fileTitleto show how to get the name of the SpriteSince filename sounds like it would return this, rather than the filepath
I wasn't fully sure what to expect from setting a filename during runtime, and since it originally mostly mentioned it was where the file was loaded from, I wondered whether it would switch the data in the sprite if you adjusted the filename to a preexisting sprite