On our way to fixing AutoSetStyle.
This commit is contained in:
@@ -436,21 +436,21 @@ end
|
|||||||
|
|
||||||
function GamePrefAutoSetStyle()
|
function GamePrefAutoSetStyle()
|
||||||
local t = {
|
local t = {
|
||||||
Name = "GamePrefAutoSetStyle";
|
Name = "UserPrefAutoSetStyle";
|
||||||
LayoutType = "ShowAllInRow";
|
LayoutType = "ShowAllInRow";
|
||||||
SelectType = "SelectOne";
|
SelectType = "SelectOne";
|
||||||
OneChoiceForAllPlayers = true;
|
OneChoiceForAllPlayers = true;
|
||||||
ExportOnChange = false;
|
ExportOnChange = false;
|
||||||
Choices = { 'Off','On' };
|
Choices = { 'Off','On' };
|
||||||
LoadSelections = function(self, list, pn)
|
LoadSelections = function(self, list, pn)
|
||||||
if ReadGamePrefFromFile("AutoSetStyle") ~= nil then
|
if ReadPrefFromFile("UserPrefAutoSetStyle") ~= nil then
|
||||||
if GetGamePrefB("AutoSetStyle") then
|
if GetUserPrefB("UserPrefAutoSetStyle") then
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
else
|
else
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
WriteGamePrefToFile("AutoSetStyle",false);
|
WritePrefToFile("UserPrefAutoSetStyle",false);
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -461,7 +461,7 @@ function GamePrefAutoSetStyle()
|
|||||||
else
|
else
|
||||||
val = false;
|
val = false;
|
||||||
end;
|
end;
|
||||||
WriteGamePrefToFile("AutoSetStyle",val);
|
WritePrefToFile("UserPrefAutoSetStyle",val);
|
||||||
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
||||||
THEME:ReloadMetrics();
|
THEME:ReloadMetrics();
|
||||||
end;
|
end;
|
||||||
|
|||||||
Reference in New Issue
Block a user