more stuff

we do be smokin weed

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>
This commit is contained in:
⍚~Nex
2024-04-05 19:24:57 +02:00
co-authored by Ne_Eo
parent 832edd27fc
commit df5fa1f4ca
6 changed files with 125 additions and 54 deletions
+25 -11
View File
@@ -4,18 +4,32 @@ package funkin.options.categories;
class MiscOptions extends OptionsScreen {
public override function new() {
super("Miscellaneous", "Use this menu to reset save data or engine settings.");
var lanArray:Array<String> = TranslationsUtil.translList();
if(!lanArray.contains(TranslationsUtil.DEFAULT_LANGUAGE)) lanArray.push(TranslationsUtil.DEFAULT_LANGUAGE);
add(new ArrayOption(
"Language",
'The language that the engine currently uses (the default one is ${TranslationsUtil.DEFAULT_LANGUAGE}).',
lanArray, [for(lan in lanArray) lan.split("/").last()], "language",
function(path:String) {
TranslationsUtil.setTransl(path);
parent.remove(this);
this.clear();
parent.add(new MiscOptions());
{ // Language Option
var lanArray:Array<String> = TranslationsUtil.getLanguages();
if (lanArray.contains(TranslationsUtil.DEFAULT_LANGUAGE))
lanArray.remove(TranslationsUtil.DEFAULT_LANGUAGE);
lanArray.insert(0, TranslationsUtil.DEFAULT_LANGUAGE);
add(new ArrayOption(
"Language",
'The language that the engine currently uses (the default one is ${TranslationsUtil.DEFAULT_LANGUAGE}).',
lanArray, [for(lan in lanArray) lan.split("/").last()], "language",
function(path:String) {
TranslationsUtil.setLanguage(path);
parent.remove(this);
// Reload the current screen
// todo add parent.reload();
this.clear();
parent.add(new MiscOptions());
}));
}
add(new TextOption(
"Force Crash",
"Select this option to force a crash.",
() -> { throw new haxe.Exception("Forced crash."); }
));
#if UPDATE_CHECKING
add(new Checkbox(
"Enable Nightly Updates",