Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add note to save slot #39

Closed
ArdiGame opened this issue May 10, 2020 · 6 comments
Closed

Ability to add note to save slot #39

ArdiGame opened this issue May 10, 2020 · 6 comments
Labels
v3 Pushed to v3

Comments

@ArdiGame
Copy link

I would love to see a way to add a custom name or small note to the slot upon save, similar to Sierra's "Quest" games.

twine-sc2_customsavebox

@Jaydax1729
Copy link

Oddly sometimes I see details in the second section but mostly I see only load or Delete

@tmedwards tmedwards added the v3 Pushed to v3 label May 10, 2020
@HiEv
Copy link

HiEv commented May 11, 2020

Are you talking about the user being able to do that or the developer?

Either way, you can do that by creating a Config.saves.onSave function and set the "title" property on the "save" object, which will set the title of the save. For a simple example, you could put this in your JavaScript section:

Config.saves.onSave = function (save) {
	save.title = prompt("Enter Save Slot Title:", save.title);
};

and that would prompt the user to give the save slot a custom title.

Hope that helps! 😃

@ArdiGame
Copy link
Author

ArdiGame commented May 11, 2020

@HiEv Sorry, should have clarified that. I'd want it to be an end-user function, though being able to set that as a developer is nice too, but it feels like that would be too complicated to be worth it.

Much appreciated for the function idea. I'll definitely utilize that in my current project. 😃

While it's possible to create a function to do this in individual projects, I personally think it would do well as a default feature, or at least something toggleable like a dedicated config api option.

@HiEv
Copy link

HiEv commented May 11, 2020

@rambdev - Perhaps you didn't notice my edit, but the code there now will let the end-user set the title of the save slot.

Try it out. 😃

@ArdiGame
Copy link
Author

@HiEv Ah, I didn't see that. The original code was allowing end-user usage as well as far as I can tell, but I'll give that a try too. Thanks!

@tmedwards
Copy link
Owner

Closed in favor of the v3 issue: https://github.com/tmedwards/sugarcube-3-prealpha/issues/1

NOTE: The v3 repository is not yet public, so the above link probably will not work for you until it is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 Pushed to v3
Projects
None yet
Development

No branches or pull requests

4 participants