Skip to content

Class ActionRepeat

Definition

Namespace: StardewUI.Input
Assembly: StardewUI.dll

Configures the repeat rate of an action used in an ActionState<T>.

[StardewUI.DuckType]
public record ActionRepeat : IEquatable<StardewUI.Input.ActionRepeat>

Inheritance
Object ⇦ ActionRepeat

Implements
IEquatable<ActionRepeat>

Members

Constructors

Name Description
ActionRepeat(TimeSpan, TimeSpan?) Configures the repeat rate of an action used in an ActionState<T>.

Fields

Name Description
Continuous Configures an action to repeat continuously, i.e. to run again on every frame as long as the trigger keys are still held.
Default Default repetition setting suitable for most UI scenarios.
None Configures an action to never repeat, no matter how long the trigger keys are held.

Properties

Name Description
EqualityContract
InitialDelay Initial delay after the first press, before any repetitions are allowed.
RepeatInterval The interval between repetitions of the action, while the key is held.

Details

Constructors

ActionRepeat(TimeSpan, TimeSpan?)

Configures the repeat rate of an action used in an ActionState<T>.

public ActionRepeat(System.TimeSpan RepeatInterval, System.TimeSpan? InitialDelay);
Parameters

RepeatInterval   TimeSpan
The interval between repetitions of the action, while the key is held.

InitialDelay   Nullable<TimeSpan>
Initial delay after the first press, before any repetitions are allowed.


Fields

Continuous

Configures an action to repeat continuously, i.e. to run again on every frame as long as the trigger keys are still held.

public static readonly StardewUI.Input.ActionRepeat Continuous;
Field Value

ActionRepeat


Default

Default repetition setting suitable for most UI scenarios.

public static readonly StardewUI.Input.ActionRepeat Default;
Field Value

ActionRepeat

Remarks

Not perfectly consistent (nor intended to be consistent) with vanilla game settings, which are all over the place depending on which key/button is being considered.


None

Configures an action to never repeat, no matter how long the trigger keys are held.

public static readonly StardewUI.Input.ActionRepeat None;
Field Value

ActionRepeat


Properties

EqualityContract

protected System.Type EqualityContract { get; }
Property Value

Type


InitialDelay

Initial delay after the first press, before any repetitions are allowed.

public System.TimeSpan? InitialDelay { get; set; }
Property Value

Nullable<TimeSpan>


RepeatInterval

The interval between repetitions of the action, while the key is held.

public System.TimeSpan RepeatInterval { get; set; }
Property Value

TimeSpan