mirror of
https://github.com/originalnicodr/CinematicUnityExplorer.git
synced 2026-10-11 09:58:02 +08:00
Cleanup runtime-specific
This commit is contained in:
1 parent
c2d9b9b59e
commit
2cc403ad17
29 files changed
+362
-288
No files matched your search
@@ -23,7 +23,9 @@ namespace UnityExplorer.Loader.ML
|
||||
|
||||
try
|
||||
{
|
||||
// TEMPORARY - JUST REQUIRED UNTIL ML 0.3.1 RELEASED
|
||||
MelonPreferences.Mapper.RegisterMapper(KeycodeReader, KeycodeWriter);
|
||||
MelonPreferences.Mapper.RegisterMapper(MenuPagesReader, MenuPagesWriter);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@@ -80,6 +82,8 @@ namespace UnityExplorer.Loader.ML
|
||||
MelonPreferences.Save();
|
||||
}
|
||||
|
||||
// TEMPORARY - JUST REQUIRED UNTIL ML 0.3.1 RELEASED
|
||||
|
||||
public static KeyCode KeycodeReader(TomlObject value)
|
||||
{
|
||||
try
|
||||
@@ -101,6 +105,28 @@ namespace UnityExplorer.Loader.ML
|
||||
{
|
||||
return MelonPreferences.Mapper.ToToml(value.ToString());
|
||||
}
|
||||
|
||||
public static UI.Main.MenuPages MenuPagesReader(TomlObject value)
|
||||
{
|
||||
try
|
||||
{
|
||||
var kc = (UI.Main.MenuPages)Enum.Parse(typeof(UI.Main.MenuPages), (value as TomlString).Value);
|
||||
|
||||
if (kc == default)
|
||||
throw new Exception();
|
||||
|
||||
return kc;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return UI.Main.MenuPages.Home;
|
||||
}
|
||||
}
|
||||
|
||||
public static TomlObject MenuPagesWriter(UI.Main.MenuPages value)
|
||||
{
|
||||
return MelonPreferences.Mapper.ToToml(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user