add HideIconOnHover for local settings

This commit is contained in:
xChipseq committed 2025-09-20 21:58:30 +02:00
1 parent af75cc3606
commit 8da80be027
3 files changed
+8 -1

No files matched your search

@@ -246,6 +246,7 @@ public abstract class LocalSettingsTab(ConfigFile config)
tabButtonText.maxVisibleCharacters = int.MaxValue;
tabButtonText.text = TabName;
tabButtonText.alignment = TextAlignmentOptions.Left;
tabButtonRend?.gameObject.SetActive(!TabAppearance.HideIconOnHover);
}));
tabButton.OnMouseOut.AddListener((UnityAction)(() =>
{
@@ -4,7 +4,7 @@ using UnityEngine;
namespace MiraAPI.LocalSettings;
/// <summary>
/// Struct for modyfing tab apparance.
/// Struct for modifying tab appearance.
/// Defines how the settings look.
/// </summary>
public record struct LocalSettingTabAppearance()
@@ -24,6 +24,11 @@ public record struct LocalSettingTabAppearance()
/// </summary>
public Color TabButtonColor { get; set; } = Color.white;
/// <summary>
/// Gets or sets a value indicating whether the icon should be hidden when tab button is hovered.
/// </summary>
public bool HideIconOnHover { get; set; } = true;
/// <summary>
/// Gets or sets hover color of the tab button.
/// </summary>
+1
View File
@@ -18,6 +18,7 @@ public class MiraApiSettings(ConfigFile config) : LocalSettingsTab(config)
{
TabButtonHoverColor = MiraApiPlugin.MiraColor,
TabIcon = MiraAssets.SettingsIcon,
HideIconOnHover = false,
};
/// <summary>