"Save as..."
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
"Save as..."
Is there a way I can use the Windows "Save as..." prompt? I'm using LÖVE for my animation editor and I want to write data to a file, which isn't a problem, but I want the user to be able to set the file name. The easiest way to do this would be to use the windows save as. What's the easiest alternative if I can't do that?
while true do end;
Re: "Save as..."
"Save as" is not a Windows prompt. You probably mean a native file save dialog. LÖVE doesn't have direct support for that, but it's possible. This thread has file open dialogs, which are similar but with some differences: https://www.love2d.org/forums/viewtopic.php?f=4&t=82442 but show that it's certainly possible.
Of course, if you make it for Windows only, the application will crash for us Linux users, as well as for Mac users.
Alternatively, linux-man is working on the LoveFS library that implements file dialogs in LÖVE itself: https://www.love2d.org/forums/viewtopic.php?f=5&t=9479
Of course, if you make it for Windows only, the application will crash for us Linux users, as well as for Mac users.
Alternatively, linux-man is working on the LoveFS library that implements file dialogs in LÖVE itself: https://www.love2d.org/forums/viewtopic.php?f=5&t=9479
Re: "Save as..."
Just throwing an idea out there... I imagine it would be possible to implement this like the message boxes. Not saying easy, but possible for someone more skilled than I.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: "Save as..."
I actually use NativeFileDialog library you can see a related post here, and the actual wrapper code to use it in Lua/LÖVE is here at this repo, I also created a pull request explaining how to compile for Windows, I can't help you compiling them sorry, but I can help you fix whatever problem you find.
I don't know if such a library is what you are looking for, since it's a binary library. If it is however I recommend it, otherwise I recommend you take a look at LoveFS which looks rather amazing! or alternatively you can modify the code posted at this post with FFI implementations so that they are Save Dialogs instead of Open Dialogs.
PS: Pgimeno already posted both of these links I'm putting all together anyway but credits to him!
I don't know if such a library is what you are looking for, since it's a binary library. If it is however I recommend it, otherwise I recommend you take a look at LoveFS which looks rather amazing! or alternatively you can modify the code posted at this post with FFI implementations so that they are Save Dialogs instead of Open Dialogs.
PS: Pgimeno already posted both of these links I'm putting all together anyway but credits to him!
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Who is online
Users browsing this forum: No registered users and 79 guests