+ support for different song select cursors based on the gauge type
This commit is contained in:
parent
50e152d515
commit
5b5486852a
|
@ -63,6 +63,12 @@ local prevSettingStroke = {x=0, y=0}
|
||||||
local settingStroke = {x=0, y=0}
|
local settingStroke = {x=0, y=0}
|
||||||
local prevVis = false
|
local prevVis = false
|
||||||
|
|
||||||
|
function processSkinSettings(settingName, settingValue)
|
||||||
|
if (settingName == 'Gauge') then
|
||||||
|
game.SetSkinSetting('_gaugeType', settingValue);
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function render(deltaTime, visible)
|
function render(deltaTime, visible)
|
||||||
if visible and not prevVis then
|
if visible and not prevVis then
|
||||||
yScale:restart(0, 1, 0.25)
|
yScale:restart(0, 1, 0.25)
|
||||||
|
@ -149,6 +155,8 @@ function render(deltaTime, visible)
|
||||||
local settingHeight = 30
|
local settingHeight = 30
|
||||||
local tab = SettingsDiag.tabs[SettingsDiag.currentTab]
|
local tab = SettingsDiag.tabs[SettingsDiag.currentTab]
|
||||||
for si, setting in ipairs(tab.settings) do
|
for si, setting in ipairs(tab.settings) do
|
||||||
|
processSkinSettings(setting.name, setting.value)
|
||||||
|
|
||||||
local disp = ""
|
local disp = ""
|
||||||
if setting.type == "enum" then
|
if setting.type == "enum" then
|
||||||
disp = string.format("%s: %s", setting.name, setting.options[setting.value])
|
disp = string.format("%s: %s", setting.name, setting.options[setting.value])
|
||||||
|
|
|
@ -3,7 +3,12 @@ local Easing = require('common.easings');
|
||||||
|
|
||||||
local defaultFolderBgImage = gfx.CreateSkinImage('song_select/filter_wheel/bg.png', 0)
|
local defaultFolderBgImage = gfx.CreateSkinImage('song_select/filter_wheel/bg.png', 0)
|
||||||
|
|
||||||
local cursorImage = gfx.CreateSkinImage('song_select/cursor.png', 0)
|
local cursorImages = {
|
||||||
|
gfx.CreateSkinImage("song_select/cursor.png", 1), -- Effective rate or fallback
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- Excessive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- TODO: premissive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- TODO: blastive rate
|
||||||
|
}
|
||||||
|
|
||||||
local ITEM_HEIGHT = 172;
|
local ITEM_HEIGHT = 172;
|
||||||
|
|
||||||
|
@ -207,6 +212,10 @@ end
|
||||||
|
|
||||||
function drawCursor()
|
function drawCursor()
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
|
|
||||||
|
local cursorImageIndex = game.GetSkinSetting('_gaugeType')
|
||||||
|
local cursorImage = cursorImages[cursorImageIndex or 1];
|
||||||
|
|
||||||
gfx.ImageRect(desw/2-14, desh/2-213/2, 555, 213, cursorImage, 1, 0)
|
gfx.ImageRect(desw/2-14, desh/2-213/2, 555, 213, cursorImage, 1, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,13 @@ local illustratedBgImage = gfx.CreateSkinImage("song_select/data_panel/illust_bg
|
||||||
local songPlateBg = gfx.CreateSkinImage("song_select/plate/bg.png", 1)
|
local songPlateBg = gfx.CreateSkinImage("song_select/plate/bg.png", 1)
|
||||||
local songPlateBottomBarOverlayImage = gfx.CreateSkinImage("song_select/plate/bottom_bar_overlay.png", 1)
|
local songPlateBottomBarOverlayImage = gfx.CreateSkinImage("song_select/plate/bottom_bar_overlay.png", 1)
|
||||||
|
|
||||||
local cursorImage = gfx.CreateSkinImage("song_select/cursor.png", 1)
|
local cursorImages = {
|
||||||
|
gfx.CreateSkinImage("song_select/cursor.png", 1), -- Effective rate or fallback
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- Excessive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- TODO: premissive rate
|
||||||
|
gfx.CreateSkinImage("song_select/cursor_exc.png", 1), -- TODO: blastive rate
|
||||||
|
}
|
||||||
|
|
||||||
local diffCursorImage = gfx.CreateSkinImage("song_select/level_cursor.png", 1)
|
local diffCursorImage = gfx.CreateSkinImage("song_select/level_cursor.png", 1)
|
||||||
|
|
||||||
local searchBgImage = gfx.CreateSkinImage("song_select/search_bg.png", 1)
|
local searchBgImage = gfx.CreateSkinImage("song_select/search_bg.png", 1)
|
||||||
|
@ -328,6 +334,10 @@ end
|
||||||
|
|
||||||
function drawCursor()
|
function drawCursor()
|
||||||
gfx.BeginPath()
|
gfx.BeginPath()
|
||||||
|
|
||||||
|
local cursorImageIndex = game.GetSkinSetting('_gaugeType')
|
||||||
|
local cursorImage = cursorImages[cursorImageIndex or 1];
|
||||||
|
|
||||||
gfx.ImageRect(desw/2-14, desh/2-213/2, 555, 213, cursorImage, 1, 0)
|
gfx.ImageRect(desw/2-14, desh/2-213/2, 555, 213, cursorImage, 1, 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue