|
|
|
@@ -48,7 +48,7 @@ local Prefs =
|
|
|
|
|
Choices = { OptionNameString('Off'), OptionNameString('On') },
|
|
|
|
|
Values = { false, true }
|
|
|
|
|
},
|
|
|
|
|
FlashyCombos =
|
|
|
|
|
FlashyCombo =
|
|
|
|
|
{
|
|
|
|
|
Default = false,
|
|
|
|
|
Choices = { OptionNameString('Off'), OptionNameString('On') },
|
|
|
|
@@ -66,9 +66,20 @@ local Prefs =
|
|
|
|
|
Choices = { OptionNameString('Off'), OptionNameString('On') },
|
|
|
|
|
Values = { false, true }
|
|
|
|
|
},
|
|
|
|
|
--[[
|
|
|
|
|
TimingDisplay,
|
|
|
|
|
TimingDisplay =
|
|
|
|
|
{
|
|
|
|
|
Default = true,
|
|
|
|
|
Choices = { OptionNameString('Off'), OptionNameString('On') },
|
|
|
|
|
Values = { false, true }
|
|
|
|
|
},
|
|
|
|
|
GameplayFooter =
|
|
|
|
|
{
|
|
|
|
|
Default = false,
|
|
|
|
|
Choices = { OptionNameString('Off'), OptionNameString('On') },
|
|
|
|
|
Values = { false, true }
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
--[[
|
|
|
|
|
ProtimingP1,
|
|
|
|
|
ProtimingP2,
|
|
|
|
|
|
|
|
|
@@ -80,20 +91,9 @@ ThemePrefs.InitAll(Prefs)
|
|
|
|
|
|
|
|
|
|
function InitUserPrefs()
|
|
|
|
|
local Prefs = {
|
|
|
|
|
UserPrefGameplayShowStepsDisplay = true,
|
|
|
|
|
UserPrefGameplayShowScore = false,
|
|
|
|
|
UserPrefScoringMode = 'DDR Extreme',
|
|
|
|
|
UserPrefShowLotsaOptions = true,
|
|
|
|
|
UserPrefAutoSetStyle = false,
|
|
|
|
|
UserPrefLongFail = false,
|
|
|
|
|
UserPrefNotePosition = true,
|
|
|
|
|
UserPrefComboOnRolls = false,
|
|
|
|
|
UserPrefProtimingP1 = false,
|
|
|
|
|
UserPrefProtimingP2 = false,
|
|
|
|
|
FlashyCombos = false,
|
|
|
|
|
UserPrefComboUnderField = true,
|
|
|
|
|
UserPrefFancyUIBG = true,
|
|
|
|
|
UserPrefTimingDisplay = true
|
|
|
|
|
}
|
|
|
|
|
for k, v in pairs(Prefs) do
|
|
|
|
|
-- kind of xxx
|
|
|
|
@@ -191,108 +191,6 @@ function OptionRowProTiming()
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefGameplayShowScore()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefGameplayShowScore",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefGameplayShowScore") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefGameplayShowScore") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefGameplayShowScore", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefGameplayShowScore", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefGameplayShowStepsDisplay()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefGameplayShowStepsDisplay",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefGameplayShowStepsDisplay") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefGameplayShowStepsDisplay") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefGameplayShowStepsDisplay", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefGameplayShowStepsDisplay", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefShowLotsaOptions()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefShowLotsaOptions",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Many'),
|
|
|
|
|
THEME:GetString('OptionNames','Few')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefShowLotsaOptions") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefShowLotsaOptions") then
|
|
|
|
|
list[1] = true
|
|
|
|
|
else
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefShowLotsaOptions", false)
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[1] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefShowLotsaOptions", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t);
|
|
|
|
|
return t
|
|
|
|
|
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,SF,17", -- All
|
|
|
|
@@ -305,294 +203,22 @@ function GetDefaultOptionLines()
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function CheckCharacters(mods)
|
|
|
|
|
if CHARMAN:GetCharacterCount() > 0 then
|
|
|
|
|
return mods .. ",18" --TODO: Better line name.
|
|
|
|
|
end
|
|
|
|
|
return mods
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
modLines = LineSets[2]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if not IsExtra() then
|
|
|
|
|
modLines = GetUserPrefB("UserPrefShowLotsaOptions")
|
|
|
|
|
and LineSets[1] or LineSets[2]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return CheckCharacters(modLines)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefAutoSetStyle()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefAutoSetStyle",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefAutoSetStyle") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefAutoSetStyle") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefAutoSetStyle", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefAutoSetStyle", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } )
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefNotePosition()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefNotePosition",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Normal'),
|
|
|
|
|
THEME:GetString('OptionNames','Lower')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefNotePosition") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefNotePosition") then
|
|
|
|
|
list[1] = true
|
|
|
|
|
else
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefNotePosition", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[1] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefNotePosition", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefLongFail()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefLongFail",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Short'),
|
|
|
|
|
THEME:GetString('OptionNames','Long')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefLongFail") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefLongFail") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefLongFail", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefLongFail", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } )
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefComboOnRolls()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefComboOnRolls",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefComboOnRolls") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefComboOnRolls") then
|
|
|
|
|
list[2] = true;
|
|
|
|
|
else
|
|
|
|
|
list[1] = true;
|
|
|
|
|
end;
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefComboOnRolls",false);
|
|
|
|
|
list[1] = true;
|
|
|
|
|
end;
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefComboOnRolls", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefFlashyCombo()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefFlashyCombo",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefFlashyCombo") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefFlashyCombo") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefFlashyCombo", false)
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefFlashyCombo", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefComboUnderField()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefComboUnderField",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefComboUnderField") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefComboUnderField") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefComboUnderField", true)
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefComboUnderField", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t;
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefFancyUIBG()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefFancyUIBG",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefFancyUIBG") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefFancyUIBG") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefFancyUIBG", true)
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefFancyUIBG", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function UserPrefTimingDisplay()
|
|
|
|
|
local t = {
|
|
|
|
|
Name = "UserPrefTimingDisplay",
|
|
|
|
|
LayoutType = "ShowAllInRow",
|
|
|
|
|
SelectType = "SelectOne",
|
|
|
|
|
OneChoiceForAllPlayers = true,
|
|
|
|
|
ExportOnChange = false,
|
|
|
|
|
Choices = {
|
|
|
|
|
THEME:GetString('OptionNames','Off'),
|
|
|
|
|
THEME:GetString('OptionNames','On')
|
|
|
|
|
},
|
|
|
|
|
LoadSelections = function(self, list, pn)
|
|
|
|
|
if ReadPrefFromFile("UserPrefTimingDisplay") ~= nil then
|
|
|
|
|
if GetUserPrefB("UserPrefTimingDisplay") then
|
|
|
|
|
list[2] = true
|
|
|
|
|
else
|
|
|
|
|
list[1] = true
|
|
|
|
|
end
|
|
|
|
|
else
|
|
|
|
|
WritePrefToFile("UserPrefTimingDisplay", true)
|
|
|
|
|
list[2] = true
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
SaveSelections = function(self, list, pn)
|
|
|
|
|
local val = list[2] and true or false
|
|
|
|
|
WritePrefToFile("UserPrefTimingDisplay", val)
|
|
|
|
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" })
|
|
|
|
|
THEME:ReloadMetrics()
|
|
|
|
|
end
|
|
|
|
|
}
|
|
|
|
|
setmetatable(t, t)
|
|
|
|
|
return t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
--[[ end option rows ]]
|
|
|
|
|