SwiftlyS2

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

Properties

AutoCloseAfter

Time in seconds before the menu automatically closes. Set to 0 or less to disable auto-close.

public float AutoCloseAfter { get; set; }
Property Value

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; }
Property Value
Remarks

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; }
Property Value

DisabledColor

The color of disabled menu options in hex format.

public string? DisabledColor { get; set; }
Property Value
Remarks

Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.

FooterColor

The color of the menu footer in hex format.

public string? FooterColor { get; set; }
Property Value
Remarks

Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.

FreezePlayer

Whether to freeze player movement while the menu is open.

public bool FreezePlayer { get; set; }
Property Value

HideFooter

Whether to hide the menu footer.

public bool HideFooter { get; set; }
Property Value

HideTitle

Whether to hide the menu title.

public bool HideTitle { get; set; }
Property Value

MaxVisibleItems

Maximum number of menu options displayed on screen at once.

public int MaxVisibleItems { get; set; }
Property Value
Remarks

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.

The color of navigation markers (selection indicators, page indicators, etc.) in hex format.

public string? NavigationMarkerColor { get; set; }
Property Value
Remarks

Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.

PlaySound

Whether to play sounds when players interact with the menu.

public bool PlaySound { get; set; }
Property Value

Title

The title of the menu.

public string Title { get; set; }
Property Value

VisualGuideLineColor

The color of visual guide lines in hex format.

public string? VisualGuideLineColor { get; set; }
Property Value
Remarks

Supports "#RGB", "#RGBA", "#RRGGBB", and "#RRGGBBAA" formats.

On this page