mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-11-19 13:17:10 +00:00
add HideIconOnHover for local settings
This commit is contained in:
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>
|
||||
|
||||
@@ -18,6 +18,7 @@ public class MiraApiSettings(ConfigFile config) : LocalSettingsTab(config)
|
||||
{
|
||||
TabButtonHoverColor = MiraApiPlugin.MiraColor,
|
||||
TabIcon = MiraAssets.SettingsIcon,
|
||||
HideIconOnHover = false,
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user