make combo under field a user preference.

This commit is contained in:
AJ Kelly
2010-08-22 12:43:20 -05:00
parent c51948467c
commit e96148f561
4 changed files with 46 additions and 2 deletions
+4
View File
@@ -231,4 +231,8 @@ function GetTapPosition( sType )
bPreference = GetUserPrefB("UserPrefNotePosition") and "Normal" or "Lower"
tNotePos = tNotePositions[bPreference]
return tNotePos[bCategory]
end
function ComboUnderField()
return GetUserPrefB("UserPrefComboUnderField")
end
+1 -1
View File
@@ -905,7 +905,7 @@ DrawDistanceBeforeTargetsPixels=SCREEN_HEIGHT
DrawDistanceAfterTargetsPixels=-128
TapJudgmentsUnderField=false
HoldJudgmentsUnderField=false
ComboUnderField=true
ComboUnderField=ComboUnderField()
PenalizeTapScoreNone=false
JudgeHoldNotesOnSameRowTogether=(GAMESTATE:GetCurrentGame():GetName() == "pump")
HoldCheckpoints=(GAMESTATE:GetCurrentGame():GetName() == "pump")
+39
View File
@@ -31,6 +31,9 @@ function InitUserPrefs()
if GetUserPrefB("FlashyCombos") == nil then
SetUserPref("FlashyCombos", false);
end;
if GetUserPrefB("UserPrefComboUnderField") == nil then
SetUserPref("UserPrefComboUnderField", true);
end;
--[[ if GetUserPref("ProTimingP1") == nil then
SetUserPref("ProTimingP1", false);
end;
@@ -413,4 +416,40 @@ function UserPrefFlashyCombo()
setmetatable( t, t );
return t;
end
function UserPrefComboUnderField()
local t = {
Name = "UserPrefComboUnderField";
LayoutType = "ShowAllInRow";
SelectType = "SelectOne";
OneChoiceForAllPlayers = true;
ExportOnChange = false;
Choices = { 'Off','On' };
LoadSelections = function(self, list, pn)
if ReadPrefFromFile("UserPrefComboUnderField") ~= nil then
if GetUserPrefB("UserPrefComboUnderField") then
list[2] = true;
else
list[1] = true;
end;
else
WritePrefToFile("UserPrefComboUnderField",true);
list[2] = true;
end;
end;
SaveSelections = function(self, list, pn)
local val;
if list[2] then
val = true;
else
val = false;
end;
WritePrefToFile("UserPrefComboUnderField",val);
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
THEME:ReloadMetrics();
end;
};
setmetatable( t, t );
return t;
end
--[[ end option rows ]]
+2 -1
View File
@@ -776,7 +776,7 @@ ItemsLongRowSharedX=SCREEN_CENTER_X
[ScreenOptionsTheme]
Fallback="ScreenOptionsServiceChild"
LineNames="gNotePos,gAuto,gScore,gSDisp,gOpts,gLongFail,FlashyCombo"
LineNames="gNotePos,gAuto,gScore,gSDisp,gOpts,gLongFail,gComboUnderField,FlashyCombo"
#,gAuto
LinegNotePos="lua,UserPrefNotePosition()"
LinegScore="lua,UserPrefGameplayShowScore()"
@@ -784,6 +784,7 @@ LinegSDisp="lua,UserPrefGameplayShowStepsDisplay()"
LinegOpts="lua,UserPrefShowLotsaOptions()"
LinegAuto="lua,UserPrefAutoSetStyle()"
LinegLongFail="lua,UserPrefLongFail()"
LinegComboUnderField="lua,UserPrefComboUnderField()"
LineFlashyCombo="lua,UserPrefFlashyCombo()"
[ScreenOptionsSystemDirection]