standardized AdjustSpeed behavior between default and fallback
This commit is contained in:
@@ -393,25 +393,25 @@ function GetDefaultArrowSpacing()
|
|||||||
80, -- Pro
|
80, -- Pro
|
||||||
128, -- New
|
128, -- New
|
||||||
};
|
};
|
||||||
return GetGamePrefB("AdjustSpeed") and rates[3] or rates[1];
|
return GetUserPrefB("AdjustSpeed") and rates[3] or rates[1];
|
||||||
end;
|
end;
|
||||||
function GamePrefAdjustSpeed()
|
function UserPrefAdjustSpeed()
|
||||||
local t = {
|
local t = {
|
||||||
Name = "GamePrefAdjustSpeed";
|
Name = "UserPrefAdjustSpeed";
|
||||||
LayoutType = "ShowAllInRow";
|
LayoutType = "ShowAllInRow";
|
||||||
SelectType = "SelectOne";
|
SelectType = "SelectOne";
|
||||||
OneChoiceForAllPlayers = true;
|
OneChoiceForAllPlayers = true;
|
||||||
ExportOnChange = false;
|
ExportOnChange = false;
|
||||||
Choices = { 'Normal','Fast' };
|
Choices = { 'Normal','Fast' };
|
||||||
LoadSelections = function(self, list, pn)
|
LoadSelections = function(self, list, pn)
|
||||||
if ReadGamePrefFromFile("AdjustSpeed") ~= nil then
|
if ReadUserPrefFromFile("AdjustSpeed") ~= nil then
|
||||||
if GetGamePrefB("AdjustSpeed") then
|
if GetUserPrefB("AdjustSpeed") then
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
else
|
else
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
WriteGamePrefToFile("AdjustSpeed",true);
|
WriteUserPrefToFile("AdjustSpeed",true);
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -422,7 +422,7 @@ function GamePrefAdjustSpeed()
|
|||||||
else
|
else
|
||||||
val = false;
|
val = false;
|
||||||
end;
|
end;
|
||||||
WriteGamePrefToFile("AdjustSpeed",val);
|
WriteUserPrefToFile("AdjustSpeed",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