MenuConfiguration
Class MenuConfiguration
Namespace: SwiftlyS2.Shared.Menus
Assembly: SwiftlyS2.CS2.dll
Defines configuration settings that control menu behavior.
public record MenuConfiguration : IEquatable<MenuConfiguration>Inheritance
Implements
Inherited Members
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.MemberwiseClone()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Properties
AutoCloseAfter
Time in seconds before the menu automatically closes. Set to 0 or less to disable auto-close.
public float AutoCloseAfter { get; set; }AutoIncreaseVisibleItems
Whether to automatically increase SwiftlyS2.Shared.Menus.MenuConfiguration.MaxVisibleItems when SwiftlyS2.Shared.Menus.MenuConfiguration.HideTitle or SwiftlyS2.Shared.Menus.MenuConfiguration.HideFooter is enabled. Each hidden section adds 1 to the visible items count.
public bool AutoIncreaseVisibleItems { get; set; }This does not modify the actual SwiftlyS2.Shared.Menus.MenuConfiguration.MaxVisibleItems value. Instead, the increase is applied during rendering calculations only.
DisableExit
Whether to disable the exit button for this menu.
public bool DisableExit { get; set; }DisabledColor
The color of disabled menu options in hex format.
public string? DisabledColor { get; set; }Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.
FooterColor
The color of the menu footer in hex format.
public string? FooterColor { get; set; }Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.
FreezePlayer
Whether to freeze player movement while the menu is open.
public bool FreezePlayer { get; set; }HideFooter
Whether to hide the menu footer.
public bool HideFooter { get; set; }HideTitle
Whether to hide the menu title.
public bool HideTitle { get; set; }MaxVisibleItems
Maximum number of menu options displayed on screen at once.
public int MaxVisibleItems { get; set; }Valid range is [1, 5]. If set to a value outside this range, an exception will be thrown and the value will be set to -1.
When set to -1, the maximum visible items per page will use the ItemsPerPage value from the configuration file.
NavigationMarkerColor
The color of navigation markers (selection indicators, page indicators, etc.) in hex format.
public string? NavigationMarkerColor { get; set; }Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.
PlaySound
Whether to play sounds when players interact with the menu.
public bool PlaySound { get; set; }Title
The title of the menu.
public string Title { get; set; }VisualGuideLineColor
The color of visual guide lines in hex format.
public string? VisualGuideLineColor { get; set; }Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.