add Screen Filter to ScreenPlayerOptions
This commit is contained in:
@@ -51,7 +51,45 @@ end
|
||||
|
||||
--[[ option rows ]]
|
||||
|
||||
-- screen cover
|
||||
-- screen filter
|
||||
function OptionRowScreenFilter()
|
||||
local t = {
|
||||
Name="ScreenFilter",
|
||||
LayoutType = "ShowAllInRow",
|
||||
SelectType = "SelectOne",
|
||||
OneChoiceForAllPlayers = false,
|
||||
ExportOnChange = false,
|
||||
Choices = { 'Off', '0.1', '0.2', '0.3', '0.4', '0.5', '0.6', '0.7', '0.8', '0.9', '1.0', },
|
||||
LoadSelections = function(self, list, pn)
|
||||
local pName = ToEnumShortString(pn)
|
||||
local filterValue = getenv("ScreenFilter"..pName)
|
||||
if filterValue ~= nil then
|
||||
local val = scale(tonumber(filterValue),0,1,1,#list )
|
||||
list[val] = true
|
||||
else
|
||||
setenv("ScreenFilter"..pName,0)
|
||||
list[1] = true
|
||||
end
|
||||
end,
|
||||
SaveSelections = function(self, list, pn)
|
||||
local pName = ToEnumShortString(pn)
|
||||
local found = false
|
||||
for i=1,#list do
|
||||
if not found then
|
||||
if list[i] == true then
|
||||
local val = scale(i,1,#list,0,1)
|
||||
setenv("ScreenFilter"..pName,val)
|
||||
found = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
};
|
||||
setmetatable(t, t)
|
||||
return t
|
||||
end
|
||||
|
||||
-- protiming
|
||||
function OptionRowProTiming()
|
||||
local t = {
|
||||
Name = "ProTiming",
|
||||
@@ -176,8 +214,8 @@ end
|
||||
|
||||
function GetDefaultOptionLines()
|
||||
local LineSets = { -- none of these include characters yet.
|
||||
"1,8,14,2,3A,3B,4,5,6,R,7,9,10,11,12,13,16,17", -- All
|
||||
"1,8,14,2,7,13,16,17", -- DDR Essentials ( no turns, fx )
|
||||
"1,8,14,2,3A,3B,4,5,6,R,7,9,10,11,12,13,16,SF,17", -- All
|
||||
"1,8,14,2,7,13,16,SF,17", -- DDR Essentials ( no turns, fx )
|
||||
};
|
||||
local function IsExtra()
|
||||
if GAMESTATE:IsExtraStage() or GAMESTATE:IsExtraStage2() then
|
||||
|
||||
Reference in New Issue
Block a user