Fix category names

This commit is contained in:
Atony committed 2025-10-18 12:32:34 -05:00
1 parent 713a7a2bcc
commit dde7e70406
3 files changed
+14 -13

No files matched your search

-11
View File
@@ -31,17 +31,6 @@ public partial class MiraApiPlugin : BasePlugin
/// </summary>
public static Color DefaultHeaderColor { get; } = new Color32(77, 77, 77, 255);
/// <summary>
/// Gets the name for the first custom category in the game options menu, if any.
/// </summary>
public static string CustomCategoryMenuNameOne { get; } = "Custom Category 1";
/// <summary>
/// Gets the name for the second custom category in the game options menu, if any.
/// </summary>
public static string CustomCategoryMenuNameTwo { get; } = "Custom Category 2";
private static MiraPluginManager? PluginManager { get; set; }
internal Harmony Harmony { get; } = new(Id);
@@ -251,7 +251,7 @@ internal static class GameSettingMenuPatches
__instance.ChangeTab(4, true);
}));
_customOneButton.buttonText.text = MiraApiPlugin.CustomCategoryMenuNameOne;
_customOneButton.buttonText.text = SelectedMod != null ? SelectedMod.MiraPlugin.CustomOptionMenuNameOne : "Custom Category 1";
customPos.y += 0.5f;
_customOneButton.transform.localPosition = customPos;
_customOneButton.name = "CustomOneButton";
@@ -273,7 +273,7 @@ internal static class GameSettingMenuPatches
__instance.ChangeTab(5, true);
}));
_customTwoButton.buttonText.text = MiraApiPlugin.CustomCategoryMenuNameTwo;
_customTwoButton.buttonText.text = SelectedMod != null ? SelectedMod.MiraPlugin.CustomOptionMenuNameTwo : "Custom Category 2";
customPos.y += 0.5f;
_customTwoButton.transform.localPosition = customPos;
_customTwoButton.name = "CustomTwoButton";
@@ -416,6 +416,8 @@ internal static class GameSettingMenuPatches
if (SelectedModIdx != 0)
{
_customOneButton.buttonText.text = SelectedMod!.MiraPlugin.CustomOptionMenuNameOne;
_customTwoButton.buttonText.text = SelectedMod!.MiraPlugin.CustomOptionMenuNameTwo;
var modHasRoles = SelectedMod!.InternalRoles.Count != 0;
var modHasCustomOne = SelectedMod.InternalOptionGroups.Exists(
x => x.ParentMenu == MenuCategory.CustomOne);
+10
View File
@@ -12,6 +12,16 @@ public interface IMiraPlugin
/// </summary>
string OptionsTitleText { get; }
/// <summary>
/// Gets the name for the first custom category in the game options menu, if any.
/// </summary>
public virtual string CustomOptionMenuNameOne => "Custom Category 1";
/// <summary>
/// Gets the name for the second custom category in the game options menu, if any.
/// </summary>
public virtual string CustomOptionMenuNameTwo => "Custom Category 2";
/// <summary>
/// Gets the BepInEx configuration file for the plugin.
/// </summary>