flashy combo userpref (default = off)

This commit is contained in:
AJ Kelly
2010-07-21 22:40:14 -05:00
parent f8b017b99a
commit 82e3444f38
5 changed files with 60 additions and 7 deletions
+39
View File
@@ -22,6 +22,9 @@ function InitUserPrefs()
if GetUserPrefB("UserPrefComboOnRolls") == nil then
SetUserPref("UserPrefComboOnRolls", false);
end;
if GetUserPrefB("FlashyCombos") == nil then
SetUserPref("FlashyCombos", false);
end;
--[[ if GetUserPref("ProTimingP1") == nil then
SetUserPref("ProTimingP1", false);
end;
@@ -350,4 +353,40 @@ function UserPrefComboOnRolls()
setmetatable( t, t );
return t;
end
function UserPrefFlashyCombo()
local t = {
Name = "UserPrefFlashyCombo";
LayoutType = "ShowAllInRow";
SelectType = "SelectOne";
OneChoiceForAllPlayers = true;
ExportOnChange = false;
Choices = { 'Off','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;
if list[2] then
val = true;
else
val = false;
end;
WritePrefToFile("UserPrefFlashyCombo",val);
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
THEME:ReloadMetrics();
end;
};
setmetatable( t, t );
return t;
end
--[[ end option rows ]]