+ level selector to filter wheel
This commit is contained in:
parent
8bdcf11dc2
commit
21825d31a7
|
@ -122,7 +122,11 @@ function getFolderData(folderLabel)
|
||||||
local folderType = 'unknown';
|
local folderType = 'unknown';
|
||||||
if (string.find(folderLabel, 'Folder: ')) then
|
if (string.find(folderLabel, 'Folder: ')) then
|
||||||
folderType = 'folder';
|
folderType = 'folder';
|
||||||
folderLabel = folderLabel:gsub('Folder: ', '') -- Delete the useless info
|
folderLabel = folderLabel:gsub('Folder: ', '') -- Delete default prefix
|
||||||
|
elseif (string.find(folderLabel, 'Level: ')) then
|
||||||
|
folderType = 'level';
|
||||||
|
folderLabel = folderLabel:gsub('Level: ', '') -- Delete default prefix
|
||||||
|
folderLabel = 'LEVEL ' .. folderLabel;
|
||||||
end
|
end
|
||||||
|
|
||||||
local labelMatcherString = string.upper(folderLabel)
|
local labelMatcherString = string.upper(folderLabel)
|
||||||
|
@ -170,28 +174,32 @@ end
|
||||||
function drawFolderList()
|
function drawFolderList()
|
||||||
local numOfItemsAround = 7;
|
local numOfItemsAround = 7;
|
||||||
local selectedIndex = 1;
|
local selectedIndex = 1;
|
||||||
|
local folderList = filters.folder;
|
||||||
|
|
||||||
if selectionMode == 'folders' then
|
if selectionMode == 'folders' then
|
||||||
selectedIndex = selectedFolder
|
selectedIndex = selectedFolder
|
||||||
|
folderList = filters.folder;
|
||||||
else
|
else
|
||||||
selectedIndex = selectedLevel
|
selectedIndex = selectedLevel
|
||||||
|
folderList = filters.level;
|
||||||
end
|
end
|
||||||
|
|
||||||
local i = 1;
|
local i = 1;
|
||||||
while (i <= numOfItemsAround) do
|
while (i <= numOfItemsAround) do
|
||||||
local index = getCorrectedIndex(selectedIndex, -i)
|
local index = getCorrectedIndex(selectedIndex, -i)
|
||||||
drawFolder(filters.folder[index], desh / 2 - ITEM_HEIGHT / 2 -
|
drawFolder(folderList[index], desh / 2 - ITEM_HEIGHT / 2 -
|
||||||
ITEM_HEIGHT * i + transitionScrollOffsetY)
|
ITEM_HEIGHT * i + transitionScrollOffsetY)
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Draw the selected song
|
-- Draw the selected song
|
||||||
drawFolder(filters.folder[selectedIndex],
|
drawFolder(folderList[selectedIndex],
|
||||||
desh / 2 - ITEM_HEIGHT / 2 + transitionScrollOffsetY)
|
desh / 2 - ITEM_HEIGHT / 2 + transitionScrollOffsetY)
|
||||||
|
|
||||||
i = 1;
|
i = 1;
|
||||||
while (i <= numOfItemsAround) do
|
while (i <= numOfItemsAround) do
|
||||||
local index = getCorrectedIndex(selectedIndex, i)
|
local index = getCorrectedIndex(selectedIndex, i)
|
||||||
drawFolder(filters.folder[index], desh / 2 - ITEM_HEIGHT / 2 +
|
drawFolder(folderList[index], desh / 2 - ITEM_HEIGHT / 2 +
|
||||||
ITEM_HEIGHT * i + transitionScrollOffsetY)
|
ITEM_HEIGHT * i + transitionScrollOffsetY)
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue