mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-08 21:07:27 +08:00
[+] Custom version string feature
This commit is contained in:
24
AquaMai/UX/CustomVersionString.cs
Normal file
24
AquaMai/UX/CustomVersionString.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace AquaMai.UX
|
||||
{
|
||||
public class CustomVersionString
|
||||
{
|
||||
/*
|
||||
* Patch displayVersionString Property Getter
|
||||
*/
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(MAI2System.Config), "displayVersionString", MethodType.Getter)]
|
||||
public static bool GetDisplayVersionString(ref string __result)
|
||||
{
|
||||
if (string.IsNullOrEmpty(AquaMai.AppConfig.UX.CustomVersionString))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
__result = AquaMai.AppConfig.UX.CustomVersionString;
|
||||
// Return false to block the original method
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user