Class WheelBase

Selection Wheel base class

This is the base class for other wheel classes such as MusicWheel and RoomWheel.

The easiest way to acquire the existing Wheel on a screen is SCREENMAN:GetTopScreen():GetMusicWheel().

This class inherits all methods from these classes: ActorFrame Actor

Methods

wheelbase:Move (amount) Move the wheel a given amount of choices in some direction.
wheelbase:GetWheelItem (index) Retrieve the WheelItemBase at a given index.
wheelbase:IsSettled () Query whether or not the Wheel is settled.
wheelbase:IsLocked () Query whether or not the Wheel is locked.
wheelbase:SetOpenSection (sectionName) Set the current open section on the Wheel.
wheelbase:GetCurrentIndex () Get the current index of the hovered item in all of the data loaded in the Wheel.
wheelbase:GetNumItems () Get the number of items in the data loaded in the Wheel.
wheelbase:GetSelectedType () Get the WheelItemDataType of the currently hovered WheelItem.
wheelbase:RebuildWheelItems () Rebuild the WheelItems to refresh the visual data.


Methods

wheelbase:Move (amount)
Move the wheel a given amount of choices in some direction.

Parameters:

  • amount int Amount to move. Nil does no move. Negative goes in the other direction.

Returns:

    self
wheelbase:GetWheelItem (index)
Retrieve the WheelItemBase at a given index. This does not retrieve an arbitrarily far wheel item, but actually the visible item. Every time a movement is made on the Wheel, the data behind each WheelItem is switched to another WheelItem. For example, the highest allowed index to pass is (NUM_WHEEL_ITEMS-1) which comes from the metrics.ini definition for the Wheel implementation you are using (NumWheelItems).

Parameters:

  • index int Index for the WheelItem to retrieve.

Returns:

    WheelItemBase The WheelItem at the given index. Returns nil and throws an error if the index is not valid.
wheelbase:IsSettled ()
Query whether or not the Wheel is settled. The Wheel is settled if it is not moving or locked.

Returns:

    bool True if the wheel is not moving.
wheelbase:IsLocked ()
Query whether or not the Wheel is locked. The Wheel is locked when a selection was just made or roulette just finished.

Returns:

    bool True if the wheel is locked.
wheelbase:SetOpenSection (sectionName)
Set the current open section on the Wheel. This is usually used to change the opened folder remotely.

Parameters:

  • sectionName string The name of a group or section, depending on the SortOrder

Returns:

    self
wheelbase:GetCurrentIndex ()
Get the current index of the hovered item in all of the data loaded in the Wheel. This is not restricted by NumWheelItems.

Returns:

    int Index of the currently hovered item.
wheelbase:GetNumItems ()
Get the number of items in the data loaded in the Wheel. This is not restricted by NumWheelItems. This may include all Songs and all Group items.

Returns:

    int Count of items in the Wheel.
wheelbase:GetSelectedType ()
Get the WheelItemDataType of the currently hovered WheelItem.

Returns:

    WheelItemDataType The type of the currently hovered WheelItem.
wheelbase:RebuildWheelItems ()
Rebuild the WheelItems to refresh the visual data.

Returns:

    self
generated by LDoc 1.5.0 Last updated 2024-10-02 05:06:53