Skip to content

Class DirectionExtensions

Definition

Namespace: StardewUI
Assembly: StardewUI.dll

Helpers for working with Direction.

public static class DirectionExtensions

Inheritance
Object ⇦ DirectionExtensions

Members

Methods

Name Description
GetOrientation(Direction) Gets the orientation axis associated with a given direction, i.e. whether it flows horizontally or vertically.
IsHorizontal(Direction) Returns true if the specified direction is along the horizontal (width) axis, otherwise false.
IsVertical(Direction) Returns true if the specified direction is along the vertical (height) axis, otherwise false.

Details

Methods

GetOrientation(Direction)

Gets the orientation axis associated with a given direction, i.e. whether it flows horizontally or vertically.

public static StardewUI.Layout.Orientation GetOrientation(StardewUI.Direction direction);
Parameters

direction   Direction

Returns

Orientation


IsHorizontal(Direction)

Returns true if the specified direction is along the horizontal (width) axis, otherwise false.

public static bool IsHorizontal(StardewUI.Direction direction);
Parameters

direction   Direction

Returns

Boolean


IsVertical(Direction)

Returns true if the specified direction is along the vertical (height) axis, otherwise false.

public static bool IsVertical(StardewUI.Direction direction);
Parameters

direction   Direction

Returns

Boolean