SwiftlyS2

IMenuDesignAPI

Interface IMenuDesignAPI

Namespace: SwiftlyS2.Shared.Menus

Assembly: SwiftlyS2.CS2.dll

public interface IMenuDesignAPI

Methods

DisableAutoAdjustVisibleItems()

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

IMenuBuilderAPI DisableAutoAdjustVisibleItems()
Returns

EnableAutoAdjustVisibleItems()

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

IMenuBuilderAPI EnableAutoAdjustVisibleItems()
Returns
Remarks

When enabled, hiding the title or footer will increase the effective visible item count during rendering without modifying the configured SwiftlyS2.Shared.Menus.IMenuDesignAPI.SetMaxVisibleItems(System.Int32) value.

SetDisabledColor(string?)

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

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

SetDisabledColor(Color)

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

IMenuBuilderAPI SetDisabledColor(Color color)
Parameters
  • color Color — The SwiftlyS2 native color to apply to disabled options.
Returns

SetDisabledColor(Color)

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

IMenuBuilderAPI SetDisabledColor(Color color)
Parameters
  • color Color — The System.Drawing color to apply to disabled options.
Returns

SetGlobalScrollStyle(MenuOptionScrollStyle)

Sets the default scroll animation style for all menu options.

IMenuBuilderAPI SetGlobalScrollStyle(MenuOptionScrollStyle style)
Parameters
Returns
Remarks

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
  • count int — The maximum visible item count. Valid range is 1-5. Default is 5.
Returns
Remarks

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
  • hexColor string? — The color in hex format (e.g., "#FF0000" for red). Pass null to reset to default.
Returns

SetMenuFooterColor(Color)

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

IMenuBuilderAPI SetMenuFooterColor(Color color)
Parameters
  • color Color — The SwiftlyS2 native color to apply to the footer.
Returns

SetMenuFooterColor(Color)

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

IMenuBuilderAPI SetMenuFooterColor(Color color)
Parameters
  • color Color — The System.Drawing color to apply to the footer.
Returns

SetMenuFooterVisible(bool)

Controls the visibility of the menu footer.

IMenuBuilderAPI SetMenuFooterVisible(bool visible = true)
Parameters
  • visible bool — True to show the footer, false to hide it. Default is true.
Returns

SetMenuTitle(string?)

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

IMenuBuilderAPI SetMenuTitle(string? title = null)
Parameters
  • title string? — The title text. Pass null to clear the title.
Returns

SetMenuTitleVisible(bool)

Controls the visibility of the menu title.

IMenuBuilderAPI SetMenuTitleVisible(bool visible = true)
Parameters
  • visible bool — True to show the title, false to hide it. Default is true.
Returns

SetNavigationMarkerColor(string?)

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

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

SetNavigationMarkerColor(Color)

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

IMenuBuilderAPI SetNavigationMarkerColor(Color color)
Parameters
  • color Color — The SwiftlyS2 native color to apply to the navigation markers.
Returns

SetNavigationMarkerColor(Color)

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

IMenuBuilderAPI SetNavigationMarkerColor(Color color)
Parameters
  • color Color — The System.Drawing color to apply to the navigation markers.
Returns

SetVisualGuideLineColor(string?)

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

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

SetVisualGuideLineColor(Color)

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

IMenuBuilderAPI SetVisualGuideLineColor(Color color)
Parameters
  • color Color — The SwiftlyS2 native color to apply to the guide lines.
Returns

SetVisualGuideLineColor(Color)

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

IMenuBuilderAPI SetVisualGuideLineColor(Color color)
Parameters
  • color Color — The System.Drawing color to apply to the guide lines.
Returns

On this page