+ collection and level specific folder backgrounds
This commit is contained in:
parent
8a3a760889
commit
53c535e0f6
|
@ -3,8 +3,9 @@ local Easing = require('common.easings');
|
||||||
local SongSelectHeader = require('components.headers.songSelectHeader')
|
local SongSelectHeader = require('components.headers.songSelectHeader')
|
||||||
local Footer = require('components.footer');
|
local Footer = require('components.footer');
|
||||||
|
|
||||||
local defaultFolderBgImage = gfx.CreateSkinImage(
|
local defaultFolderBgImage = gfx.CreateSkinImage('song_select/filter_wheel/bg.png', 0)
|
||||||
'song_select/filter_wheel/bg.png', 0)
|
local collectionFolderBgImage = gfx.CreateSkinImage('song_select/filter_wheel/col_bg.png', 0)
|
||||||
|
local subFolderBgImage = gfx.CreateSkinImage('song_select/filter_wheel/sub_bg.png', 0)
|
||||||
|
|
||||||
local cursorImages = {
|
local cursorImages = {
|
||||||
gfx.CreateSkinImage("song_select/cursor.png", 1), -- Effective rate or fallback
|
gfx.CreateSkinImage("song_select/cursor.png", 1), -- Effective rate or fallback
|
||||||
|
@ -115,9 +116,21 @@ end
|
||||||
|
|
||||||
function getFolderData(folderLabel)
|
function getFolderData(folderLabel)
|
||||||
local folderType = 'unknown';
|
local folderType = 'unknown';
|
||||||
|
local isSpecial = false;
|
||||||
|
|
||||||
|
local folderBgImage = defaultFolderBgImage;
|
||||||
|
if selectionMode == 'levels' then
|
||||||
|
folderBgImage = subFolderBgImage
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
if (string.find(folderLabel, 'Folder: ')) then
|
if (string.find(folderLabel, 'Folder: ')) then
|
||||||
folderType = 'folder';
|
folderType = 'folder';
|
||||||
folderLabel = folderLabel:gsub('Folder: ', '') -- Delete default prefix
|
folderLabel = folderLabel:gsub('Folder: ', '') -- Delete default prefix
|
||||||
|
elseif (string.find(folderLabel, 'Collection: ')) then
|
||||||
|
folderType = 'collection';
|
||||||
|
folderLabel = folderLabel:gsub('Collection: ', '') -- Delete default prefix
|
||||||
|
folderBgImage = collectionFolderBgImage;
|
||||||
elseif (string.find(folderLabel, 'Level: ')) then
|
elseif (string.find(folderLabel, 'Level: ')) then
|
||||||
folderType = 'level';
|
folderType = 'level';
|
||||||
folderLabel = folderLabel:gsub('Level: ', '') -- Delete default prefix
|
folderLabel = folderLabel:gsub('Level: ', '') -- Delete default prefix
|
||||||
|
@ -125,8 +138,6 @@ function getFolderData(folderLabel)
|
||||||
end
|
end
|
||||||
|
|
||||||
local labelMatcherString = string.upper(folderLabel)
|
local labelMatcherString = string.upper(folderLabel)
|
||||||
local folderBgImage = defaultFolderBgImage;
|
|
||||||
local isSpecial = false;
|
|
||||||
|
|
||||||
for i, specialFolder in ipairs(specialFolders) do
|
for i, specialFolder in ipairs(specialFolders) do
|
||||||
for i, specialFolderKey in ipairs(specialFolder.keys) do
|
for i, specialFolderKey in ipairs(specialFolder.keys) do
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
Loading…
Reference in New Issue