On our way to fixing AutoSetStyle.

This commit is contained in:
Jason Felds
2011-06-04 19:45:54 -04:00
parent 3bb7890d5b
commit fe18578319
@@ -436,21 +436,21 @@ end
function GamePrefAutoSetStyle()
local t = {
Name = "GamePrefAutoSetStyle";
Name = "UserPrefAutoSetStyle";
LayoutType = "ShowAllInRow";
SelectType = "SelectOne";
OneChoiceForAllPlayers = true;
ExportOnChange = false;
Choices = { 'Off','On' };
LoadSelections = function(self, list, pn)
if ReadGamePrefFromFile("AutoSetStyle") ~= nil then
if GetGamePrefB("AutoSetStyle") then
if ReadPrefFromFile("UserPrefAutoSetStyle") ~= nil then
if GetUserPrefB("UserPrefAutoSetStyle") then
list[2] = true;
else
list[1] = true;
end;
else
WriteGamePrefToFile("AutoSetStyle",false);
WritePrefToFile("UserPrefAutoSetStyle",false);
list[1] = true;
end;
end;
@@ -461,7 +461,7 @@ function GamePrefAutoSetStyle()
else
val = false;
end;
WriteGamePrefToFile("AutoSetStyle",val);
WritePrefToFile("UserPrefAutoSetStyle",val);
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
THEME:ReloadMetrics();
end;