Class MusicWheel
Music Wheel class
This class inherits methods from the WheelBase class.
A MusicWheel is the structure responsible for
allowing the user to scroll through songs and make a selection to play.
The easiest way to acquire the existing MusicWheel on a screen is SCREENMAN:GetTopScreen():GetMusicWheel()
.
This class inherits all methods from these classes: WheelBase ActorFrame Actor
Methods
musicwheel:ChangeSort (SortOrder) | Change the SortOrder for the MusicWheel. |
musicwheel:GetSelectedSection () | Get the name of the current group being hovered. |
musicwheel:IsRouletting () | Deprecated method, since Roulette/Random has been mostly removed. |
musicwheel:SelectSong (Song) | Instantly warp the MusicWheel to the first found instance of the given Song. |
musicwheel:SongSearch (searchString) | Use super-search to filter the MusicWheel This can be used to search for specific metadata for all Charts in the current Game. |
musicwheel:ReloadSongList () | Remove the search filter from the MusicWheel |
musicwheel:Move (amount) | Move the MusicWheel a given number of Songs. |
musicwheel:MoveAndCheckType (amount) | Move the MusicWheel a given number of Songs. |
musicwheel:FilterByStepKeys (chartkeys) | Filter the current MusicWheel results using a given table of ChartKeys. |
musicwheel:FilterByAndAgainstStepKeys (requireChartkeys, excludeChartkeys) | Filter the current MusicWheel results using two given tables of ChartKeys. |
musicwheel:SetPackListFiltering (toggle) | Set the state of the Common Pack Filter for Multiplayer. |
musicwheel:GetSongs () | Get the current list of Songs in the MusicWheel, after all filtering. |
musicwheel:GetSongsInGroup (group) | Get the list of Songs in the given group for the current SortOrder, after all filtering. |
Methods
- musicwheel:ChangeSort (SortOrder)
-
Change the SortOrder for the MusicWheel. This is the equivalent of pressing UpDown UpDown then making a choice.
Parameters:
Returns:
-
bool
Whether or not the change was successful
- musicwheel:GetSelectedSection ()
-
Get the name of the current group being hovered.
Returns:
-
string
The name of the group being hovered.
- musicwheel:IsRouletting ()
-
Deprecated method, since Roulette/Random has been mostly removed.
Returns:
-
bool
True if the MusicWheel is currently in Roulette mode (spinning endlessly)
- musicwheel:SelectSong (Song)
-
Instantly warp the MusicWheel to the first found instance of the given Song. This will fail if the Song has been filtered out for some reason.
Parameters:
Returns:
-
bool
True if the Song can be selected
- musicwheel:SongSearch (searchString)
-
Use super-search to filter the MusicWheel
This can be used to search for specific metadata for all Charts in the current Game.
Multiple metadata fields can be searched by separating them with a
;
. When given multiple fields to search, any results must match all fields. For example, to search for both the title and artist,title=xxx;artist=yyy
. If the search returned no results, then the previous successful search is executed again. Valid metadata fields:artist=
author=
title=
subtitle=
group=
charter=
stepper=
pack=
ck=
.Parameters:
- searchString string The full search you want to run
Returns:
-
nil
- musicwheel:ReloadSongList ()
-
Remove the search filter from the MusicWheel
Returns:
-
nil
- musicwheel:Move (amount)
-
Move the MusicWheel a given number of Songs. This may fail if the wheel is locked.
Parameters:
- amount int The number of Songs to move. When nil, move 0. When negative, go in the other direction.
Returns:
-
nil
- musicwheel:MoveAndCheckType (amount)
-
Move the MusicWheel a given number of Songs. This may fail if the wheel is locked.
Parameters:
- amount int The number of Songs to move. When nil, move 0. When negative, go in the other direction.
Returns:
-
string
The WheelItemDataType of the resulting Song that the Move landed on.
- musicwheel:FilterByStepKeys (chartkeys)
-
Filter the current MusicWheel results using a given table of ChartKeys.
The MusicWheel is filtered to contain only charts which match the given keys.
Parameters:
- chartkeys {string,...} A table of chartkeys
Returns:
-
nil
- musicwheel:FilterByAndAgainstStepKeys (requireChartkeys, excludeChartkeys)
-
Filter the current MusicWheel results using two given tables of ChartKeys.
The MusicWheel is filtered to contain only the charts which match the first list of keys. If none are given, then only exclude any charts that match the second list.
Parameters:
- requireChartkeys {string,...} A list of chartkeys to require match.
- excludeChartkeys {string,...} A list of chartkeys to exclude from the results.
Returns:
-
nil
- musicwheel:SetPackListFiltering (toggle)
-
Set the state of the Common Pack Filter for Multiplayer.
Turning this on filters out any packs that you do not have in common with other players in the lobby.
Parameters:
- toggle bool Turn the Common Pack Filter on or off.
Returns:
-
bool
The new state of the Common Pack Filter
- musicwheel:GetSongs ()
-
Get the current list of Songs in the MusicWheel, after all filtering.
Returns:
-
{Song,...}
List of Songs
- musicwheel:GetSongsInGroup (group)
-
Get the list of Songs in the given group for the current SortOrder, after all filtering.
Parameters:
- group
Returns:
-
{Song,...}
List of Songs. If the group does not exist, then this is nil.