Fix UserPrefAutoSetStyle.
Also took care of some other lua issues with NotePosition and ComboUnderField.
This commit is contained in:
@@ -12,6 +12,7 @@ StepMania 5.0 Preview 2 | 20110???
|
|||||||
----------
|
----------
|
||||||
* Changed default MusicWheelSwitchSpeed to 15 (was 10). [AJ]
|
* Changed default MusicWheelSwitchSpeed to 15 (was 10). [AJ]
|
||||||
* [AnnouncerManager] Fixed a bug where no announcers would be loaded. [AJ]
|
* [AnnouncerManager] Fixed a bug where no announcers would be loaded. [AJ]
|
||||||
|
* Restored the UserPrefAutoSetStyle behavior. [Wolfman2000]
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
StepMania 5.0 Preview 1a | 20110603
|
StepMania 5.0 Preview 1a | 20110603
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ function InitGamePrefs()
|
|||||||
|
|
||||||
local BPrefs =
|
local BPrefs =
|
||||||
{
|
{
|
||||||
{ "AutoSetStyle", false },
|
|
||||||
{ "NotePosition", true },
|
|
||||||
{ "ComboOnRolls", false },
|
{ "ComboOnRolls", false },
|
||||||
{ "ComboUnderField", true },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
for idx,pref in ipairs(Prefs) do
|
for idx,pref in ipairs(Prefs) do
|
||||||
@@ -41,6 +39,9 @@ function InitUserPrefs()
|
|||||||
|
|
||||||
local BPrefs =
|
local BPrefs =
|
||||||
{
|
{
|
||||||
|
{ "UserPrefComboUnderField", true },
|
||||||
|
{ "UserPrefAutoSetStyle", false },
|
||||||
|
{ "UserPrefNotePosition", true },
|
||||||
{ "UserPrefShowLotsaOptions", true},
|
{ "UserPrefShowLotsaOptions", true},
|
||||||
{ "UserPrefLongFail", false},
|
{ "UserPrefLongFail", false},
|
||||||
{ "UserPrefProtimingP1", false},
|
{ "UserPrefProtimingP1", false},
|
||||||
@@ -398,23 +399,23 @@ function GamePrefComboOnRolls()
|
|||||||
setmetatable( t, t );
|
setmetatable( t, t );
|
||||||
return t;
|
return t;
|
||||||
end
|
end
|
||||||
function GamePrefComboUnderField()
|
function UserPrefComboUnderField()
|
||||||
local t = {
|
local t = {
|
||||||
Name = "GamePrefComboUnderField";
|
Name = "UserPrefComboUnderField";
|
||||||
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("ComboUnderField") ~= nil then
|
if ReadPrefFromFile("UserPrefComboUnderField") ~= nil then
|
||||||
if GetGamePrefB("ComboUnderField") then
|
if GetUserPrefB("UserPrefComboUnderField") then
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
else
|
else
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
WriteGamePrefToFile("ComboUnderField",true);
|
WritePrefToFile("UserPrefComboUnderField",true);
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -425,7 +426,7 @@ function GamePrefComboUnderField()
|
|||||||
else
|
else
|
||||||
val = false;
|
val = false;
|
||||||
end;
|
end;
|
||||||
WriteGamePrefToFile("ComboUnderField",val);
|
WritePrefToFile("UserPrefComboUnderField",val);
|
||||||
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
||||||
THEME:ReloadMetrics();
|
THEME:ReloadMetrics();
|
||||||
end;
|
end;
|
||||||
@@ -469,23 +470,23 @@ function UserPrefAutoSetStyle()
|
|||||||
setmetatable( t, t );
|
setmetatable( t, t );
|
||||||
return t;
|
return t;
|
||||||
end
|
end
|
||||||
function GamePrefNotePosition()
|
function UserPrefNotePosition()
|
||||||
local t = {
|
local t = {
|
||||||
Name = "GamePrefNotePosition";
|
Name = "UserPrefNotePosition";
|
||||||
LayoutType = "ShowAllInRow";
|
LayoutType = "ShowAllInRow";
|
||||||
SelectType = "SelectOne";
|
SelectType = "SelectOne";
|
||||||
OneChoiceForAllPlayers = true;
|
OneChoiceForAllPlayers = true;
|
||||||
ExportOnChange = false;
|
ExportOnChange = false;
|
||||||
Choices = { 'Normal','Lower' };
|
Choices = { 'Normal','Lower' };
|
||||||
LoadSelections = function(self, list, pn)
|
LoadSelections = function(self, list, pn)
|
||||||
if ReadGamePrefFromFile("NotePosition") ~= nil then
|
if ReadPrefFromFile("UserPrefNotePosition") ~= nil then
|
||||||
if GetGamePrefB("NotePosition") then
|
if GetUserPrefB("UserPrefNotePosition") then
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
else
|
else
|
||||||
list[2] = true;
|
list[2] = true;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
WriteGamePrefToFile("NotePosition",false);
|
WritePrefToFile("UserPrefNotePosition",false);
|
||||||
list[1] = true;
|
list[1] = true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -496,7 +497,7 @@ function GamePrefNotePosition()
|
|||||||
else
|
else
|
||||||
val = false;
|
val = false;
|
||||||
end;
|
end;
|
||||||
WriteGamePrefToFile("NotePosition",val);
|
WritePrefToFile("UserPrefNotePosition",val);
|
||||||
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
MESSAGEMAN:Broadcast("PreferenceSet", { Message == "Set Preference" } );
|
||||||
THEME:ReloadMetrics();
|
THEME:ReloadMetrics();
|
||||||
end;
|
end;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ ScreenHeight=480
|
|||||||
# Allows you to pick all available game modes for your gametype: for example,
|
# Allows you to pick all available game modes for your gametype: for example,
|
||||||
# inserting enough coins for 1p would let you choose between solo, single
|
# inserting enough coins for 1p would let you choose between solo, single
|
||||||
# and double before each game
|
# and double before each game
|
||||||
AutoSetStyle=GetGamePrefB("AutoSetStyle")
|
AutoSetStyle=GetUserPrefB("UserPrefAutoSetStyle")
|
||||||
|
|
||||||
# Default modifiers and noteskin.
|
# Default modifiers and noteskin.
|
||||||
DefaultModifiers="default,1.5x"
|
DefaultModifiers="default,1.5x"
|
||||||
|
|||||||
@@ -409,8 +409,7 @@ MeterSetCommand=%function(self,param) \
|
|||||||
end;
|
end;
|
||||||
#
|
#
|
||||||
ShowDescription=true
|
ShowDescription=true
|
||||||
DescriptionX=GetGamePrefB("AutoSetStyle") and (-64-8+20) or (-64-8)
|
DescriptionX=GetUserPrefB("UserPrefAutoSetStyle") and (-64-8+20) or (-64-8)
|
||||||
# DescriptionX=GetUserPrefB("UserPrefAutoSetStyle") and (-64-8+20) or (-64-8)
|
|
||||||
DescriptionOnCommand=shadowlength,1;horizalign,left;zoom,0.65;maxwidth,128+8-20;uppercase,true;
|
DescriptionOnCommand=shadowlength,1;horizalign,left;zoom,0.65;maxwidth,128+8-20;uppercase,true;
|
||||||
DescriptionSetCommand=%function(self,param) \
|
DescriptionSetCommand=%function(self,param) \
|
||||||
if self:GetText() == "" then \
|
if self:GetText() == "" then \
|
||||||
@@ -428,7 +427,7 @@ AutogenY=0
|
|||||||
#AutogenOnCommand=diffuseshift;effectcolor1,Colors.Alpha( Color("Green") , 0.5 );effectcolor2,ColorLightTone( Color("Green") );
|
#AutogenOnCommand=diffuseshift;effectcolor1,Colors.Alpha( Color("Green") , 0.5 );effectcolor2,ColorLightTone( Color("Green") );
|
||||||
AutogenOnCommand=blend,Blend.Add;diffuseshift;effectcolor1,color("#FFCC00FF");effectcolor2,color("#FFCC0088");
|
AutogenOnCommand=blend,Blend.Add;diffuseshift;effectcolor1,color("#FFCC00FF");effectcolor2,color("#FFCC0088");
|
||||||
#
|
#
|
||||||
ShowStepsType=GetGamePrefB("AutoSetStyle")
|
ShowStepsType=GetUserPrefB("UserPrefAutoSetStyle")
|
||||||
StepsTypeX=-64-8
|
StepsTypeX=-64-8
|
||||||
StepsTypeY=0
|
StepsTypeY=0
|
||||||
StepsTypeOnCommand=
|
StepsTypeOnCommand=
|
||||||
@@ -883,8 +882,7 @@ StageDisplayY=SCREEN_TOP+24+3
|
|||||||
StageDisplayOnCommand=skewx,-0.125;draworder,105;fov,90;zoom,0.675;zoomy,0;sleep,0.35;smooth,0.35;zoomy,0.675
|
StageDisplayOnCommand=skewx,-0.125;draworder,105;fov,90;zoom,0.675;zoomy,0;sleep,0.35;smooth,0.35;zoomy,0.675
|
||||||
StageDisplayOffCommand=linear,0.25;zoomy,0;
|
StageDisplayOffCommand=linear,0.25;zoomy,0;
|
||||||
#
|
#
|
||||||
ShowDifficultyDisplay=not GetGamePrefB("AutoSetStyle") and not GAMESTATE:IsCourseMode()
|
ShowDifficultyDisplay=not GetUserPrefB("UserPrefAutoSetStyle") and not GAMESTATE:IsCourseMode()
|
||||||
# ShowDifficultyDisplay=not GetUserPrefB("UserPrefAutoSetStyle") and not GAMESTATE:IsCourseMode()
|
|
||||||
DifficultyDisplayX=SCREEN_CENTER_X-160
|
DifficultyDisplayX=SCREEN_CENTER_X-160
|
||||||
DifficultyDisplayY=SCREEN_TOP+160-96+2
|
DifficultyDisplayY=SCREEN_TOP+160-96+2
|
||||||
DifficultyDisplayOnCommand=draworder,105;fov,90;zoom,1;zoomy,0;sleep,0.35;smooth,0.35;zoomy,1
|
DifficultyDisplayOnCommand=draworder,105;fov,90;zoom,1;zoomy,0;sleep,0.35;smooth,0.35;zoomy,1
|
||||||
@@ -1069,8 +1067,7 @@ end;
|
|||||||
#
|
#
|
||||||
ShowDescription=true
|
ShowDescription=true
|
||||||
DescriptionX=-20-32
|
DescriptionX=-20-32
|
||||||
DescriptionY=GetGamePrefB("AutoSetStyle") and -5 or 0
|
DescriptionY=GetUserPrefB("UserPrefAutoSetStyle") and -5 or 0
|
||||||
# DescriptionY=GetUserPrefB("UserPrefAutoSetStyle") and -5 or 0
|
|
||||||
DescriptionOnCommand=shadowlength,1;uppercase,true;zoom,0.75;maxwidth,128+8
|
DescriptionOnCommand=shadowlength,1;uppercase,true;zoom,0.75;maxwidth,128+8
|
||||||
DescriptionSetCommand=%function(self,param) \
|
DescriptionSetCommand=%function(self,param) \
|
||||||
if self:GetText() == "" then \
|
if self:GetText() == "" then \
|
||||||
@@ -1088,8 +1085,7 @@ AutogenY=0
|
|||||||
AutogenOnCommand=
|
AutogenOnCommand=
|
||||||
AutogenSetCommand=%function(self,param) if param.Difficulty then self:diffuse(CustomDifficultyToLightColor(param.Difficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.Difficulty)); end end
|
AutogenSetCommand=%function(self,param) if param.Difficulty then self:diffuse(CustomDifficultyToLightColor(param.Difficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.Difficulty)); end end
|
||||||
#
|
#
|
||||||
ShowStepsType=GetGamePrefB("AutoSetStyle")
|
ShowStepsType=GetUserPrefB("UserPrefAutoSetStyle")
|
||||||
# ShowStepsType=GetUserPrefB("UserPrefAutoSetStyle")
|
|
||||||
StepsTypeX=-20-32
|
StepsTypeX=-20-32
|
||||||
StepsTypeY=7
|
StepsTypeY=7
|
||||||
StepsTypeOnCommand=zoom,0.45
|
StepsTypeOnCommand=zoom,0.45
|
||||||
@@ -1119,8 +1115,7 @@ end;
|
|||||||
#
|
#
|
||||||
ShowDescription=true
|
ShowDescription=true
|
||||||
DescriptionX=-20
|
DescriptionX=-20
|
||||||
DescriptionY=GetGamePrefB("AutoSetStyle") and -5 or 0
|
DescriptionY=GetUserPrefB("UserPrefAutoSetStyle") and -5 or 0
|
||||||
# DescriptionY=GetUserPrefB("UserPrefAutoSetStyle") and -5 or 0
|
|
||||||
DescriptionOnCommand=shadowlength,1;uppercase,true;zoom,0.75;maxwidth,128+8
|
DescriptionOnCommand=shadowlength,1;uppercase,true;zoom,0.75;maxwidth,128+8
|
||||||
DescriptionSetCommand=%function(self,param) \
|
DescriptionSetCommand=%function(self,param) \
|
||||||
if self:GetText() == "" then \
|
if self:GetText() == "" then \
|
||||||
@@ -1139,8 +1134,7 @@ AutogenY=0
|
|||||||
AutogenOnCommand=
|
AutogenOnCommand=
|
||||||
AutogenSetCommand=%function(self,param) if param.Difficulty then self:diffuse(CustomDifficultyToLightColor(param.Difficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.Difficulty)); end end
|
AutogenSetCommand=%function(self,param) if param.Difficulty then self:diffuse(CustomDifficultyToLightColor(param.Difficulty)); self:strokecolor(CustomDifficultyToDarkColor(param.Difficulty)); end end
|
||||||
#
|
#
|
||||||
ShowStepsType=GetGamePrefB("AutoSetStyle")
|
ShowStepsType=GetUserPrefB("UserPrefAutoSetStyle")
|
||||||
# ShowStepsType=GetUserPrefB("UserPrefAutoSetStyle")
|
|
||||||
StepsTypeX=-20
|
StepsTypeX=-20
|
||||||
StepsTypeY=7
|
StepsTypeY=7
|
||||||
StepsTypeOnCommand=zoom,0.45
|
StepsTypeOnCommand=zoom,0.45
|
||||||
|
|||||||
Reference in New Issue
Block a user