swiftlys2/docs/api/ai/
API Reference Menus

IMenuDesignAPI

Interface
Namespace: SwiftlyS2.Shared.Menus · Assembly: SwiftlyS2.CS2.dll
public interface IMenuDesignAPI
View source

Methods

DisableAutoAdjustVisibleItems()

Disables automatic adjustment of visible items when title or footer is hidden.

IMenuBuilderAPI DisableAutoAdjustVisibleItems()
Returns
The menu builder for method chaining.

EnableAutoAdjustVisibleItems()

Enables automatic adjustment of visible items when title or footer is hidden.

IMenuBuilderAPI EnableAutoAdjustVisibleItems()
Returns
The menu builder for method chaining.

When enabled, hiding the title or footer will increase the effective visible item count during rendering without modifying the configured Int32) value.

SetCommentVisible(bool)

Controls the visibility of menu option comments.

IMenuBuilderAPI SetCommentVisible(bool visible = true)
Parameters
  • visiblebooloptionalTrue to show comments, false to hide them. Default is true.
Returns
The menu builder for method chaining.

SetDefaultComment(string)

Sets the default comment text to use when a menu option's Comment is not set.

IMenuBuilderAPI SetDefaultComment(string comment)
Parameters
  • commentstringThe default comment text.
Returns
The menu builder for method chaining.

SetDisabledColor(string?)

Sets the color of disabled menu options using hex color format.

IMenuBuilderAPI SetDisabledColor(string? hexColor = null)
Parameters
  • hexColorstring?optionalThe color in hex format (e.g., "#808080" for gray). Pass null to reset to default.
Returns
The menu builder for method chaining.

SetDisabledColor(Color)

Sets the color of disabled menu options using SwiftlyS2 native color.

IMenuBuilderAPI SetDisabledColor(Color color)
Parameters
  • colorColorThe SwiftlyS2 native color to apply to disabled options.
Returns
The menu builder for method chaining.

SetDisabledColor(Color)

Sets the color of disabled menu options using System.Drawing color.

IMenuBuilderAPI SetDisabledColor(Color color)
Parameters
  • colorColorThe System.Drawing color to apply to disabled options.
Returns
The menu builder for method chaining.

SetGlobalScrollStyle(MenuOptionScrollStyle)

Sets the default scroll animation style for all menu options.

IMenuBuilderAPI SetGlobalScrollStyle(MenuOptionScrollStyle style)
Parameters
Returns
The menu builder for method chaining.

Individual options can override this global setting.

SetMaxVisibleItems(int)

Sets the maximum number of menu options visible on screen at once.

IMenuBuilderAPI SetMaxVisibleItems(int count = 5)
Parameters
  • countintoptionalThe maximum visible item count. Valid range is 1-5. Default is 5.
Returns
The menu builder for method chaining.

Values outside the range of 1-5 will be automatically clamped to the nearest valid value. Menus with more options than this limit will be paginated.

SetMenuFooterColor(string?)

Sets the color of the menu footer using hex color format.

IMenuBuilderAPI SetMenuFooterColor(string? hexColor = null)
Parameters
  • hexColorstring?optionalThe color in hex format (e.g., "#FF0000" for red). Pass null to reset to default.
Returns
The menu builder for method chaining.

SetMenuFooterColor(Color)

Sets the color of the menu footer using SwiftlyS2 native color.

IMenuBuilderAPI SetMenuFooterColor(Color color)
Parameters
  • colorColorThe SwiftlyS2 native color to apply to the footer.
Returns
The menu builder for method chaining.

SetMenuFooterColor(Color)

Sets the color of the menu footer using System.Drawing color.

IMenuBuilderAPI SetMenuFooterColor(Color color)
Parameters
  • colorColorThe System.Drawing color to apply to the footer.
Returns
The menu builder for method chaining.

SetMenuFooterVisible(bool)

Controls the visibility of the menu footer.

IMenuBuilderAPI SetMenuFooterVisible(bool visible = true)
Parameters
  • visiblebooloptionalTrue to show the footer, false to hide it. Default is true.
Returns
The menu builder for method chaining.

SetMenuTitle(string?)

Sets the title text displayed at the top of the menu.

IMenuBuilderAPI SetMenuTitle(string? title = null)
Parameters
  • titlestring?optionalThe title text. Pass null to clear the title.
Returns
The menu builder for method chaining.

SetMenuTitleItemCountVisible(bool)

Controls the visibility of the item count in the menu title.

IMenuBuilderAPI SetMenuTitleItemCountVisible(bool visible = true)
Parameters
  • visiblebooloptionalTrue to show the item count, false to hide it. Default is true.
Returns
The menu builder for method chaining.

SetMenuTitleVisible(bool)

Controls the visibility of the menu title.

IMenuBuilderAPI SetMenuTitleVisible(bool visible = true)
Parameters
  • visiblebooloptionalTrue to show the title, false to hide it. Default is true.
Returns
The menu builder for method chaining.

SetNavigationMarkerColor(string?)

Sets the color of the navigation markers using hex color format.

IMenuBuilderAPI SetNavigationMarkerColor(string? hexColor = null)
Parameters
  • hexColorstring?optionalThe color in hex format (e.g., "#FFFFFF" for white). Pass null to reset to default.
Returns
The menu builder for method chaining.

SetNavigationMarkerColor(Color)

Sets the color of the navigation markers using SwiftlyS2 native color.

IMenuBuilderAPI SetNavigationMarkerColor(Color color)
Parameters
  • colorColorThe SwiftlyS2 native color to apply to the navigation markers.
Returns
The menu builder for method chaining.

SetNavigationMarkerColor(Color)

Sets the color of the navigation markers using System.Drawing color.

IMenuBuilderAPI SetNavigationMarkerColor(Color color)
Parameters
  • colorColorThe System.Drawing color to apply to the navigation markers.
Returns
The menu builder for method chaining.

SetVisualGuideLineColor(string?)

Sets the color of the visual guide lines using hex color format.

IMenuBuilderAPI SetVisualGuideLineColor(string? hexColor = null)
Parameters
  • hexColorstring?optionalThe color in hex format (e.g., "#FFFFFF" for white). Pass null to reset to default.
Returns
The menu builder for method chaining.

SetVisualGuideLineColor(Color)

Sets the color of the visual guide lines using SwiftlyS2 native color.

IMenuBuilderAPI SetVisualGuideLineColor(Color color)
Parameters
  • colorColorThe SwiftlyS2 native color to apply to the guide lines.
Returns
The menu builder for method chaining.

SetVisualGuideLineColor(Color)

Sets the color of the visual guide lines using System.Drawing color.

IMenuBuilderAPI SetVisualGuideLineColor(Color color)
Parameters
  • colorColorThe System.Drawing color to apply to the guide lines.
Returns
The menu builder for method chaining.