add Screen Filter to ScreenPlayerOptions

This commit is contained in:
AJ Kelly
2011-09-03 19:55:58 -05:00
parent afe7569f08
commit ffa6bbf2e0
4 changed files with 62 additions and 12 deletions
+41 -3
View File
@@ -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