Table of Contents

Class KeyMenuItem

Namespace
Stride.CommunityToolkit.Rendering.Overlay
Assembly
Stride.CommunityToolkit.dll

One selectable entry in a KeyMenu.

public record KeyMenuItem : IEquatable<KeyMenuItem>
Inheritance
KeyMenuItem
Implements

Remarks

Because the key is yours to choose, a key menu is not limited to ten entries - use letters once the digits run out.

Constructors

KeyMenuItem(Keys, string, Action?, Color?)

One selectable entry in a KeyMenu.

public KeyMenuItem(Keys Key, string Text, Action? Action = null, Color? Color = null)

Parameters

Key Keys

The key that selects this entry while the key menu is open.

Text string

The label shown for this entry, and shown next to the title once it is selected.

Action Action

Invoked when this entry is selected, after the key menu closes if CloseOnSelect is set.

Color Color?

The optional colour for this entry. If null, the default text colour is used.

Remarks

Because the key is yours to choose, a key menu is not limited to ten entries - use letters once the digits run out.

Properties

Action

Invoked when this entry is selected, after the key menu closes if CloseOnSelect is set.

public Action? Action { get; init; }

Property Value

Action

Color

The optional colour for this entry. If null, the default text colour is used.

public Color? Color { get; init; }

Property Value

Color?

Key

The key that selects this entry while the key menu is open.

public Keys Key { get; init; }

Property Value

Keys

Text

The label shown for this entry, and shown next to the title once it is selected.

public string Text { get; init; }

Property Value

string