-
Hi. I'm trying to update a couple of mods to 0.7.4, and since |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For actually adding options to the preferences menu, you can do something like this if (Std.isOfType(currentState, OptionsState)) {
var preferencesPage = currentState.optionsCodex.pages.get("preferences");
// Create a new option.
prefs.createPrefItemCheckbox(...);
} This was taken directly from the Funkin' Modding Docs, so this code snippet might not be that great. |
Beta Was this translation helpful? Give feedback.
funkin.save.Save
has a variable calledmodOptions
. You can do something likemodOptions.set(key, value)
and to save it to the game's save file, you can useSave.flush()
. To get whatever value is stored in it, you can do something likemodOptions.get(key)
.For actually adding options to the preferences menu, you can do something like this
This was taken directly from the Funkin' Modding Docs, so this code snippet might not be that great.