allow specifying the default

This commit is contained in:
Glenn Maynard
2005-02-16 06:50:37 +00:00
parent d5cfb74709
commit 97498a4a3e
@@ -44,9 +44,11 @@ end
OptionRowTable =
{
SaveTo = nil, -- set this
Default = nil, -- set this
LoadSelections = function(self, list, pn)
local Sort = PROFILEMAN:GetMachineProfile():GetSaved()[self.Name]
or self.Default
-- Find the index of the current sort.
local Index = FindValue(self.RawChoices, Sort) or 1
list[Index] = true