1
0
mirror of synced 2024-11-12 01:00:48 +01:00

feat: Make the font config a configuration

This commit is contained in:
Repflez 2022-01-27 11:34:10 -07:00
parent 6d6374eda3
commit a215cce554
2 changed files with 10 additions and 6 deletions

View File

@ -1,9 +1,4 @@
using HarmonyLib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TaikoModStuff
{
@ -13,7 +8,8 @@ namespace TaikoModStuff
[HarmonyPostfix]
static void GetFontType_Patched(ref int __result)
{
__result = 0; // Force the font to the JP one.
if (Plugin.configForceFontChange.Value)
__result = 0; // Force the font to the JP one.
}
}
}

View File

@ -1,4 +1,5 @@
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
namespace TaikoModStuff
@ -6,8 +7,15 @@ namespace TaikoModStuff
[BepInPlugin("com.github.Repflez.TaikoModStuff", PluginInfo.PLUGIN_NAME, PluginInfo.PLUGIN_VERSION)]
public class Plugin : BaseUnityPlugin
{
public static ConfigEntry<bool> configForceFontChange;
private void Awake()
{
// Add configurations
configForceFontChange = Config.Bind("General.Toggles",
"ForceFontChange",
false,
"Force the game font to the JP font");
var instance = new Harmony(PluginInfo.PLUGIN_NAME);
instance.PatchAll(typeof(FontChanger));